cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resmo <...@git.apache.org>
Subject [GitHub] cloudstack pull request: Enhance VR performance
Date Mon, 18 Jan 2016 09:30:35 GMT
Github user resmo commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1346#discussion_r49976226
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/configure.py ---
    @@ -901,79 +901,123 @@ def processStaticNatRule(self, rule):
     
     
     def main(argv):
    +    # The file we are currently processing, if it is "cmd_line.json" everything will
be processed.
    +    process_file = argv[1]
    +
    +    # process_file can be None, if so assume cmd_line.json
    +    if process_file is None:
    +        process_file = "cmd_line.json"
    +
    +    # Track if changes need to be committed to NetFilter
    +    iptables_change = False
    +
    +    # The "GLOBAL" Configuration object
         config = CsConfig()
    +
         logging.basicConfig(filename=config.get_logger(),
                             level=config.get_level(),
                             format=config.get_format())
    +
    +    # Load stored ip adresses from disk to CsConfig()
         config.set_address()
     
         logging.debug("Configuring ip addresses")
    -    # IP configuration
         config.address().compare()
         config.address().process()
     
    -    logging.debug("Configuring vmpassword")
    -    password = CsPassword("vmpassword", config)
    -    password.process()
    +    if process_file == "cmd_line.json" or process_file == "guest_network.json":
    --- End diff --
    
    small hint: for better readability I suggest this syntax instead: 
    ~~~python
    if process_file in ['cmd_line.json', 'guest_network.json']: 
    ~~~


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message