Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

run_job method, Not passing proper argument values, if argument has space in string #32

Open
bugcy013 opened this issue Dec 21, 2016 · 1 comment

Comments

@bugcy013
Copy link

Hi Guys,

When we use run_job method, argument as spaces in string means, not properly passing to the main job.

for example In our case '2.dv_lead_id': ' FC BD sub J ZH0010 P1' argument has space, When we try to execute the job, It passes only FC only.

[INFO] ==> let's start rundeck job id=186c8375-574f-4a83-9773-3f6430cd9efc, args={'3.prev_campaign_id': 'FCBDsubQZH0010P3', '4.provider_lead_id': '7c4648becf', '2.dv_lead_id': ' FC BD sub J ZH0010 P1', '1.action': 'talos_automation'}
let's print job_id=http://172.16.60.21:4440/execution/follow/94936, job_status=failed

print "[INFO] ==> let's start rundeck job id=%s, args=%s" % (RUNDECK_JOB_UUID, jobArgs)
execution = rd.run_job(RUNDECK_JOB_UUID, argString=jobArgs)

NOTE:
It's working fine, if arguments has no space between characters.

Please let me know, if any you any questions.

Kind regards,
-Dhanasekaran

@dhanasekaran-anbalagan
Copy link

dhanasekaran-anbalagan commented Dec 22, 2016

Hi Guys,

Currently I am using, work around for this

In [1]: example_string  = ' FC BD sub J ZH0010 P1'

In [2]: example_string.replace(" ", "#")
Out[2]: '#FC#BD#sub#J#ZH0010#P1'

and invoking job, I am replacing '#' with white space.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants