Skip to content

Fixed issues related to flows and atoms initialization - #145

Merged
r0h4n merged 1 commit into
Tendrl:masterfrom
shtripat:volume-crud
Feb 2, 2017
Merged

Fixed issues related to flows and atoms initialization#145
r0h4n merged 1 commit into
Tendrl:masterfrom
shtripat:volume-crud

Conversation

@shtripat

Copy link
Copy Markdown
Member

Signed-off-by: Shubhendu shtripat@redhat.com

Comment thread tendrl/commons/jobs/__init__.py Outdated
if "tendrl" in flow_fqn and "objects" in flow_fqn:
obj_name, flow_name = flow_fqn.split(".objects.")[-1].split(
obj_name = flow_fqn.split(".objects.")[-1].split(
".flows.")[-2]

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.

the older code was doing the same, whats the difference?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Earlier we were trying to get obj_name and flow_name both in the same call. The value of obj_name used to be correct but flow name was not. Flow name used toe be reported as e.g. create_volume.CreateVolume whereas we need only CreateVolume, so we get these values separately now. Thats all...

@shtripat
shtripat force-pushed the volume-crud branch 3 times, most recently from 466b06d to f798fbb Compare February 1, 2017 13:18
self.outputs = outputs or atom_def['outputs']
self.uuid = uuid or atom_def['uuid']
self.help = help or atom_def['help']
self.inputs = inputs or atom_def.get('inputs')['mandatory']

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.

atom_def.get('inputs')['mandatory'] should be atom_def.get('inputs').get("mandatory")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread tendrl/commons/jobs/__init__.py Outdated
obj_name, flow_name = flow_fqn.split(".objects.")[-1].split(
obj_name = flow_fqn.split(".objects.")[-1].split(
".flows.")[-2]
flow_name = flow_fqn.split(".objects.")[-1].split(

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.

flow_name = flow_fqn.split(".flows.")[-1].split(".")[-1]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Comment thread tendrl/commons/jobs/__init__.py Outdated
if "tendrl" in flow_fqn and "objects" in flow_fqn:
obj_name, flow_name = flow_fqn.split(".objects.")[-1].split(
obj_name = flow_fqn.split(".objects.")[-1].split(
".flows.")[-2]

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.

obj_name = flow_fqn.split(".objects.")[-1].split(".")[0]

much cleaner

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Shubhendu <shtripat@redhat.com>
@shtripat

shtripat commented Feb 2, 2017

Copy link
Copy Markdown
Member Author

Verified with latest create/delete pool changes and works as expected.

@r0h4n
r0h4n merged commit b92be80 into Tendrl:master Feb 2, 2017
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.

2 participants