[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14622112#comment-14622112
 ] 

ASF GitHub Bot commented on CLOUDSTACK-8379:
--------------------------------------------

Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/158#discussion_r34343974
  
    --- Diff: tools/marvin/marvin/deployDataCenter.py ---
    @@ -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':
    --- End diff --
    
    should work but why not make a str('boolean') a real bool? 
      if enabled.lower == true:
        enable = True
      else:
        enable = False
      if enable:


> add support to marvin to enable deployed zone based on the value provided in 
> config file
> ----------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8379
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8379
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: marvin
>    Affects Versions: 4.6.0
>            Reporter: Srikanteswararao Talluri
>            Assignee: Srikanteswararao Talluri
>             Fix For: 4.6.0
>
>
> add support to marvin to enable deployed zone based on the value provided in 
> config file
> if under zone section, if the 'enabled' element is not mentioned, then zone 
> will be enabled otherwise zone will be enabled/disabled based on value 
> provided ('false' or 'true') for 'enabled'



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to