summaryrefslogtreecommitdiffstats
path: root/lcm/lcm/samples/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'lcm/lcm/samples/tests.py')
-rw-r--r--lcm/lcm/samples/tests.py49
1 files changed, 25 insertions, 24 deletions
diff --git a/lcm/lcm/samples/tests.py b/lcm/lcm/samples/tests.py
index 47e23533..a1d13be4 100644
--- a/lcm/lcm/samples/tests.py
+++ b/lcm/lcm/samples/tests.py
@@ -87,7 +87,18 @@ inst_res_data = {
"vimid": "f1e33529-4a88-4155-9d7a-893cf2c80527",
"tenant": "vnfm",
"availability_zone": "zone1",
- "host": "host1"
+ "host": "host1",
+ "vnfId": "",
+ "vnfName": "",
+ "cloudOwner": "",
+ "cloudRegionId": "",
+ "vduInfo": [
+ {
+ "vduName": "VDU_vbng_0",
+ "flavorName": "flavor_1",
+ "directive": "",
+ },
+ ]
},
"descrption": "the virtual machine of vNat",
"boot_order": [
@@ -154,7 +165,7 @@ inst_res_data = {
"external_cps": [
{
"key_name": "sriov_plane",
- "cp_id": "SRIOV_Port"
+ "cp_id": "sriov-support"
}
],
"forward_cps": [
@@ -215,15 +226,15 @@ inst_res_data = {
},
}
],
- "vnic_type": "normal",
+ "vnic_type": "direct",
"role": "root",
"virtual_network_interface_requirements": [
{
- "requirement": {
- "SRIOV": "true"
+ "network_interface_requirements": {
+ "interfaceType": '{"schema-version": "0", "schema-location":"", "platform-id": "generic", "mandatory": false, "configuration-value": "SR-IOV"}'
},
"support_mandatory": False,
- "name": "sriov",
+ "name": "sriov-support",
"description": "sriov"
}
],
@@ -304,28 +315,17 @@ c4_data_create_port = {
"nodeId": "",
"id": "456"
}
+c5_data_create_flavor = {
+ "vimId": "f1e33529-4a88-4155-9d7a-893cf2c80527",
+ "nodeId": "",
+ "id": "6456",
+}
c5_data_get_flavor = {
"flavor": [
{
"flavor-id": "111111",
- "flavor-name": "onap.large",
- "hpa-capabilities":
- {
- "hpa-capability":
- [
- {
- "hpa-capability-id": "1243",
- "hpa-feature-attributes":
- [
- {
- "hpa-attribute-key": "memoryPageSize",
- "hpa-attribute-value": '{"value": "2", "unit": "MB"}'
- }
- ]
- }
- ]
- }
+ "flavor-name": "flavor_1",
}
]
}
@@ -373,6 +373,7 @@ class SampleViewTest(unittest.TestCase):
r3_data_create_subnet = [0, json.JSONEncoder().encode(c3_data_create_subnet), '200']
r4_data_create_port = [0, json.JSONEncoder().encode(c4_data_create_port), '200']
r5_data_get_flavor = [0, json.JSONEncoder().encode(c5_data_get_flavor), '200']
+ r5_data_create_flavor = [0, json.JSONEncoder().encode(c5_data_create_flavor), '200']
r6_data_list_image = [0, json.JSONEncoder().encode(c6_data_list_image), '200']
r6_data_create_vm = [0, json.JSONEncoder().encode(c6_data_create_vm), '200']
r6_data_get_vm = [0, json.JSONEncoder().encode(c6_data_get_vm), '200']
@@ -382,7 +383,7 @@ class SampleViewTest(unittest.TestCase):
r2_data_create_network,
r3_data_create_subnet,
r4_data_create_port,
- r5_data_get_flavor,
+ r5_data_get_flavor, r5_data_create_flavor,
r6_data_list_image, r6_data_create_vm, r6_data_get_vm]
resp = self.client.post(inst_res_url, data=json.dumps(inst_res_data), content_type='application/json')
self.failUnlessEqual(status.HTTP_204_NO_CONTENT, resp.status_code)