Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions 9 tools/marvin/marvin/deployDataCenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,13 @@ def createZones(self, zones):
self.createPrimaryStorages(zone.primaryStorages,
zoneId,
)
enabled = getattr(zone, 'enabled', 'True')
if enabled == 'True' or enabled is None:

#get the variable from config file whether to enable zone or not
#If "enabled" tag is not found in config file, enable the zone otherwise
#act as mentioned in the config file
enabled = str(getattr(zone, 'enabled', None))
enabled = enabled if enabled else 'true'
if enabled.lower() == 'true':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should work but why not make a str('boolean') a real bool?
if enabled.lower == true:
enable = True
else:
enable = False
if enable:

self.enableZone(zoneId, "Enabled")
details = getattr(zone, 'details')
if details is not None:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.