diff options
author | 2017-08-17 15:21:37 -0600 | |
---|---|---|
committer | 2017-08-24 21:12:02 +0000 | |
commit | 1342eb17df248ec75cc57e9c380a7753fc432194 (patch) | |
tree | 72a3b065394b7bcaaddb801e3321edc1ba4b8818 /snaps/openstack/create_network.py | |
parent | 49aaa5d61e87e11c5d5b9ce7dd2fa598f16b82a7 (diff) |
Added method to return OpenStackVmInstance from Heat.
OpenStackHeatStack now can introspect the VMs that the template
was responsible for deploying and return an instanitated instance
of OpenStackVmInstance for each VM deployed. When the VM has a
Floating IP, these instances have the ability to connect via
SSH just like one created from scratch.
JIRA: SNAPS-172
Change-Id: I5a7ed3a09bb871afc55c718aa80a9069b1eb4da7
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/create_network.py')
-rw-r--r-- | snaps/openstack/create_network.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/snaps/openstack/create_network.py b/snaps/openstack/create_network.py index d0b6d20..166a682 100644 --- a/snaps/openstack/create_network.py +++ b/snaps/openstack/create_network.py @@ -394,10 +394,10 @@ class PortSettings: def __init__(self, **kwargs): """ - Constructor - all parameters are optional - :param name: A symbolic name for the port. + Constructor + :param name: A symbolic name for the port (optional). :param network_name: The name of the network on which to create the - port. + port (required). :param admin_state_up: A boolean value denoting the administrative status of the port. True = up / False = down :param project_name: The name of the project who owns the network. @@ -453,10 +453,9 @@ class PortSettings: self.device_owner = kwargs.get('device_owner') self.device_id = kwargs.get('device_id') - if not self.name or not self.network_name: + if not self.network_name: raise PortSettingsError( - 'The attributes neutron, name, and network_name are required ' - 'for PortSettings') + 'The attribute network_name is required') def __set_fixed_ips(self, neutron): """ |