Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ovirt add job #55440

Merged
merged 10 commits into from
Jun 10, 2019
Merged

Ovirt add job #55440

merged 10 commits into from
Jun 10, 2019

Conversation

mnecas
Copy link
Contributor

@mnecas mnecas commented Apr 17, 2019

SUMMARY

Ovirt add job module

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

Ovirt

ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Apr 17, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 cloud module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. new_module This PR includes a new module. new_plugin This PR includes a new plugin. ovirt oVirt and RHV community support:community This issue/PR relates to code supported by the Ansible community. labels Apr 17, 2019
@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Apr 17, 2019
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Apr 17, 2019
)


def build_job(module):
Copy link
Contributor

Choose a reason for hiding this comment

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

pass here just description, as it's the only parameter you need.

)


def attach_steps(module, entity_id, jobs_service):
Copy link
Contributor

Choose a reason for hiding this comment

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

here you need just a 'steps' not whole module as well.

)


def attach_steps(module, entity_id, jobs_service):
Copy link
Contributor

Choose a reason for hiding this comment

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

also please rename entity_id to job_id, no need to have it too generic here

ret = {
'changed': changed,
'id': getattr(job, 'id', None),
type(job).__name__.lower(): get_dict_of_struct(
Copy link
Contributor

Choose a reason for hiding this comment

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

change 'type(job).name.lower()' to just 'job' no need to do it generic here

type(job).__name__.lower(): get_dict_of_struct(
struct=job,
connection=connection,
fetch_nested=module.params.get('fetch_nested'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add here fetch_nested=True, because we always want to return steps.

required: true
state:
description:
- "Should the setp be present/absent/failed."
Copy link
Contributor

Choose a reason for hiding this comment

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

s/setp/step

state:
description:
- "Should the job be present/absent/failed."
- "Present have alias started and absent have alias finished, you can use both."
Copy link
Contributor

Choose a reason for hiding this comment

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

please use C() around possible values of the state

state:
description:
- "Should the job be present/absent/failed."
- "Present have alias started and absent have alias finished, you can use both."
Copy link
Contributor

Choose a reason for hiding this comment

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

I would write: C(started) is alias for C(present). C(finished) is alias for C(absent). Same in the steps.

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 18, 2019
@ansibot
Copy link
Contributor

ansibot commented Apr 18, 2019

@KKoukiou @derez @machacekondra @mwperina @nasx

As a maintainer of a module in the same namespace this new module has been submitted to, your vote counts for shipits. Please review this module and add shipit if you would like to see it merged.

click here for bot help

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Apr 18, 2019
@machacekondra
Copy link
Contributor

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. labels Apr 24, 2019
Copy link
Contributor

@mwperina mwperina left a comment

Choose a reason for hiding this comment

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

shipit

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed shipit This PR is ready to be merged by Core labels May 15, 2019
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 23, 2019
@machacekondra
Copy link
Contributor

shipit

@ansibot ansibot added shipit This PR is ready to be merged by Core and removed community_review In order to be merged, this PR must follow the community review workflow. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jun 5, 2019
@resmo resmo merged commit c5dc48d into ansible:devel Jun 10, 2019
agowa pushed a commit to agowa/ansible-1 that referenced this pull request Jun 30, 2019
* init ovirt_job module

* ovirt job add state finished

* redone logic in ovirt job

* ovirt jobs add docs

* ovirt job update docs

* update failed status

* ovirt job update return docs

* ovirt job update docs

* check if job and step has finished

* remove job status end
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 cloud module This issue/PR relates to a module. new_module This PR includes a new module. new_plugin This PR includes a new plugin. ovirt oVirt and RHV community shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants