Skip to content

Community ignore ui on 17.3.31#538

Open
opencm wants to merge 4 commits intomasterfrom
community-ignore-ui-on-17.3.31
Open

Community ignore ui on 17.3.31#538
opencm wants to merge 4 commits intomasterfrom
community-ignore-ui-on-17.3.31

Conversation

@opencm
Copy link
Copy Markdown
Contributor

@opencm opencm commented Apr 6, 2017

No description provided.

ctx.download_resource(
join('components', 'utils.py'),
join(dirname(__file__), 'utils.py'))
join('components', 'utils.py'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why did you change the indentation?

Comment thread components/stage/scripts/create.py Outdated

nodejs_source_url = ctx_properties['nodejs_tar_source_url']
stage_source_url = ctx_properties['stage_tar_source_url']
print "stage_source_url={0}".format(stage_source_url)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove print

Comment thread components/stage/scripts/create.py Outdated
nodejs_source_url = ctx_properties['nodejs_tar_source_url']
stage_source_url = ctx_properties['stage_tar_source_url']
print "stage_source_url={0}".format(stage_source_url)
ctx.instance.runtime_properties['ignore_ui'] = 'False'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Perhaps call the runtime property: "skip_stage_installation" and set it to 'true'

Comment thread components/stage/scripts/create.py Outdated
if not stage:
ctx.instance.runtime_properties['ignore_ui'] = 'True'
print "***ignore ui***"
ignore_ui = ctx.instance.runtime_properties['ignore_ui']
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

skip_stage_installation...

Comment thread components/stage/scripts/create.py Outdated
ignore_ui = ctx.instance.runtime_properties['ignore_ui']
print ctx.instance.runtime_properties['ignore_ui'].__class__
print "ignore_ui={0}".format(ignore_ui)
if ignore_ui != 'True':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe in order not to get all the script indented just do something like:

if skip_stage_installation:
return

ctx.download_resource(
join('components', 'utils.py'),
join(dirname(__file__), 'utils.py'))
join('components', 'utils.py'),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why?

Comment thread components/stage/scripts/start.py Outdated
utils.start_service(STAGE_SERVICE_NAME)
ignore_ui = ctx.instance.runtime_properties['ignore_ui']
print "ignore_ui={0}".format(ignore_ui)
if ignore_ui != 'True':
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

skip_stage_installation = 'skip_stage_installation' in ctx.instance.runtime_properties

if skip_stage_installation:
return

Comment thread components/utils.py Outdated

def download_cloudify_resource(url, service_name, destination=None):
def download_cloudify_resource(
url, service_name, destination=None, avoid_failure=False):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

avoid_failure -> raise_error_on_failure=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants