-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial scaffolding of submission v1 call * fixing clients setup * added http method to get reseller_configuration_branch * adding notes * added in method to get variant resources * updates to submission * adding returned submission mapping * cleanup * removing print from factory * code cleanup * light refactoring * style fixes * adding comment for design choice clarity * removed print statement * adding CLI error on unsupported offer types * fixing list and get commands * removing print statement * removing dead code and adding timeout to client * modifying general exception to CLIError --------- Co-authored-by: Jenny Chen <jijchen@microsoft.com>
- Loading branch information
Showing
9 changed files
with
329 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
partnercenter/azext_partnercenter/models/application_submission.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
# pylint: disable=too-many-instance-attributes | ||
# flake8: noqa: R0902 | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ApplicationSubmission(Model): | ||
_attribute_map = { | ||
'resource_type': {'key': 'resource_type', 'type': 'str'}, | ||
'state': {'key': 'state', 'type': 'str'}, | ||
'substate': {'key': 'substate', 'type': 'str'}, | ||
'targets': {'key': 'targets', 'type': '[TypeValue]'}, | ||
'resources': {'key': 'resources', 'type': '[TypeValue]'}, | ||
'variant_resources': {'key': 'variant_resources', 'type': '[SubmissionVariantResource]'}, | ||
'publish_option': {'key': 'publish_option', 'type': 'SubmissionPublishOption'}, | ||
'published_time_in_utc': {'key': 'published_time_in_utc', 'type': 'str'}, | ||
'pending_update_info': {'key': 'pending_update_info', 'type': 'PendingUpdateInfo'}, | ||
'extended_properties': {'key': 'extended_properties', 'type': '[TypeValue]'}, | ||
'release_number': {'key': 'release_number', 'type': 'int'}, | ||
'friendly_name': {'key': 'friendly_name', 'type': 'str'}, | ||
'are_resources_ready': {'key': 'are_resources_ready', 'type': 'bool'}, | ||
'id': {'key': 'id', 'type': 'str'} | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
self.resource_type = kwargs.get('resource_type', None) | ||
self.state = kwargs.get('state', None) | ||
self.substate = kwargs.get('substate', None) | ||
self.targets = kwargs.get('targets', []) | ||
self.resources = kwargs.get('resources', []) | ||
self.variant_resources = kwargs.get('variant_resources', []) | ||
self.publish_option = kwargs.get('publish_option', None) | ||
self.published_time_in_utc = kwargs.get('published_time_in_utc', None) | ||
self.pending_update_info = kwargs.get('pending_update_info', None) | ||
self.extended_properties = kwargs.get('extended_properties', []) | ||
self.release_number = kwargs.get('release_number', 0) | ||
self.friendly_name = kwargs.get('friendly_name', None) | ||
self.are_resources_ready = kwargs.get('are_resources_ready', False) | ||
self.id = kwargs.get('id', None) |
22 changes: 22 additions & 0 deletions
22
partnercenter/azext_partnercenter/models/pending_update_info.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class PendingUpdateInfo(Model): | ||
_attribute_map = { | ||
'update_type': {'key': 'update_type', 'type': 'str'}, | ||
'status': {'key': 'status', 'type': 'str'}, | ||
'href': {'key': 'href', 'type': 'str'}, | ||
'failure_reason': {'key': 'failure_reason', 'type': 'str'} | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
self.update_type = kwargs.get('update_type', None) | ||
self.status = kwargs.get('status', None) | ||
self.href = kwargs.get('href', None) | ||
self.failure_reason = kwargs.get('failure_reason', None) |
22 changes: 22 additions & 0 deletions
22
partnercenter/azext_partnercenter/models/submission_publish_option.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class SubmissionPublishOption(Model): | ||
_attribute_map = { | ||
'release_time_in_utc': {'key': 'release_time_in_utc', 'type': 'str'}, | ||
'is_manual_publish': {'key': 'is_manual_publish', 'type': 'bool'}, | ||
'is_auto_promote': {'key': 'is_auto_promote', 'type': 'bool'}, | ||
'certification_notes': {'key': 'certification_notes', 'type': 'str'} | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
self.release_time_in_utc = kwargs.get('release_time_in_utc', None) | ||
self.is_manual_publish = kwargs.get('is_manual_publish', False) | ||
self.is_auto_promote = kwargs.get('is_auto_promote', False) | ||
self.certification_notes = kwargs.get('certification_notes', None) |
18 changes: 18 additions & 0 deletions
18
partnercenter/azext_partnercenter/models/submission_variant_resource.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class SubmissionVariantResource(Model): | ||
_attribute_map = { | ||
'variant_id': {'key': 'variant_id', 'type': 'str'}, | ||
'resources': {'key': 'resources', 'type': '[TypeValue]'} | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
self.id = kwargs.get('variant_id', None) | ||
self.name = kwargs.get('resources', []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class TypeValue(Model): | ||
_attribute_map = { | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'value': {'key': 'value', 'type': 'str'} | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super().__init__(**kwargs) | ||
self.type = kwargs.get('type', None) | ||
self.value = kwargs.get('value', None) |
Oops, something went wrong.