Skip to content
Permalink
Browse files
Add debug flag to 'gstack'
  • Loading branch information
brogand93 committed Jun 24, 2014
1 parent 0875759 commit 0441dd27eeb04b5b5de64cdb549f6a1672723031
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
@@ -31,10 +31,19 @@ def _generate_args():
parser = argparse.ArgumentParser()

parser.add_argument(
'profile',
'-p',
'--profile',
required=False,
help='The profile to run gstack with, default is initial',
default='initial',
nargs='?'
default='initial'
)

parser.add_argument(
'-d',
'--debug',
required=False,
help='Turn debug on for application',
default=False
)

args = parser.parse_args()
@@ -84,6 +93,9 @@ def configure_app(settings=None):
else:
args = _generate_args()
profile = args.pop('profile')
ha = args.pop('debug')
print ha
app.config['DEBUG'] = ha
config_file = _load_config_file()
database_uri = _load_database()
_config_from_config_profile(config_file, profile)
@@ -27,8 +27,8 @@

def main():
config_folder = _create_config_folder()
_create_database()
_create_config_file(config_folder)
_create_database()


def _create_config_folder():
@@ -54,10 +54,11 @@ def _generate_args():
)

parser.add_argument(
'profile',
help='The profile to configure, default is initial',
default='initial',
nargs='?'
'-p',
'--profile',
required=False,
help='The profile to run gstack with, default is initial',
default='initial'
)

args = parser.parse_args()
@@ -95,13 +95,6 @@ def getsecuritygroup(projectid, authorization, firewall):
)
cloudstack_response = cloudstack_response

app.logger.debug(
'Processing request for get Firewall\n'
'Project: ' + projectid + '\n' +
'Firewall: ' + firewall + '\n' +
json.dumps(cloudstack_response, indent=4, separators=(',', ': '))
)

if cloudstack_response['listsecuritygroupsresponse']['securitygroup']:
response_item = cloudstack_response[
'listsecuritygroupsresponse']['securitygroup'][0]
@@ -45,7 +45,8 @@ def read(fname):
url='https://github.com/NOPping/gstack',
platforms=('Any'),
license='LICENSE.txt',
package_data={'': ['LICENSE.txt', 'data/*', 'migrations/*']},
package_data={'': ['LICENSE.txt', 'data/*'],
'migrations': ['versions/*', '*.mako']},
packages=[
'gstack',
'gstack.controllers',

0 comments on commit 0441dd2

Please sign in to comment.