-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Reserved Instance cli public PR #4838
Conversation
View a preview at https://prompt.ws/r/Azure/azure-cli/4838 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There's no help for several commands. e.g.
az reservations -h
. Help is required for all commands. - A lot of params don't have help text either.
Release History | ||
=============== | ||
|
||
0.1.0 (2017-11-06) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the date. It's no longer required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
@@ -0,0 +1 @@ | |||
__import__('pkg_resources').declare_namespace(__name__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use like other modules:
import pkg_resources
pkg_resources.declare_namespace(__name__)
Same with the other init files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
# -------------------------------------------------------------------------------------------- | ||
|
||
from azure.cli.core.help_files import helps | ||
# pylint: disable=line-too-long |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this. None of the lines in this file is too long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
type: string | ||
- name: --reservation-id-1 -1 | ||
type: string | ||
- name: --reservation-id-2 -2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a short summary for each of these parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary added for all parameters
|
||
def cli_reservation_update_reservation(client, reservation_order_id, reservation_id, | ||
applied_scope_type, applied_scopes=None): | ||
if applied_scopes is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if applied_scopes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Got this error from CI build: So I added this line to doc/sphinx/azhelpgen/doc_source_map.json |
@derekbekoe this PR looks good to me. Besides the CI. |
@@ -0,0 +1,7 @@ | |||
Microsoft Azure CLI 'reservations' Command Module | |||
============================================ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heading should be full length of the title.
CI may fail due to this.
def cli_reservation_split_reservation(client, reservation_order_id, reservation_id, quantity_1, quantity_2): | ||
split = SplitRequest([quantity_1, quantity_2], create_resource_id(reservation_order_id, reservation_id)) | ||
x = client.split(reservation_order_id, split) | ||
return x |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just return client.split(reservation_order_id, split)
?
def test_get_applied_reservation_order_ids(self): | ||
result = self.cmd('az reservations reservation-order-id list --subscription-id 00000000-0000-0000-0000-000000000000').get_output_in_json() | ||
for order_id in result['reservationOrderIds']['value']: | ||
self.assertTrue('/providers/Microsoft.Capacity/reservationorders/' in order_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use self.assertIn. This would give a clearer error message on failure.
Similar elsewhere.
https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertIn
for order in reservation_order_list: | ||
self._validate_reservation_order(order) | ||
self.assertTrue('/providers/microsoft.capacity/reservationOrders/' in order['id']) | ||
self.assertTrue(order['etag'] > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assertGreater(a, b)
vmss: support basic tier of vms (Azure#4847) Azure IoT CA functionality (Azure#4804) * Adds support for X.509 Certificates in IoT Hub. * Modifies release notes and changes help link. * Cleans up .gitignore, and HISTORY.rst. Passes a single factory in commands.py. Moves test utilities. Adds a file completer. * Updates style after rebase based on additional linter restrictions. Reserved Instance cli public PR (Azure#4838) Handle dashes in extension names better (Azure#4839) Fix `az aks get-credentials` on Windows (Azure#4762) * Fix `az aks get-credentials` on Windows * Move k8s file merge logic to helper function appservice: support assign managed service identity to webapp/functionapp (Azure#4837) Extension examples small improvement (Azure#4852) Fixing appservice list-locations (Azure#4846) Add extension name to telemetry and UA header (Azure#4854) Fix Azure#4825. (Azure#4853) Extensions `az extension add` --yes param as flag (Azure#4858) Fix issue Azure#2752. (Azure#4859)
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
Command Guidelines
(see Authoring Command Modules)