Newer
Older
DELETE Continue operation task
log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue
Set Global Variable ${response} ${outputResponse}
POST Continue operation task
Log Continue a NS lifecycle operation task
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/continue
Set Global Variable ${response} ${outputResponse}
GET Fail operation task
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail
Set Global Variable ${response} ${outputResponse}
PUT Fail operation task
log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail
Set Global Variable ${response} ${outputResponse}
PATCH Fail operation task
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail
Set Global Variable ${response} ${outputResponse}
DELETE Fail operation task
log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail
Set Global Variable ${response} ${outputResponse}
POST Fail operation task
Log Fail a NS lifecycle operation task
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/fail
Set Global Variable ${response} ${outputResponse}
GET Cancel operation task
log Trying to perform a GET. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel
Set Global Variable ${response} ${outputResponse}
PUT Cancel operation task
log Trying to perform a PUT. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel
Set Global Variable ${response} ${outputResponse}
PATCH Cancel operation task
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel
Set Global Variable ${response} ${outputResponse}
DELETE Cancel operation task
Log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel
Set Global Variable ${response} ${outputResponse}
POST Cancel operation task
Log Cancel a NS lifecycle operation task
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/ns_lcm_op_occs/${nsLcmOpOccId}/cancel
Set Global Variable ${response} ${outputResponse}
PUT subscriptions
Log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
Set Global Variable ${response} ${outputResponse}
PATCH subscriptions
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
Set Global Variable ${response} ${outputResponse}
DELETE subscriptions
Log Trying to perform a DELETE. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
Set Global Variable ${response} ${outputResponse}
Log Create subscription instance by POST to ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File
${template}= Get File jsons/LccnSubscriptionRequest.json
${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID}
Log Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}= Create Mock Request Matcher GET ${callback_endpoint}
&{notification_response}= Create Mock Response status_code=204
Log Issue the subscription request
Create Mock Expectation ${notification_request} ${notification_response}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body}
Set Global Variable ${response} ${outputResponse}
Clear Requests ${callback_endpoint}
POST subscriptions DUPLICATION
Log Trying to create a subscription with an already created content
Pass Execution If ${NFVO_DUPLICATION} == 0 NFVO is not permitting duplication. Skipping the test
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File
${template}= Get File jsons/LccnSubscriptionRequest.json
${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID}
Log Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}= Create Mock Request Matcher GET ${callback_endpoint}
&{notification_response}= Create Mock Response status_code=204
Log Issue the subscription request
Create Mock Expectation ${notification_request} ${notification_response}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body}
Set Global Variable ${response} ${outputResponse}
Clear Requests ${callback_endpoint}
POST subscriptions NO DUPLICATION
Log Trying to create a subscription with an already created content
Pass Execution If ${NFVO_DUPLICATION} == 1 NFVO is permitting duplication.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Run Keyword If ${check_descriptors} == 1 PARSE the NS Descriptor File
${template}= Get File jsons/LccnSubscriptionRequest.json
${body}= Format String ${template} callbackUri=${callback_uri} callbackEndpoint=${callback_endpoint} callbackPort=${callback_port} nsdId=${NS_DescriptorID}
Log Creating mock request and response to handle GET operation on notification endpoint
&{notification_request}= Create Mock Request Matcher GET ${callback_endpoint}
&{notification_response}= Create Mock Response status_code=204
Log Issue the subscription request
Create Mock Expectation ${notification_request} ${notification_response}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions ${body}
Set Global Variable ${response} ${outputResponse}
Clear Requests ${callback_endpoint}
GET Subscriptions
Log Get the list of active subscriptions
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions
Set Global Variable ${response} ${outputResponse}
Get subscriptions with all_fields attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?all_fields
${output}= Output response
Set Suite Variable ${response} ${output}
Get subscriptions with exclude_default attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
Get subscriptions with fields attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?fields=${fields_sub}
${output}= Output response
Set Suite Variable ${response} ${output}
Get subscriptions with exclude_fields attribute selector
Log Get the list of active subscriptions, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?exclude_fields=${fields_sub}
${output}= Output response
Set Suite Variable ${response} ${output}
Log Get the list of active subscriptions using a filter
Set Headers {"Accept": "${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter}
Set Global Variable ${response} ${outputResponse}
Get subscriptions - invalid filter
Log Get the list of active subscriptions using an invalid filter
Set Headers {"Accept": "${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions?${sub_filter_invalid}
Set Global Variable ${response} ${outputResponse}
POST Individual Subscription
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Global Variable ${response} ${outputResponse}
PUT Individual Subscription
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Global Variable ${response} ${outputResponse}
PATCH Individual Subscription
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Global Variable ${response} ${outputResponse}
GET Individual subscription
log Trying to get information about an individual subscription
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Global Variable ${response} ${outputResponse}
DELETE Individual subscription
log Try to delete an individual subscription
Set Headers {"Accept":"${ACCEPT}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/subscriptions/${subscriptionId}
Set Global Variable ${response} ${outputResponse}
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
POST Operation occurrence
log The POST method delivers a notification from the server to the client.
${json}= Get File schemas/NsLcmOperationOccurrenceNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle NSLcmOperationOccurrenceNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
POST Id creation
log The POST method delivers a notification from the server to the client.
${json}= Get File schemas/NsIdentifierCreationNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle NsIdentifierCreationNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint}} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
POST Id deletion
log The POST method delivers a notification from the server to the client.
${json}= Get File schemas/NsIdentifierDeletionNotification.schema.json
${BODY}= evaluate json.loads('''${json}''') json
Log Creating mock request and response to handle NsIdentifierDeletionNotification
&{req}= Create Mock Request Matcher POST ${callback_endpoint} body_type="JSON_SCHEMA" body=${BODY}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Clear Requests ${callback_endpoint}
GET Notification endpoint
log The GET method allows the server to test the notification endpoint
&{req}= Create Mock Request Matcher GET ${callback_endpoint}
&{rsp}= Create Mock Response headers="Content-Type: application/json" status_code=204
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Verify Mock Expectation ${req}
Clear Requests ${callback_endpoint}
PUT notification
Log PUT Method not implemented
&{req}= Create Mock Request Matcher PUT ${callback_endpoint}
&{rsp}= Create Mock Response status_code=405
Create Mock Expectation ${req} ${rsp}
Sleep ${sleep_interval}
Log Verifying results
Verify Mock Expectation ${req}
Log Cleaning the endpoint
Check HTTP Response Header Contains Location
${linkURL}= Get Value From Json ${response['headers']} $..Link
Should Not Be Empty ${linkURL}
PARSE the NS Descriptor File
Run Keyword If '${descriptorType}'=='SOL001' Fetch Information from SOL001 NS descriptor file ELSE Fetch Information from SOL006 NS descriptor file
Fetch Information from SOL001 NS descriptor file
Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml
@{NsVirtualLink_labels}= Create List
@{NsCP_labels}= Create List
FOR ${key} IN @{topology_template.node_templates.keys()}
${key_type}= Get Variable Value ${topology_template.node_templates.${key}.type}
${NS_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_NS}
${NSLink_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_NsVirtualLink}
${NsCP_check}= Run Keyword And Return Status Should Be Equal As Strings ${key_type} ${tosca_type_NsCP}
Run Keyword If ${NS_check} Get NS Attributes from SOL001 ${key}
Run Keyword If ${NSLink_check} Append To List ${Ns_VirtualLink_labels} ${key}
Run Keyword If ${NsCP_check} Append To List ${NsCp_labels} ${key}
END
Set Global Variable @{NS_VirtualLink_IDs} @{NsVirtualLink_labels}
Set Global Variable @{NsCP_IDs} @{NsCP_labels}
Get NS Attributes from SOL001
[Arguments] ${NS_label}
Import Variables ${CURDIR}/descriptors/SOL001/NSD/nsd_SOL001.yaml
${ns_descriptor_id}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.descriptorId}
${designer}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.designer}
${version}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.version}
${name}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.name}
${invariantId}= Get Variable Value ${topology_template.node_templates.${NS_label}.properties.invariantId}
Set Global Variable ${NS_DescriptorID} ${ns_descriptor_id}
Set Global Variable ${Designer} ${designer}
Set Global Variable ${NS_Version} ${version}
Set Global Variable ${NS_Name} ${name}
Set Global Variable ${NS_InvariantID} ${invariantId}
Fetch Information from SOL006 NS descriptor file
Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml
${nsd_id}= Get Variable Value ${nfv.nsd[0].id}
${VNFcount}= Get Length ${nfv.vnfd}
${SAPcount}= Get Length ${nfv.nsd[0].sapd}
${NSvirtualLinkCount}= Get Length ${nfv.nsd[0]['virtual-link-desc']}
${VNFD_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} vnfd
${NSD_check}= Run Keyword And Return Status Should Be Equal As Strings ${key} nsd
Run Keyword If ${VNFD_check} Fetch Information from SOL006 descriptor file
Run Keyword If ${NSD_check} Get SAP IDs ${SAPcount}
Run Keyword If ${NSD_check} Get NS Virtual Link IDs ${NSvirtualLinkCount}
END
Set Global Variable ${NS_DescriptorID} ${nsd_id}
Get SAP IDs
[Arguments] ${count}
Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml
@{SAPlabels}= Create List
FOR ${i} IN RANGE ${count}
Append To List ${SAPlabels} ${nfv.nsd[0].sapd[${i}]['id']}
Set Global Variable ${SAP_IDs} ${SAPlabels}
Get NS Virtual Link IDs
[Arguments] ${count}
Import Variables ${CURDIR}/descriptors/SOL006/NSD/nsd_SOL006.yaml
@{NsVirtualLink_labels}= Create List
Append To List ${NsVirtualLink_labels} ${nfv.nsd[0]['virtual-link-desc'][${i}]['id']}
Set Global Variable ${NS_VirtualLink_IDs} ${NsVirtualLink_labels}
Check HTTP Response Body NsInstance content against NS Descriptor
#${check_descriptors} flag, 1 to check descriptors
Run Keyword If ${check_descriptors} == 1 Check Individual NsInstance Content for NSD
Check Individual NsInstance Content for NSD
PARSE the NS Descriptor File
Match the Response Attributes with NS Descriptors
Match the Response Attributes with NS Descriptors
Should Be Equal As Strings ${response['body']['nsdId']} ${NSDescriptor_ID}
List Should Contain Value ${NS_VirtualLink_IDs} ${response['body']['virtualLinkInfo'][0]['nsVirtualLinkDescId']}
Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['sapInfo'][0]['sapdId']}
Check NsLcmOpOcc content against NS Descriptor
PARSE the NS Descriptor File
Match the NsLcmOpOcc Response Attributes with NS Descriptors
Match the NsLcmOpOcc Response Attributes with NS Descriptors
Should Be Equal As Strings ${response['body']['affectedNss'][0]['nsdId']} ${NSDescriptor_ID}
Run Keyword If '${descriptorType}'=='SOL006' List Should Contain Value ${SAP_IDs} ${response['body']['affectedSaps'][0]['sapdId']}
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
POST VNF Snapshots
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshots
Log Query VNF The GET method queries information about multiple VNF snapshots.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshots with bad attribute
Log Query VNF The GET method queries information about multiple VNF snapshots.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?attribute_not_exist=some_value
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshots with bad filter
Log Query VNF The GET method queries information about multiple VNF snapshots.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?${NEG_FILTER_snapshot}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshots using filter
Log Query VNF The GET method queries information about multiple VNF snapshots using filter.
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?${POS_FILTER_snapshot}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET multiple VNF Snapshots with all_fields attribute selector
Log Query status information about multiple VNF snapshots, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?all_fields
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshots with exclude_default attribute selector
Log Query status information about multiple VNF snapshots using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshots with fields attribute selector
Log Query status information about multiple VNF snapshots, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?fields=${fields_snapshot}
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshots with exclude_default and fields attribute selector
Log Query status information about multiple VNF snapshots, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?fields=${fields_snapshot}&exclude_default
${output}= Output response
Set Suite Variable ${response} ${output}
GET multiple VNF Snapshots with exclude_fields attribute selector
Log Query status information about multiple VNF snapshots, using fields
Set Headers {"Accept": "${ACCEPT_JSON}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
GET ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots?exclude_fields=${fields_snapshot}
${output}= Output response
Set Suite Variable ${response} ${output}
GET VNF Snapshots without Paging support
Run Keyword If ${PAGING_SUPPORTED} == 0 GET multiple VNF Snapshots
GET VNF Snapshots with Paging support
Run Keyword If ${PAGING_SUPPORTED} == 1 GET multiple VNF Snapshots
Check HTTP Response Header Contains Link
${linkURL}= Get Value From Json ${response['headers']} $..Link
Should Not Be Empty ${linkURL}
PUT VNF Snapshots
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH VNF Snapshots
Log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE VNF Snapshots
Log Trying to perform a DELETE. This method should not be implemented
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
POST individual VNF Snapshot
log Trying to perform a POST. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Post ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET individual VNF Snapshot
log Trying to get information about an individual VNF snapshot
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
GET individual VNF Snapshot with invalid URI
log Trying to get information about an individual VNF snapshot
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Get ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${invalidVnfSnapshotInfoId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PUT individual VNF Snapshot
log Trying to perform a PUT. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Put ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
PATCH individual VNF Snapshot
log Trying to perform a PATCH. This method should not be implemented
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Patch ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE individual VNF Snapshot
log Trying to DELETE an individual VNF Snapshot
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
DELETE individual VNF Snapshot - CONFLICT
log Trying to DELETE an individual VNF Snapshot that is already in use by another operation
Set Headers {"Accept":"${ACCEPT}"}
Set Headers {"Content-Type": "${CONTENT_TYPE}"}
Run Keyword If ${AUTH_USAGE} == 1 Set Headers {"${AUTHORIZATION_HEADER}":"${AUTHORIZATION_TOKEN}"}
Delete ${apiRoot}/${apiName}/${apiMajorVersion}/vnf_snapshots/${vnfSnapshotInfoId_InUse}
${outputResponse}= Output response
Set Global Variable ${response} ${outputResponse}
Check Postcondition VNF Snapshot Resource Is Deleted
Get individual VNF Snapshot
Integer response status 404
Log VNF Snapshot Resource deleted
Check Postcondition VNF Snapshot Resource Existence
Get individual VNF Snapshot
Integer response status 200
Log VNF Snapshot Resource is not deleted