Browse Source

Merge "Cannot wait more than 10 minutes during VNF create"

changes/48/743748/2
Zuul 1 week ago
committed by Gerrit Code Review
parent
commit
23916270c5
3 changed files with 10 additions and 4 deletions
  1. +2
    -1
      tacker/tests/unit/vnfm/infra_drivers/openstack/test_openstack.py
  2. +3
    -3
      tacker/vnfm/infra_drivers/openstack/heat_client.py
  3. +5
    -0
      tacker/vnfm/infra_drivers/openstack/openstack.py

+ 2
- 1
tacker/tests/unit/vnfm/infra_drivers/openstack/test_openstack.py View File

@@ -292,7 +292,8 @@ class TestOpenStack(base.TestCase):
def _get_expected_fields_tosca(self, template):
return {'stack_name':
'test_openwrt_eb84260e-5ff7-4332-b032-50a14d6c1123',
'template': _get_template(template)}
'template': _get_template(template),
'timeout_mins': 10}

def _get_expected_tosca_vnf(self,
tosca_tpl_name,


+ 3
- 3
tacker/vnfm/infra_drivers/openstack/heat_client.py View File

@@ -41,12 +41,12 @@ class HeatClient(object):

def create(self, fields):
fields = fields.copy()
fields.update({
'timeout_mins': 10,
'disable_rollback': True})
fields['disable_rollback'] = True
if 'password' in fields.get('template', {}):
fields['password'] = fields['template']['password']

fields.setdefault('timeout_mins')

try:
return self.stacks.create(**fields)
except heatException.HTTPException:


+ 5
- 0
tacker/vnfm/infra_drivers/openstack/openstack.py View File

@@ -233,6 +233,8 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
fields['stack_name'] = ("vnflcm_" + vnf["id"])
fields['template'] = self._format_base_hot(base_hot_dict)
fields['parameters'] = hot_param_dict
fields['timeout_mins'] = (
self.STACK_RETRIES * self.STACK_RETRY_WAIT // 60)

LOG.debug('fields: %s', fields)
LOG.debug('template: %s', fields['template'])
@@ -257,6 +259,9 @@ class OpenStack(abstract_driver.VnfAbstractDriver,
'failure_count'])
fields['stack_name'] = name

fields['timeout_mins'] = (
self.STACK_RETRIES * self.STACK_RETRY_WAIT // 60)

# service context is ignored
LOG.debug('service_context: %s', vnf.get('service_context', []))
LOG.debug('fields: %s', fields)


Loading…
Cancel
Save