X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Fvnfs%2Fconst.py;h=da338f67cf406fb51e482e2bc2b9186ab0521c3a;hb=f30925c952e7a9e2dc5f81c0dfc3dbfdf2c812f5;hp=bb114e4a30b8843b0dd8f468d1445f67273beb9f;hpb=9c76915d86fbedb50386708542c592d09bec4f39;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/vnfs/const.py b/lcm/lcm/nf/vnfs/const.py index bb114e4a..da338f67 100644 --- a/lcm/lcm/nf/vnfs/const.py +++ b/lcm/lcm/nf/vnfs/const.py @@ -18,342 +18,79 @@ VNF_STATUS = enum(NULL='null', INSTANTIATING="instantiating", INACTIVE='inactive FAILED="failed", TERMINATING="terminating", SCALING="scaling", OPERATING="operating", UPDATING="updating", HEALING="healing") -# inst_req_data inst_req_data = { "flavourId": "flavour_1", "instantiationLevelId": "instantiationLevel_1", "extVirtualLinks": [ - # { - # "vlInstanceId": "1", - # "vim": { - # "vimInfoId": "1", - # "vimId": "1", - # "interfaceInfo": { - # "vimType": "vim", - # "apiVersion": "v2", - # "protocolType": "http" - # }, - # "accessInfo": { - # "tenant": "tenant_vCPE", - # "username": "vCPE", - # "password": "vCPE_321" - # }, - # "interfaceEndpoint": "http://10.43.21.105:80/" - # }, - # "resourceId": "1246", - # "extCps": [ - # { - # "cpdId": "11", - # "addresses": [ - # { - # "addressType": "MAC", - # "l2AddressData": "00:f3:43:20:a2:a3" - # }, - # { - # "addressType": "IP", - # "l3AddressData": { - # "iPAddressType": "IPv4", - # "iPAddress": "192.168.104.2" - # } - # } - # ], - # "numDynamicAddresses": 0 - # } - # ] - # }, { - "vlInstanceId": '55', - "resourceId": '55_network', - "resourceSubnetId": '55_subnet', - "cpdId": 'cpId1', + "vlInstanceId": "1", "vim": { - "vimid": '55_vimid' - } - } - ], - "localizationLanguage": "en_US", - "additionalParams": {"inputs": {"key1":"test1","key2":"test2"}, - "extVirtualLinks": [{ - "vlInstanceId": '55', - "resourceId": '55_network', - "resourceSubnetId": '55_subnet', - "cpdId": 'cpId1', - "vim": { - "vimid": '55_vimid' - } - }]} -} - - -# vnfd_rawdata -vnfd_rawdata = { - "rawData": { - "instance": { - "metadata": { - "designer": "sdno", - "name": "underlayervpn", - "csarVersion": "1.0", - "csarType": "SSAR", - "csarProvider": "huawei", - "version": "1.0", - "type": "SSAR", - "id": "ns_underlayervpn_1_0" - }, - "nodes": [ - { - "id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", - "type_name": "tosca.nodes.sdn.l3ac", - "template_name": "ac2", - "properties": { - "ip": { - "type_name": "string" - }, - "route": { - "type_name": "string" - }, - "port": { - "type_name": "string" - }, - "svlan": { - "type_name": "string" - } - }, - "interfaces": [ - { - "name": "Standard", - "type_name": "tosca.interfaces.node.lifecycle.Standard" - } - ], - "capabilities": [ - { - "name": "feature", - "type_name": "tosca.capabilities.Node" - }, - { - "name": "ac", - "type_name": "tosca.capabilities.sdn.ac" - } - ], - "relationships": [ - { - "target_node_id": "pe2_go3vo1ctxr1vlbl0ij8stbtj6", - "target_capability_name": "feature" - }, - { - "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", - "target_capability_name": "feature" - } - ] + "vimInfoId": "1", + "vimId": "1", + "interfaceInfo": { + "vimType": "vim", + "apiVersion": "v2", + "protocolType": "http" }, - { - "id": "ac1_jqows1ai0j0cmwk9jdvuknt97", - "type_name": "tosca.nodes.sdn.l3ac", - "template_name": "ac1", - "properties": { - "ip": { - "type_name": "string" - }, - "route": { - "type_name": "string" - }, - "port": { - "type_name": "string" - }, - "svlan": { - "type_name": "string" - } - }, - "interfaces": [ - { - "name": "Standard", - "type_name": "tosca.interfaces.node.lifecycle.Standard" - } - ], - "capabilities": [ - { - "name": "feature", - "type_name": "tosca.capabilities.Node" - }, - { - "name": "ac", - "type_name": "tosca.capabilities.sdn.ac" - } - ], - "relationships": [ - { - "target_node_id": "pe1_e58ekps6m45g6w9egs9lue2j7", - "target_capability_name": "feature" - }, - { - "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", - "target_capability_name": "feature" - } - ] + "accessInfo": { + "tenant": "tenant_vCPE", + "username": "vCPE", + "password": "vCPE_321" }, + "interfaceEndpoint": "http://10.43.21.105:80/" + }, + "resourceId": "1246", + "extCps": [ { - "id": "vpn_ie0xim076f7cje67fvrrq9tg1", - "type_name": "tosca.nodes.sdn.underlayVPN", - "template_name": "vpn", - "properties": { - "serviceType": { - "type_name": "string" - }, - "description": { - "type_name": "string" - }, - "name": { - "type_name": "string" - }, - "topology": { - "type_name": "string" - } - }, - "interfaces": [ + "cpdId": "11", + "addresses": [ { - "name": "Standard", - "type_name": "tosca.interfaces.node.lifecycle.Standard" - } - ], - "capabilities": [ - { - "name": "feature", - "type_name": "tosca.capabilities.Node" - } - ], - "relationships": [ - { - "target_node_id": "ac1_jqows1ai0j0cmwk9jdvuknt97", - "target_capability_name": "feature" + "addressType": "MAC", + "l2AddressData": "00:f3:43:20:a2:a3" }, { - "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", - "target_capability_name": "feature" - } - ] - }, - { - "id": "pe1_e58ekps6m45g6w9egs9lue2j7", - "type_name": "tosca.nodes.sdn.l3pe", - "template_name": "pe1", - "properties": { - "id": { - "type_name": "string" - } - }, - "interfaces": [ - { - "name": "Standard", - "type_name": "tosca.interfaces.node.lifecycle.Standard" - } - ], - "capabilities": [ - { - "name": "feature", - "type_name": "tosca.capabilities.Node" - }, - { - "name": "pe", - "type_name": "tosca.capabilities.sdn.pe" - } - ] - }, - { - "id": "pe2_go3vo1ctxr1vlbl0ij8stbtj6", - "type_name": "tosca.nodes.sdn.l3pe", - "template_name": "pe2", - "properties": { - "id": { - "type_name": "string" - } - }, - "interfaces": [ - { - "name": "Standard", - "type_name": "tosca.interfaces.node.lifecycle.Standard" + "addressType": "IP", + "l3AddressData": { + "iPAddressType": "IPv4", + "iPAddress": "192.168.104.2" + } } ], - "capabilities": [ - { - "name": "feature", - "type_name": "tosca.capabilities.Node" - }, - { - "name": "pe", - "type_name": "tosca.capabilities.sdn.pe" - } - ] - } - ], - "substitution": { - "node_type_name": "tosca.nodes.sdn.ext.NS.ns_underlayervpn" - }, - "inputs": { - "ac2_ip": { - "type_name": "string", - "description": "ac2_ipofunderlayvpn" - }, - "ac2_route": { - "type_name": "string", - "description": "ac2_routeofunderlayvpn" - }, - "serviceType": { - "type_name": "string", - "description": "serviceTypeofunderlayvpn" - }, - "description": { - "type_name": "string", - "description": "descriptionofunderlayvpn" - }, - "pe2_id": { - "type_name": "string", - "description": "pe2_idofunderlayvpn" - }, - "ac1_route": { - "type_name": "string", - "description": "ac1_routeofunderlayvpn" - }, - "ac1_svlan": { - "type_name": "integer", - "description": "ac1_svlanofunderlayvpn" - }, - "name": { - "type_name": "string", - "description": "Nameofunderlayervpn" - }, - "ac1_ip": { - "type_name": "string", - "description": "ac1_ipofunderlayvpn" - }, - "ac2_port": { - "type_name": "string", - "description": "ac2_portofunderlayvpn" - }, - "pe1_id": { - "type_name": "string", - "description": "pe1_idofunderlayvpn" - }, - "technology": { - "type_name": "string", - "description": "technologyofunderlayvpn" - }, - "ac1_port": { - "type_name": "string", - "description": "ac1_portofunderlayvpn" - }, - "ac2_svlan": { - "type_name": "integer", - "description": "ac2_svlanofunderlayvpn" - }, - "topology": { - "type_name": "string", - "description": "topologyofunderlayvpn" + "numDynamicAddresses": 0 } + ] + }, + { + "vlInstanceId": '55', + "resourceId": '55_network', + "resourceSubnetId": '55_subnet', + "cpdId": 'cpId1', + "vim": { + "vimId": '55_vimid' } } + ], + "localizationLanguage": "en_US", + "additionalParams": { + "inputs": { + "key1": "test1", + "key2": "test2" + }, + "extVirtualLinks": [ + { + "vlInstanceId": '55', + "resourceId": '55_network', + "resourceSubnetId": '55_subnet', + "cpdId": 'cpId1', + "vim": { + "vimId": '55_vimid' + } + } + ] } } -# vnfd_model_dict + vnfd_model_dict = { 'metadata': { 'vendor': u'zte', @@ -771,7 +508,7 @@ c6_data_create_port = { } # create_flavor -c7_data_create_flavor ={ +c7_data_create_flavor = { "returnCode": 0, "vimId": "11111", "vimName": "11111", @@ -830,3 +567,357 @@ c10_data_get_vm = { "tenantId": "tenant1", "status": "ACTIVE" } + +vnfpackage_info = { + "volume_storages": [], + "inputs": { + "pe1_id": { + "type": "string", + "description": "pe1_idofunderlayvpn" + }, + "pe2_id": { + "type": "string", + "description": "pe2_idofunderlayvpn" + }, + "serviceType": { + "type": "string", + "description": "serviceTypeofunderlayvpn" + }, + "description": { + "type": "string", + "description": "descriptionofunderlayvpn" + }, + "ac2_route": { + "type": "string", + "description": "ac2_routeofunderlayvpn" + }, + "ac1_route": { + "type": "string", + "description": "ac1_routeofunderlayvpn" + }, + "ac1_svlan": { + "type": "integer", + "description": "ac1_svlanofunderlayvpn" + }, + "ac2_ip": { + "type": "string", + "description": "ac2_ipofunderlayvpn" + }, + "ac1_ip": { + "type": "string", + "description": "ac1_ipofunderlayvpn" + }, + "ac2_port": { + "type": "string", + "description": "ac2_portofunderlayvpn" + }, + "topology": { + "type": "string", + "description": "topologyofunderlayvpn" + }, + "technology": { + "type": "string", + "description": "technologyofunderlayvpn" + }, + "ac1_port": { + "type": "string", + "description": "ac1_portofunderlayvpn" + }, + "ac2_svlan": { + "type": "integer", + "description": "ac2_svlanofunderlayvpn" + }, + "name": { + "type": "string", + "description": "Nameofunderlayervpn" + } + }, + "vdus": [], + "image_files": [], + "routers": [], + "local_storages": [], + "vnf_exposed": { + "external_cps": [], + "forward_cps": [] + }, + "vls": [], + "cps": [], + "metadata": { + "designer": "sdno", + "name": "underlayervpn", + "csarVersion": "1.0", + "csarType": "SSAR", + "csarProvider": "huawei", + "version": "1.0", + "type": "SSAR", + "id": "ns_underlayervpn_1_0" + } +} + +# # vnfd_rawdata +# vnfd_rawdata = { +# "rawData": { +# "instance": { +# "metadata": { +# "designer": "sdno", +# "name": "underlayervpn", +# "csarVersion": "1.0", +# "csarType": "SSAR", +# "csarProvider": "huawei", +# "version": "1.0", +# "type": "SSAR", +# "id": "ns_underlayervpn_1_0" +# }, +# "nodes": [ +# { +# "id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", +# "type_name": "tosca.nodes.sdn.l3ac", +# "template_name": "ac2", +# "properties": { +# "ip": { +# "type_name": "string" +# }, +# "route": { +# "type_name": "string" +# }, +# "port": { +# "type_name": "string" +# }, +# "svlan": { +# "type_name": "string" +# } +# }, +# "interfaces": [ +# { +# "name": "Standard", +# "type_name": "tosca.interfaces.node.lifecycle.Standard" +# } +# ], +# "capabilities": [ +# { +# "name": "feature", +# "type_name": "tosca.capabilities.Node" +# }, +# { +# "name": "ac", +# "type_name": "tosca.capabilities.sdn.ac" +# } +# ], +# "relationships": [ +# { +# "target_node_id": "pe2_go3vo1ctxr1vlbl0ij8stbtj6", +# "target_capability_name": "feature" +# }, +# { +# "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", +# "target_capability_name": "feature" +# } +# ] +# }, +# { +# "id": "ac1_jqows1ai0j0cmwk9jdvuknt97", +# "type_name": "tosca.nodes.sdn.l3ac", +# "template_name": "ac1", +# "properties": { +# "ip": { +# "type_name": "string" +# }, +# "route": { +# "type_name": "string" +# }, +# "port": { +# "type_name": "string" +# }, +# "svlan": { +# "type_name": "string" +# } +# }, +# "interfaces": [ +# { +# "name": "Standard", +# "type_name": "tosca.interfaces.node.lifecycle.Standard" +# } +# ], +# "capabilities": [ +# { +# "name": "feature", +# "type_name": "tosca.capabilities.Node" +# }, +# { +# "name": "ac", +# "type_name": "tosca.capabilities.sdn.ac" +# } +# ], +# "relationships": [ +# { +# "target_node_id": "pe1_e58ekps6m45g6w9egs9lue2j7", +# "target_capability_name": "feature" +# }, +# { +# "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", +# "target_capability_name": "feature" +# } +# ] +# }, +# { +# "id": "vpn_ie0xim076f7cje67fvrrq9tg1", +# "type_name": "tosca.nodes.sdn.underlayVPN", +# "template_name": "vpn", +# "properties": { +# "serviceType": { +# "type_name": "string" +# }, +# "description": { +# "type_name": "string" +# }, +# "name": { +# "type_name": "string" +# }, +# "topology": { +# "type_name": "string" +# } +# }, +# "interfaces": [ +# { +# "name": "Standard", +# "type_name": "tosca.interfaces.node.lifecycle.Standard" +# } +# ], +# "capabilities": [ +# { +# "name": "feature", +# "type_name": "tosca.capabilities.Node" +# } +# ], +# "relationships": [ +# { +# "target_node_id": "ac1_jqows1ai0j0cmwk9jdvuknt97", +# "target_capability_name": "feature" +# }, +# { +# "target_node_id": "ac2_fdhrbk3dvan8hl5wifm9lp1e9", +# "target_capability_name": "feature" +# } +# ] +# }, +# { +# "id": "pe1_e58ekps6m45g6w9egs9lue2j7", +# "type_name": "tosca.nodes.sdn.l3pe", +# "template_name": "pe1", +# "properties": { +# "id": { +# "type_name": "string" +# } +# }, +# "interfaces": [ +# { +# "name": "Standard", +# "type_name": "tosca.interfaces.node.lifecycle.Standard" +# } +# ], +# "capabilities": [ +# { +# "name": "feature", +# "type_name": "tosca.capabilities.Node" +# }, +# { +# "name": "pe", +# "type_name": "tosca.capabilities.sdn.pe" +# } +# ] +# }, +# { +# "id": "pe2_go3vo1ctxr1vlbl0ij8stbtj6", +# "type_name": "tosca.nodes.sdn.l3pe", +# "template_name": "pe2", +# "properties": { +# "id": { +# "type_name": "string" +# } +# }, +# "interfaces": [ +# { +# "name": "Standard", +# "type_name": "tosca.interfaces.node.lifecycle.Standard" +# } +# ], +# "capabilities": [ +# { +# "name": "feature", +# "type_name": "tosca.capabilities.Node" +# }, +# { +# "name": "pe", +# "type_name": "tosca.capabilities.sdn.pe" +# } +# ] +# } +# ], +# "substitution": { +# "node_type_name": "tosca.nodes.sdn.ext.NS.ns_underlayervpn" +# }, +# "inputs": { +# "ac2_ip": { +# "type_name": "string", +# "description": "ac2_ipofunderlayvpn" +# }, +# "ac2_route": { +# "type_name": "string", +# "description": "ac2_routeofunderlayvpn" +# }, +# "serviceType": { +# "type_name": "string", +# "description": "serviceTypeofunderlayvpn" +# }, +# "description": { +# "type_name": "string", +# "description": "descriptionofunderlayvpn" +# }, +# "pe2_id": { +# "type_name": "string", +# "description": "pe2_idofunderlayvpn" +# }, +# "ac1_route": { +# "type_name": "string", +# "description": "ac1_routeofunderlayvpn" +# }, +# "ac1_svlan": { +# "type_name": "integer", +# "description": "ac1_svlanofunderlayvpn" +# }, +# "name": { +# "type_name": "string", +# "description": "Nameofunderlayervpn" +# }, +# "ac1_ip": { +# "type_name": "string", +# "description": "ac1_ipofunderlayvpn" +# }, +# "ac2_port": { +# "type_name": "string", +# "description": "ac2_portofunderlayvpn" +# }, +# "pe1_id": { +# "type_name": "string", +# "description": "pe1_idofunderlayvpn" +# }, +# "technology": { +# "type_name": "string", +# "description": "technologyofunderlayvpn" +# }, +# "ac1_port": { +# "type_name": "string", +# "description": "ac1_portofunderlayvpn" +# }, +# "ac2_svlan": { +# "type_name": "integer", +# "description": "ac2_svlanofunderlayvpn" +# }, +# "topology": { +# "type_name": "string", +# "description": "topologyofunderlayvpn" +# } +# } +# } +# } +# }