Actions.NetworkActions.FileOps package

Submodules

Actions.NetworkActions.FileOps.file_ops_actions module

Copyright 2017, Fujitsu Network Communications, Inc. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class Actions.NetworkActions.FileOps.file_ops_actions.FileOpsActions[source]

Bases: object

File operations keyword class

ftp_from_remotehost(system_name, session_name=None, dest_system=None, ftp_operation='both', ip_type='ip')[source]

ftp(test both put and get).This keyword can be used to transfer file from source _system to destination system or vice versa. It checks the size after transfer in both get and put.

Datafile usage:

Tags or attributes to be used in input datafile for the system or subsystem.If both tag and attribute is provided the attribute will be used.

  1. prompt = prompt of the source system
  2. filepath = file with filepath in source system(used for put)
  3. ip = ipv4 address or defaulted to lcn ip
  4. ipv6 = ipv6 address or defaulted to lcn ipv6
  5. dns = dns name
  6. lmp_ip = ipv4 address of lmp port of dut
  7. lmp_ipv6 = ipv6 address of lmp port of dut
  8. username = username of the dest system
  9. password = password of the dest system

10. filepath = file with filepath in destination system (used for get) note: one of <ip>,<ipv6>,<dns>,<lmp_ip>,<lmp_ipv6> tags specified in

ip_type argument is sufficient to be present in inputdatafile

Arguments:
  1. system_name(string) = name of the Linux machine on which to execute
  2. session_name(string) = name of the session
  3. dest_system(string) = names of the destination system

4. ftp_operation(string) = get/put/both 6. ip_type(string) = iptype of the dest system through which it needs to be connected.

needs to be one of (ip/ipv4/dns/lmp_ip/lmp_ipv6).It has to be present in the input data file.

Returns:
  1. bool (True/False)
sftp_from_remotehost(system_name, session_name=None, dest_system=None, sftp_operation='both', port='1022', ip_type='ip')[source]

sftp(test both put and get).This keyword can be used to transfer file from source _system to destination system or vice versa. It checks the size after transfer in both get and put.

Datafile usage:

Tags or attributes to be used in input datafile for the system or subsystem.If both tag and attribute is provided the attribute will be used.

  1. prompt = prompt of the source system
  2. filepath = file with filepath in source system(used for put)
  3. ip = ipv4 address or defaulted to lcn ip
  4. ipv6 = ipv6 address or defaulted to lcn ipv6
  5. dns = dns name
  6. lmp_ip = ipv4 address of lmp port of dut
  7. lmp_ipv6 = ipv6 address of lmp port of dut
  8. username = username of the dest system
  9. password = password of the dest system

10. filepath = file with filepath in destination system(used for get) note: one of <ip>,<ipv6>,<dns>,<lmp_ip>,<lmp_ipv6> tags specified in

ip_type argument is sufficient to be present in inputdatafile

Arguments:
  1. system_name(string) = name of the Linux machine on which to execute
  2. session_name(string) = name of the session
  3. dest_system(string) = names of the destination system
  4. ftp_operation(string) = get/put/both
  5. ip_type(string) = iptype of the dest system through which it needs to be connected.
    needs to be one of (ip/ipv4/dns/lmp_ip/lmp_ipv6).It has to be present in the input data file.
Returns:
  1. bool (True/False)

Module contents

Copyright 2017, Fujitsu Network Communications, Inc. Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.