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

This commit is contained in:
Zuul 2020-07-29 13:18:09 +00:00 committed by Gerrit Code Review
commit 23916270c5
3 changed files with 10 additions and 4 deletions

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,

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:

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)