summaryrefslogtreecommitdiffstats
path: root/snaps/config/volume.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-11-22 14:55:43 -0700
committerspisarski <s.pisarski@cablelabs.com>2017-11-22 16:24:12 -0700
commitfb6654aafdc5303077325691b7f468b27d7493c6 (patch)
tree68290a72557a5b3ae1ba79dda287203f7d29456a /snaps/config/volume.py
parent0e377731a20617c9cdb886a597395c61ae490e38 (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/volume.py')
-rw-r--r--snaps/config/volume.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/snaps/config/volume.py b/snaps/config/volume.py
index 20ca985..a31e8f5 100644
--- a/snaps/config/volume.py
+++ b/snaps/config/volume.py
@@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+from neutronclient.common.utils import str2bool
class VolumeConfig(object):
@@ -37,8 +38,8 @@ class VolumeConfig(object):
self.type_name = kwargs.get('type_name')
self.availability_zone = kwargs.get('availability_zone')
- if kwargs.get('availability_zone'):
- self.multi_attach = bool(kwargs.get('availability_zone'))
+ if kwargs.get('multi_attach'):
+ self.multi_attach = str2bool(str(kwargs.get('multi_attach')))
else:
self.multi_attach = False