|
|
|
@ -844,6 +844,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
|
|
|
|
|
In this test case, we do following steps.
|
|
|
|
|
- Create subscription.
|
|
|
|
|
- Test notification.
|
|
|
|
|
- Create VNF package.
|
|
|
|
|
- Upload VNF package.
|
|
|
|
|
- Create VNF instance.
|
|
|
|
@ -856,17 +857,21 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
- Delete subscription.
|
|
|
|
|
"""
|
|
|
|
|
# Create subscription and register it.
|
|
|
|
|
callback_url = os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)
|
|
|
|
|
request_body = fake_vnflcm.Subscription.make_create_request_body(
|
|
|
|
|
'http://localhost:{}{}'.format(
|
|
|
|
|
vnflcm_base.FAKE_SERVER_MANAGER.SERVER_PORT,
|
|
|
|
|
os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)))
|
|
|
|
|
callback_url))
|
|
|
|
|
resp, response_body = self._register_subscription(request_body)
|
|
|
|
|
self.assertEqual(201, resp.status_code)
|
|
|
|
|
self.assert_http_header_location_for_subscription(resp.headers)
|
|
|
|
|
subscription_id = response_body.get('id')
|
|
|
|
|
self.addCleanup(self._delete_subscription, subscription_id)
|
|
|
|
|
|
|
|
|
|
# Test notification
|
|
|
|
|
self.assert_notification_get(callback_url)
|
|
|
|
|
|
|
|
|
|
# Pre Setting: Create vnf package.
|
|
|
|
|
sample_name = 'functional3'
|
|
|
|
|
csar_package_path = os.path.abspath(
|
|
|
|
@ -948,6 +953,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
|
|
|
|
|
In this test case, we do following steps.
|
|
|
|
|
- Create subscription.
|
|
|
|
|
- Test notification.
|
|
|
|
|
- Create VNF package.
|
|
|
|
|
- Upload VNF package.
|
|
|
|
|
- Create VNF instance.
|
|
|
|
@ -962,17 +968,21 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
- Delete subscription.
|
|
|
|
|
"""
|
|
|
|
|
# Create subscription and register it.
|
|
|
|
|
callback_url = os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)
|
|
|
|
|
request_body = fake_vnflcm.Subscription.make_create_request_body(
|
|
|
|
|
'http://localhost:{}{}'.format(
|
|
|
|
|
vnflcm_base.FAKE_SERVER_MANAGER.SERVER_PORT,
|
|
|
|
|
os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)))
|
|
|
|
|
callback_url))
|
|
|
|
|
resp, response_body = self._register_subscription(request_body)
|
|
|
|
|
self.assertEqual(201, resp.status_code)
|
|
|
|
|
self.assert_http_header_location_for_subscription(resp.headers)
|
|
|
|
|
subscription_id = response_body.get('id')
|
|
|
|
|
self.addCleanup(self._delete_subscription, subscription_id)
|
|
|
|
|
|
|
|
|
|
# Test notification
|
|
|
|
|
self.assert_notification_get(callback_url)
|
|
|
|
|
|
|
|
|
|
# Pre Setting: Create vnf package.
|
|
|
|
|
sample_name = 'functional4'
|
|
|
|
|
csar_package_path = os.path.abspath(
|
|
|
|
@ -1538,6 +1548,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
|
|
|
|
|
In this test case, we do following steps.
|
|
|
|
|
- Create subscription.
|
|
|
|
|
- Test notification.
|
|
|
|
|
- Create VNF package.
|
|
|
|
|
- Upload VNF package.
|
|
|
|
|
- Create VNF instance.
|
|
|
|
@ -1549,17 +1560,21 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
- Delete subscription.
|
|
|
|
|
"""
|
|
|
|
|
# Create subscription and register it.
|
|
|
|
|
callback_url = os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)
|
|
|
|
|
request_body = fake_vnflcm.Subscription.make_create_request_body(
|
|
|
|
|
'http://localhost:{}{}'.format(
|
|
|
|
|
vnflcm_base.FAKE_SERVER_MANAGER.SERVER_PORT,
|
|
|
|
|
os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)))
|
|
|
|
|
callback_url))
|
|
|
|
|
resp, response_body = self._register_subscription(request_body)
|
|
|
|
|
self.assertEqual(201, resp.status_code)
|
|
|
|
|
self.assert_http_header_location_for_subscription(resp.headers)
|
|
|
|
|
subscription_id = response_body.get('id')
|
|
|
|
|
self.addCleanup(self._delete_subscription, subscription_id)
|
|
|
|
|
|
|
|
|
|
# Test notification
|
|
|
|
|
self.assert_notification_get(callback_url)
|
|
|
|
|
|
|
|
|
|
# Pre Setting: Create vnf package.
|
|
|
|
|
sample_name = 'functional4'
|
|
|
|
|
csar_package_path = os.path.abspath(
|
|
|
|
@ -1906,6 +1921,7 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
|
|
|
|
|
In this test case, we do following steps.
|
|
|
|
|
- Create subscription.
|
|
|
|
|
- Test notification.
|
|
|
|
|
- Show subscriptions.
|
|
|
|
|
- Get list of subscriptions.
|
|
|
|
|
- Create VNF package.
|
|
|
|
@ -1921,11 +1937,12 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
- Delete subscription
|
|
|
|
|
"""
|
|
|
|
|
# Create subscription and register it.
|
|
|
|
|
callback_url = os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)
|
|
|
|
|
request_body = fake_vnflcm.Subscription.make_create_request_body(
|
|
|
|
|
'http://localhost:{}{}'.format(
|
|
|
|
|
vnflcm_base.FAKE_SERVER_MANAGER.SERVER_PORT,
|
|
|
|
|
os.path.join(vnflcm_base.MOCK_NOTIFY_CALLBACK_URL,
|
|
|
|
|
self._testMethodName)))
|
|
|
|
|
callback_url))
|
|
|
|
|
resp, response_body = self._register_subscription(request_body)
|
|
|
|
|
self.assertEqual(201, resp.status_code)
|
|
|
|
|
self.assert_http_header_location_for_subscription(resp.headers)
|
|
|
|
@ -1934,6 +1951,9 @@ class VnfLcmWithUserDataTest(vnflcm_base.BaseVnfLcmTest):
|
|
|
|
|
self._delete_subscription,
|
|
|
|
|
subscription_id)
|
|
|
|
|
|
|
|
|
|
# Test notification
|
|
|
|
|
self.assert_notification_get(callback_url)
|
|
|
|
|
|
|
|
|
|
# Subscription show
|
|
|
|
|
resp, body = self._wait_show_subscription(subscription_id)
|
|
|
|
|
self.assert_subscription_show(resp, body)
|
|
|
|
|