Secure File Transfer

Feature Summary and Revision History

Summary Data

Applicable Product(s) or Functional Area

All

Applicable Platform(s)

UGP

Feature Default

Disabled - Configuration required

Related Features in this Release

Not Applicable

Related Documentation

  • Ultra M Solutions Guide

  • Ultra Services Platform Deployment Automation Guide

  • Cisco Ultra Services Platform NETCONF API Guide

  • UEM-based VNF Deployment Guide

Revision History

Revision Details

Release

First introduced.

6.5

Feature Description

UAS provides upload-file RPC in ConfD to transfer a file or an image to the VNFC components under given NSD and VNFD levels in a deployed setup.

This command can be invoked from ConfD CLI of AutoDeploy and AutoVNF.


Important

Though the upload-file command can be invoked from AutoDeploy and AutoVNF, it is highly important that the nsd-id must be specified as AutoVNF name only.


Limitations

The file transfer cannot be initiated to the components with following vnf-types — UEM, USP-UAS, ESC. That is, if esc is specified as vnfd in the upload-file command, then the file cannot be transferred to ESC.

How it Works

Perform the following procedure to transfer a file or an image to the VNFs.

  1. Log on to AutoDeploy VM or AutoVNF VM as the default user, ubuntu.

  2. Switch to the root user.

    sudo su 
  3. Enter the ConfD CLI.

    confd_cli -C -u admin 
  4. Enter the admin user password when prompted.

  5. Initiate the file transfer to the VNFs using the following command:

    For AutoDeploy:

    nsd:upload-file nsd-id <nsd id> vnfd <vnfd name> source <path of the file> destination < path > 

    For AutoVNF:

    upload-file nsd-id <nsd id> vnfd <vnfd name> source <path of the file> destination < path > 

    Notes:

    • The nsd-id must always be specified as AutoVNF name.

    • vnfd is an optional parameter in this configuration. This parameter must be alpha and/or numeric characters, and it accepts more than one value as an input. For example: [ vpc1 ], [ vpc1 vpc2 vpc3 ].

    • If vnfd is specified in the upload-file command and it is a valid VNFD, the file or image is transferred successfully. For the list of invalid or unsupportedVNFDs, see the Limitations.

    • If vnfd is not specified in the upload-file command, then the file or image is transferred only to the valid VNFDs in the given NSD deployment.

    • If the command includes a single invalid VNFD, the file transfer will not be executed and an error indicating invalid argument in AutoDeploy is displayed. For the list of invalid or unsupportedVNFDs, see the Limitations.

    Command example:

    nsd:upload-file nsd-id abc-autovnf vnfd [ vpc ] source /home/ubuntu/x.cfg destination /sftp 
  6. Monitor the progress of the file transfer operation.

    show transaction <transaction-id> 

    transaction_id is the ID displayed as a result of the upload-file command executed in the previous step.

    Example command output:

    show transaction 15407 
    TX ID     TX TYPE  DEPLOYMENT ID     TIMESTAMP                 STATUS  STATUS DETAIL 
    15407 upload-file  vnf-autovnf 2018-10-29T05:43:47.666386-00:00  error    -  

    Also, view the logs associated with a specific transaction.

    show log <transaction-id> 

Monitoring File Transfer Operations

AutoDeploy and AutoVNF maintain logs for all transactions in persistent storage. The status/progress of file transfer can be viewed in AutoDeploy/AutoVNF logs archived under /var/log/upstart/ based on where it is invoked.

If invoked from AutoDeploy, then RPC internally connects with AutoVNF and performs the file transfer. The respective progress can be viewed through the AutoVNF logs.

To view the logs associated with a specific transaction:

show log <transaction-id> 

Sample AutoDeploy Logs:

2018-10-26 16:12:30,156 - allowed-address-pair: 90.90.90.0/24 on eth0
2018-10-26 16:12:30,163 - Adding pre-created network: suneduvv-orch into catalog
2018-10-26 16:12:30,169 - Adding uplink action check-liveness-using-ping to eth1
2018-10-26 16:12:30,178 - Found VNFD 'suneduvv-autovnf' of type UAS
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
2018-10-26 16:12:30,634 - Connected to AutoVNF[10.225.202.246]
2018-10-26 16:12:30,641 - dst file name x.cfg
2018-10-26 16:12:30,645 - abs_dest_file /var/cisco/isos/x.cfg
2018-10-26 16:12:30,650 - Skipping copy, file '/var/cisco/isos/x.cfg' already exists
2018-10-26 16:12:30,676 - Updated path to URL in handle_file_transfer 'http://90.90.90.23:5000/isos/x.cfg'
2018-10-26 16:12:31,145 - <?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d9ad94ed-8c42-4059-829c-96182b384b27" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><transaction-id xmlns='http://www.cisco.com/usp/nfv/usp-nsds'>1540570351-451419</transaction-id>
</rpc-reply>
2018-10-26 16:12:31,150 - Waiting for deployment notifications for tx-id '1540570351-451419'
2018-10-26 16:12:31,155 - [('{urn:ietf:params:xml:ns:netconf:notification:1.0}notification', None), ('{urn:ietf:params:xml:ns:netconf:notification:1.0}eventTime', '2018-10-26T16:12:31.472658+00:00'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}upload-file-event', '\n  '), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}instance-id', 'suneduvv-autovnf-instance'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}descriptor-id', 'suneduvv-autovnf'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}transaction-id', '1540570351-451419'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}operation-type', 'upload-file'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}status', 'requested')]
2018-10-26 16:12:31,160 - Received upload-file-event for suneduvv-autovnf:1540570351-451419 with status:requested
2018-10-26 16:12:31,164 - [('{urn:ietf:params:xml:ns:netconf:notification:1.0}notification', None), ('{urn:ietf:params:xml:ns:netconf:notification:1.0}eventTime', '2018-10-26T16:12:31.764652+00:00'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}upload-file-event', '\n  '), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}instance-id', 'suneduvv-autovnf-instance'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}descriptor-id', 'suneduvv-autovnf'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}transaction-id', '1540570351-451419'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}operation-type', 'upload-file'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}status', 'instantiated')]
2018-10-26 16:12:31,169 - Received upload-file-event for suneduvv-autovnf:1540570351-451419 with status:instantiated
2018-10-26 16:12:31,173 - [('{urn:ietf:params:xml:ns:netconf:notification:1.0}notification', None), ('{urn:ietf:params:xml:ns:netconf:notification:1.0}eventTime', '2018-10-26T16:12:31.790449+00:00'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}upload-file-event', '\n  '), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}instance-id', 'suneduvv-autovnf-instance'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}descriptor-id', 'suneduvv-autovnf'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}transaction-id', '1540570351-451419'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}operation-type', 'upload-file'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}status', 'in-progress')]
2018-10-26 16:12:31,178 - Received upload-file-event for suneduvv-autovnf:1540570351-451419 with status:in-progress
2018-10-26 16:12:31,183 - [('{urn:ietf:params:xml:ns:netconf:notification:1.0}notification', None), ('{urn:ietf:params:xml:ns:netconf:notification:1.0}eventTime', '2018-10-26T16:12:31.842616+00:00'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}upload-file-event', '\n  '), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}instance-id', 'suneduvv-autovnf-instance'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}descriptor-id', 'suneduvv-autovnf'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}transaction-id', '1540570351-451419'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}operation-type', 'upload-file'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}status', 'in-progress')]
2018-10-26 16:12:31,188 - Received upload-file-event for suneduvv-autovnf:1540570351-451419 with status:in-progress
2018-10-26 16:12:31,257 - [('{urn:ietf:params:xml:ns:netconf:notification:1.0}notification', None), ('{urn:ietf:params:xml:ns:netconf:notification:1.0}eventTime', '2018-10-26T16:12:31.925373+00:00'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}upload-file-event', '\n  '), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}instance-id', 'suneduvv-autovnf-instance'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}descriptor-id', 'suneduvv-autovnf'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}transaction-id', '1540570351-451419'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}operation-type', 'upload-file'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}status', 'in-progress')]
90.90.90.25 - - [26/Oct/2018 16:12:31] "GET /isos/x.cfg HTTP/1.0" 200 -
2018-10-26 16:12:31,262 - Received upload-file-event for suneduvv-autovnf:1540570351-451419 with status:in-progress
2018-10-26 16:12:32,833 - [('{urn:ietf:params:xml:ns:netconf:notification:1.0}notification', None), ('{urn:ietf:params:xml:ns:netconf:notification:1.0}eventTime', '2018-10-26T16:12:33.493671+00:00'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}upload-file-event', '\n  '), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}instance-id', 'suneduvv-autovnf-instance'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}descriptor-id', 'suneduvv-autovnf'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}transaction-id', '1540570351-451419'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}operation-type', 'upload-file'), ('{http://www.cisco.com/usp/nfv/usp-uas-common-oper}status', 'error')]
2018-10-26 16:12:32,838 - Received upload-file-event for suneduvv-autovnf:1540570351-451419 with status:error
2018-10-26 16:12:32,843 - RPC NS[suneduvv-autovnf:suneduvv-autovnf-instance] failed
2018-10-26 16:12:32,849 - Failed to transfer a file
2018-10-26 16:12:32,854 - Deployment upload-file: suneduvv-autovnf failed
2018-10-26 16:12:32,871 - Send Deployment notification for: suneduvv-autovnf-instance
No handlers could be found for logger "AutoVNF-Traces"
2018-10-26 16:12:32,954 - One or more tasks failed, break the pipeline
2018-10-26 16:12:32,961 - Deployment upload-file: suneduvv-autovnf failed
2018-10-26 16:12:32,982 - Send Deployment notification for: suneduvv-autovnf-instance
 

Sample AutoVNF Logs:

2018-10-26 16:14:10,009 - Waiting for all workers to finish the transactions
2018-10-26 16:14:10,037 - Send Deployment notification for: suneduvv-autovnf-instance
2018-10-26 16:14:10,044 - Deployment upload-file: suneduvv-autovnf started
2018-10-26 16:14:10,050 - DOWNLOADING FILE TO STAGING FOLDER FROM /home/ubuntu/em-6_3_0_4765.qcow2 ========== /var/cisco/isos/em-6_3_0_4765.qcow2
2018-10-26 16:14:10,057 - URL IS NONE []
2018-10-26 16:14:10,063 - Skipping copy, file '/var/cisco/isos/em-6_3_0_4765.qcow2' already exists
2018-10-26 16:14:10,070 - I AM HERE56565656   ['vpc']
2018-10-26 16:14:10,087 - vnfrs for the given nsd is suneduvv-autovnf-esc suneduvv-autovnf-vpc
2018-10-26 16:14:10,100 - vnfr_vnfc is [{'vnfr': 'suneduvv-autovnf-esc', 'vnfc': 'esc', 'ip-addr': '90.90.90.32', 'floating-ip': None}, {'vnfr': 'suneduvv-autovnf-vpc', 'vnfc': 'cf', 'ip-addr': '90.90.90.47', 'floating-ip': None}, {'vnfr': 'suneduvv-autovnf-vpc', 'vnfc': 'em', 'ip-addr': '90.90.90.38', 'floating-ip': None}]
2018-10-26 16:14:10,106 - vnfr_vnfd is [{'vnfr': 'suneduvv-autovnf-esc', 'vnfd': 'esc'}, {'vnfr': 'suneduvv-autovnf-vpc', 'vnfd': 'vpc'}]
2018-10-26 16:14:10,112 - vnfdid_list is [{'vnfcid': 'cf', 'fl-ip': None, 'vnfdid': 'vpc', 'vnfr': 'suneduvv-autovnf-vpc', 'ips': [], 'ha-vip': '90.90.90.47'}, {'vnfcid': 'em', 'fl-ip': None, 'vnfdid': 'vpc', 'vnfr': 'suneduvv-autovnf-vpc', 'ips': [], 'ha-vip': '90.90.90.38'}]
/usr/lib/python2.7/dist-packages/Crypto/Cipher/blockalgo.py:141: FutureWarning: CTR mode needs counter parameter, not IV
  self._cipher = factory.new(key, *args, **kwargs)
2018-10-26 16:14:10,429 - Removing staged files from Autovnf
2018-10-26 16:14:10,508 - Files removed successfully
2018-10-26 16:14:10,967 - Copying the file to EM staging...
2018-10-26 16:14:47,430 - XML REQUEST COMMAND <ns0:vnf-put-file xmlns:ns0="http://www.cisco.com/usp/scm/vnf-utils">
  <file xmlns="http://www.cisco.com/usp/scm/vnf-utils">/tmp/staging/em-6_3_0_4765.qcow2</file>
  <vnfs xmlns="http://www.cisco.com/usp/scm/vnf-utils">
    <vnfd xmlns="http://www.cisco.com/usp/scm/vnf-utils">suneduvv-autovnf-vpc-suneduvv</vnfd>
  </vnfs>
  <destination-path xmlns="http://www.cisco.com/usp/scm/vnf-utils">/fash</destination-path>
</ns0:vnf-put-file>

2018-10-26 16:14:47,602 - rpc executed <?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:95ebbb6d-aa16-48ba-855b-b73cf14ac5a2" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><status xmlns='http://www.cisco.com/usp/scm/vnf-utils'>Success</status>
</rpc-reply>
2018-10-26 16:14:47,607 - XML REQUEST FOR STATUS COMMAND <show>
  <vnf-put-files-status xmlns="http://www.cisco.com/usp/scm/vnf-utils"/>
</show>

2018-10-26 16:14:47,676 - res is <?xml version="1.0" encoding="UTF-8"?><data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><vnf-put-files-status xmlns="http://www.cisco.com/usp/scm/vnf-utils"><puts><name>suneduvv-autovnf-vpc-suneduvv</name><file>/tmp/staging/em-6_3_0_4765.qcow2</file><destination-path>/fash</destination-path><start-time>2018-10-26T16:14:46.330</start-time><status>In progress</status></puts></vnf-put-files-status></data>
2018-10-26 16:14:47,681 - status is In progress
2018-10-26 16:14:47,799 - res is <?xml version="1.0" encoding="UTF-8"?><data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><vnf-put-files-status xmlns="http://www.cisco.com/usp/scm/vnf-utils"><puts><name>suneduvv-autovnf-vpc-suneduvv</name><file>/tmp/staging/em-6_3_0_4765.qcow2</file><destination-path>/fash</destination-path><start-time>2018-10-26T16:14:46.330</start-time><status>In progress</status></puts></vnf-put-files-status></data>
2018-10-26 16:14:47,805 - status is In progress
2018-10-26 16:14:47,874 - res is <?xml version="1.0" encoding="UTF-8"?><data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><vnf-put-files-status xmlns="http://www.cisco.com/usp/scm/vnf-utils"><puts><name>suneduvv-autovnf-vpc-suneduvv</name><file>/tmp/staging/em-6_3_0_4765.qcow2</file><destination-path>/fash</destination-path><start-time>2018-10-26T16:14:46.330</start-time><status>In progress</status></puts></vnf-put-files-status></data>
2018-10-26 16:14:47,879 - status is In progress
2018-10-26 16:14:47,997 - res is <?xml version="1.0" encoding="UTF-8"?><data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><vnf-put-files-status xmlns="http://www.cisco.com/usp/scm/vnf-utils"><puts><name>suneduvv-autovnf-vpc-suneduvv</name><file>/tmp/staging/em-6_3_0_4765.qcow2</file><destination-path>/fash</destination-path><start-time>2018-10-26T16:14:46.330</start-time><status>Failed</status></puts></vnf-put-files-status></data>
2018-10-26 16:14:48,009 - Deployment upload-file: suneduvv-autovnf failed
2018-10-26 16:14:48,027 - Send Deployment notification for: suneduvv-autovnf-instance
2018-10-26 16:14:48,040 - One or more tasks failed, break the pipeline
2018-10-26 16:14:48,046 - Deployment upload-file: suneduvv-autovnf failed
2018-10-26 16:14:48,103 - Send Deployment notification for: suneduvv-autovnf-instance