# Copyright (c) 2015-2017 Ericsson AB and others.
#
# All rights reserved. This program and the accompanying materials
# Copyright (c) 2015-2017 Ericsson AB and others.
#
# All rights reserved. This program and the accompanying materials
- def add_network(self, name, physical_network='physnet1', provider=None):
+ def add_network(self, name, physical_network='physnet1', provider=None,
+ segmentation_id=None):
"""add to the template a Neutron Net"""
log.debug("adding Neutron::Net '%s'", name)
if provider is None:
"""add to the template a Neutron Net"""
log.debug("adding Neutron::Net '%s'", name)
if provider is None:
def add_server_group(self, name, policies): # pragma: no cover
"""add to the template a ServerGroup"""
def add_server_group(self, name, policies): # pragma: no cover
"""add to the template a ServerGroup"""
for status in iter(self.status, u'CREATE_COMPLETE'):
log.debug("stack state %s", status)
if status == u'CREATE_FAILED':
for status in iter(self.status, u'CREATE_COMPLETE'):
log.debug("stack state %s", status)
if status == u'CREATE_FAILED':
- raise RuntimeError(
- heat_client.stacks.get(self.uuid).stack_status_reason)
+ stack_status_reason = heat_client.stacks.get(self.uuid).stack_status_reason
+ heat_client.stacks.delete(self.uuid)
+ raise RuntimeError(stack_status_reason)