diff options
author | spisarski <s.pisarski@cablelabs.com> | 2017-11-22 14:55:43 -0700 |
---|---|---|
committer | spisarski <s.pisarski@cablelabs.com> | 2017-11-22 16:24:12 -0700 |
commit | fb6654aafdc5303077325691b7f468b27d7493c6 (patch) | |
tree | 68290a72557a5b3ae1ba79dda287203f7d29456a /snaps/config/network.py | |
parent | 0e377731a20617c9cdb886a597395c61ae490e38 (diff) |
Implemented the ability to create Magnum Cluster Type objects.
This patch is the second of several necessary for the addition of
Magnum support. This one implements a create and delete function
to magnum_utils.py as well as the necessary config and domain classes
for sending and receiving Cluster Type data to OpenStack.
JIRA: SNAPS-233
Change-Id: Iad1959b98eaabc4ef5f41b70a23f6b1306259650
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/config/network.py')
-rw-r--r-- | snaps/config/network.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/snaps/config/network.py b/snaps/config/network.py index bc6ae1b..f48cd27 100644 --- a/snaps/config/network.py +++ b/snaps/config/network.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import enum +from neutronclient.common.utils import str2bool from snaps.openstack.utils import keystone_utils, neutron_utils @@ -52,19 +53,19 @@ class NetworkConfig(object): self.name = kwargs.get('name') if kwargs.get('admin_state_up') is not None: - self.admin_state_up = bool(kwargs['admin_state_up']) + self.admin_state_up = str2bool(str(kwargs['admin_state_up'])) else: self.admin_state_up = True if kwargs.get('shared') is not None: - self.shared = bool(kwargs['shared']) + self.shared = str2bool(str(kwargs['shared'])) else: self.shared = None self.project_name = kwargs.get('project_name') if kwargs.get('external') is not None: - self.external = bool(kwargs.get('external')) + self.external = str2bool(str(kwargs.get('external'))) else: self.external = False @@ -370,7 +371,7 @@ class PortConfig(object): self.network_name = kwargs.get('network_name') if kwargs.get('admin_state_up') is not None: - self.admin_state_up = bool(kwargs['admin_state_up']) + self.admin_state_up = str2bool(str(kwargs['admin_state_up'])) else: self.admin_state_up = True |