Merge "Remove support for legacy VNFD templates."
This commit is contained in:
commit
6e729d58d8
|
@ -117,7 +117,7 @@ Create vnfd - Create a vnfd entry based on the vnfd template.
|
|||
"tenant_id": "bb6a3be1021a4746ab727a6c9296e797",
|
||||
"description": "OpenWRT router",
|
||||
"attributes": {
|
||||
"vnfd": "template_name: sample-vnfd\ndescription: demo-example\n\nservice_properties:\n Id: sample-vnfd\n vendor: tacker\n version: 1\n\nvdus:\n vdu1:\n id: vdu1\n vm_image: cirros-0.3.4-x86_64-uec\n instance_type: m1.tiny\n\n network_interfaces:\n management:\n network: net_mgmt\n management: true\n pkt_in:\n network: net0\n pkt_out:\n network: net1\n\n placement_policy:\n availability_zone: nova\n\n auto-scaling: noop\n\n config:\n param0: key0\n param1: key1\n"
|
||||
"vnfd": "description: OpenWRT with services\nmetadata: {template_name: OpenWRT}\ntopology_template:\n node_templates:\n CP1:\n properties: {anti_spoofing_protection: false, management: true, order: 0}\n requirements:\n - virtualLink: {node: VL1}\n - virtualBinding: {node: VDU1}\n type: tosca.nodes.nfv.CP.Tacker\n CP2:\n properties: {anti_spoofing_protection: false, order: 1}\n requirements:\n - virtualLink: {node: VL2}\n - virtualBinding: {node: VDU1}\n type: tosca.nodes.nfv.CP.Tacker\n CP3:\n properties: {anti_spoofing_protection: false, order: 2}\n requirements:\n - virtualLink: {node: VL3}\n - virtualBinding: {node: VDU1}\n type: tosca.nodes.nfv.CP.Tacker\n VDU1:\n capabilities:\n nfv_compute:\n properties: {disk_size: 1 GB, mem_size: 512 MB, num_cpus: 1}\n properties:\n config: 'param0: key1\n\n param1: key2\n\n '\n image: OpenWRT\n mgmt_driver: openwrt\n monitoring_policy:\n actions: {failure: respawn}\n name: ping\n parameters: {count: 3, interval: 10}\n type: tosca.nodes.nfv.VDU.Tacker\n VL1:\n properties: {network_name: net_mgmt, vendor: Tacker}\n type: tosca.nodes.nfv.VL\n VL2:\n properties: {network_name: net0, vendor: Tacker}\n type: tosca.nodes.nfv.VL\n VL3:\n properties: {network_name: net1, vendor: Tacker}\n type: tosca.nodes.nfv.VL\ntosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0\n"
|
||||
},
|
||||
"name": "OpenWRT"
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
template_name: sample-vnfd-monitoring
|
||||
description: demo-example
|
||||
|
||||
service_properties:
|
||||
Id: sample-vnfd
|
||||
vendor: tacker
|
||||
version: 1
|
||||
|
||||
vdus:
|
||||
vdu1:
|
||||
id: vdu1
|
||||
vm_image: cirros-0.3.4-x86_64-uec
|
||||
instance_type: m1.tiny
|
||||
config_drive: true
|
||||
user_data_format: RAW
|
||||
user_data: |
|
||||
#!/bin/sh
|
||||
df -h > /home/cirros/diskinfo
|
||||
sleep 90
|
||||
sudo ifdown eth0
|
||||
|
||||
network_interfaces:
|
||||
management:
|
||||
network: net_mgmt
|
||||
management: true
|
||||
pkt_in:
|
||||
network: net0
|
||||
pkt_out:
|
||||
network: net1
|
||||
|
||||
placement_policy:
|
||||
availability_zone: nova
|
||||
|
||||
auto-scaling: noop
|
||||
monitoring_policy: ping
|
||||
failure_policy: respawn
|
||||
|
||||
config:
|
||||
param0: key0
|
||||
param1: key1
|
|
@ -1,33 +0,0 @@
|
|||
template_name: sample-vnfd-no-monitoring
|
||||
description: demo-example
|
||||
|
||||
service_properties:
|
||||
Id: sample-vnfd
|
||||
vendor: tacker
|
||||
version: 1
|
||||
type:
|
||||
- firewall
|
||||
|
||||
vdus:
|
||||
vdu1:
|
||||
id: vdu1
|
||||
vm_image: cirros-0.3.4-x86_64-uec
|
||||
instance_type: m1.tiny
|
||||
|
||||
network_interfaces:
|
||||
management:
|
||||
network: net_mgmt
|
||||
management: true
|
||||
pkt_in:
|
||||
network: net0
|
||||
pkt_out:
|
||||
network: net1
|
||||
|
||||
placement_policy:
|
||||
availability_zone: nova
|
||||
|
||||
auto-scaling: noop
|
||||
|
||||
config:
|
||||
param0: key0
|
||||
param1: key1
|
|
@ -1,14 +0,0 @@
|
|||
vdus:
|
||||
vdu1:
|
||||
param:
|
||||
vm_image: cirros-0.3.4-x86_64-uec
|
||||
flavor: m1.tiny
|
||||
service: firewall
|
||||
pkt_in_network: net0
|
||||
pkt_out_network: net1
|
||||
zone: nova
|
||||
management: True
|
||||
network: net_mgmt
|
||||
service_properties:
|
||||
param:
|
||||
vendor: tacker
|
|
@ -25,11 +25,7 @@ def _get_template(name):
|
|||
f = codecs.open(filename, encoding='utf-8', errors='strict')
|
||||
return f.read()
|
||||
|
||||
vnfd_openwrt = _get_template('openwrt.yaml')
|
||||
tosca_vnfd_openwrt = _get_template('test_tosca_openwrt.yaml')
|
||||
vnfd_ipparams_template = _get_template('vnf_cirros_template_ipaddr.yaml')
|
||||
ipparams = _get_template('vnf_cirros_param_values_ipaddr.yaml')
|
||||
userdata_params = _get_template('vnf_cirros_param_values_user_data.yaml')
|
||||
config_data = _get_template('config_data.yaml')
|
||||
update_config_data = _get_template('update_config_data.yaml')
|
||||
vnffgd_template = yaml.load(_get_template('vnffgd_template.yaml'))
|
||||
|
@ -79,7 +75,7 @@ def get_dummy_device_obj():
|
|||
'description': u'OpenWRT with services',
|
||||
'tenant_id': u'ad7ebc56538745a08ef7c5e97f8bd437',
|
||||
'mgmt_driver': u'openwrt',
|
||||
'attributes': {u'vnfd': vnfd_openwrt},
|
||||
'attributes': {u'vnfd': tosca_vnfd_openwrt},
|
||||
'id': u'fb048660-dc1b-4f0f-bd89-b023666650ec',
|
||||
'name': u'openwrt_services'},
|
||||
'mgmt_url': None, 'service_context': [],
|
||||
|
@ -109,29 +105,6 @@ def get_dummy_vnf_update_config():
|
|||
return {'vnf': {'attributes': {'config': update_config_data}}}
|
||||
|
||||
|
||||
def get_dummy_device_obj_ipaddr_attr():
|
||||
return {'status': 'PENDING_CREATE',
|
||||
'vnfd': {'service_types':
|
||||
[{'service_type': u'vnfd', 'id':
|
||||
u'16f8b3f7-a9ff-4338-bbe5-eee48692c468'}, {'service_type':
|
||||
u'router', 'id': u'58878cb7-689f-47a5-9c2d-654e49e2357f'},
|
||||
{'service_type': u'firewall', 'id':
|
||||
u'd016144f-42a6-44f4-93f6-52d201998916'}],
|
||||
'description': u'Parameterized VNF descriptor for IP addresses',
|
||||
'tenant_id': u'4dd6c1d7b6c94af980ca886495bcfed0',
|
||||
'mgmt_driver': u'noop',
|
||||
'attributes': {u'vnfd': vnfd_ipparams_template},
|
||||
'id': u'24c31ea1-2e28-4de2-a6cb-8d389a502c75', 'name': u'ip_vnfd'},
|
||||
'name': u'test_ip',
|
||||
'tenant_id': u'8273659b56fc46b68bd05856d1f08d14',
|
||||
'id': 'd1337add-d5a1-4fd4-9447-bb9243c8460b',
|
||||
'instance_id': None, 'mgmt_url': None, 'service_context': [],
|
||||
'services': [],
|
||||
'attributes': {u'param_values': ipparams},
|
||||
'vnfd_id': u'24c31ea1-2e28-4de2-a6cb-8d389a502c75',
|
||||
'description': u'Parameterized VNF descriptor for IP addresses'}
|
||||
|
||||
|
||||
def get_vim_obj():
|
||||
return {'vim': {'type': 'openstack', 'auth_url':
|
||||
'http://localhost:5000', 'vim_project': {'name':
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
template_name: OpenWRT
|
||||
description: OpenWRT with services
|
||||
|
||||
vdus:
|
||||
vdu1:
|
||||
id: vdu1
|
||||
vm_image: cirros-0.3.2-x86_64-uec
|
||||
instance_type: m1.tiny
|
||||
service_type: firewall
|
||||
mgmt_driver: openwrt
|
||||
|
||||
network_interfaces:
|
||||
management:
|
||||
network: net_mgmt
|
||||
management: True
|
||||
pkt_in:
|
||||
network: net0
|
||||
pkt_out:
|
||||
network: net1
|
||||
|
||||
placement_policy:
|
||||
availability_zone: nova
|
||||
|
||||
auto-scaling: noop
|
||||
|
||||
monitoring_policy: noop
|
||||
failure_policy: noop
|
||||
|
||||
monitoring_parameter:
|
||||
a:
|
||||
|
||||
config:
|
||||
param0: key0
|
||||
param1: key1
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
vdus:
|
||||
vdu1:
|
||||
param:
|
||||
vm_image: cirros-0.3.4-x86_64-uec
|
||||
flavor: m1.tiny
|
||||
service: firewall
|
||||
pkt_in_network: net0
|
||||
pkt_out_network: net1
|
||||
zone: nova
|
||||
management: True
|
||||
network: net_mgmt
|
||||
mgmt_ip:
|
||||
- 192.168.120.98
|
||||
pkt_in_ip:
|
||||
- 10.10.0.98
|
||||
pkt_out_ip:
|
||||
- 10.10.1.98
|
|
@ -1,17 +0,0 @@
|
|||
vdus:
|
||||
vdu1:
|
||||
param:
|
||||
vm_image: cirros-0.3.4-x86_64-uec
|
||||
flavor: m1.tiny
|
||||
service: firewall
|
||||
pkt_in_network: net0
|
||||
pkt_out_network: net1
|
||||
zone: nova
|
||||
management: True
|
||||
network: net_mgmt
|
||||
user_data_format: RAW
|
||||
key_name: keyName
|
||||
user_data: |
|
||||
#!/bin/sh
|
||||
echo "my hostname is `hostname`" > /tmp/hostname
|
||||
df -h > /home/cirros/diskinfo
|
|
@ -1,42 +0,0 @@
|
|||
template_name: cirros_ipaddr_template
|
||||
description: Parameterized VNF descriptor for IP addresses
|
||||
|
||||
service_properties:
|
||||
Id: cirros
|
||||
vendor: ACME
|
||||
version: 1
|
||||
type:
|
||||
- router
|
||||
- firewall
|
||||
|
||||
vdus:
|
||||
vdu1:
|
||||
id: vdu1
|
||||
vm_image: { get_input: vm_image }
|
||||
instance_type: {get_input: flavor }
|
||||
service_type: {get_input: service}
|
||||
mgmt_driver: noop
|
||||
|
||||
network_interfaces:
|
||||
management:
|
||||
network: { get_input: network }
|
||||
management: { get_input: management }
|
||||
addresses: { get_input: mgmt_ip}
|
||||
pkt_in:
|
||||
network: { get_input: pkt_in_network }
|
||||
addresses: { get_input: pkt_in_ip}
|
||||
pkt_out:
|
||||
network: { get_input: pkt_out_network }
|
||||
addresses: { get_input: pkt_out_ip}
|
||||
|
||||
placement_policy:
|
||||
availability_zone: { get_input: zone }
|
||||
|
||||
auto-scaling: noop
|
||||
|
||||
monitoring_policy: noop
|
||||
failure_policy: noop
|
||||
|
||||
config:
|
||||
param0: key0
|
||||
param1: key1
|
Loading…
Reference in New Issue