File transfer protocol client.
Version: 2020-02-26
module huawei-ftpc { yang-version 1; namespace "urn:huawei:yang:huawei-ftpc"; prefix ftpc; import huawei-network-instance { prefix ni; } import huawei-extension { prefix ext; } import huawei-pub-type { prefix pub-type; } import ietf-inet-types { prefix inet; } organization "Huawei Technologies Co., Ltd."; contact "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com"; description "File transfer protocol client."; revision "2020-02-26" { description "Initial revision."; reference "Huawei private."; } ext:task-name "ftp-client"; typedef ftpc-trans-cmd-type { type enumeration { enum "put" { value 25; description "Upload local files to the remote server."; } enum "get" { value 26; description "Download files from the remote server to the client."; } } description "FTP client transfer command type."; } container ftpc { description "File transfer protocol client."; container client { description "Configure ftp client."; leaf source-ipv4-address { type inet:ipv4-address-no-zone; description "Users can configure the source IP address for outgoing connections by specifying the source IP address."; } leaf source-interface-name { when "not(../source-ipv4-address)"; type pub-type:if-name; description "Users can configure the source interface for outgoing connections by specifying the source interface name. The specified source interface must exist and an IP address must be configured on the interface."; } leaf src-ipv6-addr { type inet:ipv6-address-no-zone; description "FTP source IPv6 address."; } leaf ipv6-vpn-instance-name { when "../src-ipv6-addr"; type string { length "1..31"; } description "The specified VPN instance must exist and IPv6-family must be enabled in the VPN instance."; } } // container client container global-vpn { description "Configure VPN."; leaf vpn-name { type string { length "1..31"; } description "VPN name."; } leaf ipv6-vpn-name { type string { length "1..31"; } description "IPv6 VPN name."; } } // container global-vpn } // container ftpc rpc ftpc-transfer-file { description "FTP client transfer file."; input { leaf server-port { type uint32 { range "1..65535"; } description "Use this server port to transfer the file."; } leaf source-ipv4-address { type inet:ipv4-address-no-zone; must "../server-ipv4-address"; description "Use this source IPv4 address to transfer the file."; } leaf source-ipv6-address { type inet:ipv6-address-no-zone; must "../server-ipv6-address"; description "Use this source IPv6 address to transfer the file."; } leaf server-ipv4-address { type string { length "1..255"; } must "not(../server-ipv6-address)"; description "Use this IPv4 address or Hostname as the server IPv4 address or server hostname and transfer files to this server."; } leaf server-ipv6-address { type string { length "1..255"; } description "Use this IPv6 address or Hostname as the server IPv6 address or server hostname and transfer files to this server."; } leaf command-type { type ftpc-trans-cmd-type; description "Specify the type of the operation to be performed."; } leaf user-name { type string { length "1..255"; } mandatory true; description "Use this username to authenticate the connection before transferring files."; } leaf password { type pub-type:password-extend; mandatory true; description "Use this password to authenticate the connection before transferring files."; } leaf local-file-name { type string { length "1..128"; } description "Transfer this file to the server."; } leaf remote-file-name { type string { length "1..128"; } description "The server stores the received file using this file name."; } leaf remote-extension { type string { length "1..5"; } description "Append this remote extension to the destination file name as a temporary file name during file transmission."; } leaf vpn-name { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } must "(../server-ipv4-address) and not(../is-public-net) and not(../source-interface-name)"; description "Use this VPN name to connect to the server."; } leaf ipv6-vpn-name { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } must "(../server-ipv6-address) and not(../is-public-net) and not(../source-interface-name)"; description "Use this IPv6 VPN name to connect to the server."; } leaf is-public-net { type boolean; description "Using public net or not."; } leaf source-interface-name { type pub-type:if-name; must "not(../is-public-net)"; description "Use this source interface name to transfer the file."; } } } // rpc ftpc-transfer-file } // module huawei-ftpc
© 2023 YumaWorks, Inc. All rights reserved.