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

Sync the syspurpose on runs of each relevant command #1898

Merged
merged 1 commit into from Aug 23, 2018
Merged

Conversation

cnsnyder
Copy link
Member

This revises the Role, Usage, Addons, and ServiceLevel Commands.
Each of these now perform the sync action and display a message with a course of action if the result is not as expected.

The way to get this message to show up is in the reproducer steps in This bug

@wottop wottop self-assigned this Aug 13, 2018
@cnsnyder
Copy link
Member Author

@candlepin-pull-request-bot please retest this.

@wottop
Copy link
Member

wottop commented Aug 13, 2018

When I run locally, I get

optparse.OptionConflictError: option --set: conflicting option string(s): --set

@cnsnyder
Copy link
Member Author

@wottop That is fixed now. Along with other updates! Will ask @jirihnidek for review in the meanwhile as he'll be on before us tomorrow.

@jirihnidek
Copy link
Contributor

@cnsnyder I try to fix most of issues in this PR.

@jirihnidek
Copy link
Contributor

@cnsnyder I tried to fix several issues. Some unit tests are still falling. I will try to fix it later.


def set(self):
self._set(self.options.set)
success_msg = "{attr} set to \"{val}\".".format(attr=self.attr, val=self.options.set)
Copy link
Member

Choose a reason for hiding this comment

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

translated?


def add(self):
self._add(self.options.to_add)
success_msg = "{attr} updated.".format(attr=self.name)
Copy link
Member

Choose a reason for hiding this comment

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

translated?


def unset(self):
self._unset()
success_msg = "{attr} unset.".format(attr=self.attr)
Copy link
Member

Choose a reason for hiding this comment

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

translated?


def remove(self):
self._remove(self.options.to_remove)
success_msg = "{attr} updated.".format(attr=self.name.capitalize())
Copy link
Member

Choose a reason for hiding this comment

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

translated?

# help=_("service level to apply to this system"))
# self.parser.add_option("--unset", dest="unset",
# action='store_true',
# help=_("unset the service level for this system"))

Copy link
Member

Choose a reason for hiding this comment

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

Are we keeping these as comments for a reason?

@cnsnyder
Copy link
Member Author

@candlepin-pull-request-bot Retest this please

2 similar comments
@cnsnyder
Copy link
Member Author

@candlepin-pull-request-bot Retest this please

@cnsnyder
Copy link
Member Author

@candlepin-pull-request-bot Retest this please

@cnsnyder
Copy link
Member Author

@candlepin-pull-request-bot Retest this please

* When system purpose is changed using followinf subcommands:
  service-level, role, usage, addons, then system purpose
  is synchronized with candlepin server
* TODO: fix debug log of report message for this case
@wottop
Copy link
Member

wottop commented Aug 23, 2018

ack

@wottop wottop merged commit 2478de7 into master Aug 23, 2018
@wottop wottop deleted the csnyder/ENT-767 branch August 23, 2018 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants