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

Incorporating ARM feedback #18

Merged
merged 3 commits into from
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/quantum/azext_quantum/operations/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def create(cmd, resource_group_name=None, workspace_name=None, location=None, st
if (not info.resource_group):
raise CLIError("Please run 'az quantum workspace set' first to select a default Quantum Workspace.")
quantum_workspace = get_basic_quantum_workspace(location, info, storage_account)
return client.create_and_update(info.resource_group, info.name, quantum_workspace, polling=False)
return client.create_or_update(info.resource_group, info.name, quantum_workspace, polling=False)


def delete(cmd, resource_group_name=None, workspace_name=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,40 @@
try:
from .error_definition_py3 import ErrorDefinition
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .provider_py3 import Provider
from .quantum_workspace_identity_py3 import QuantumWorkspaceIdentity
from .quantum_workspace_py3 import QuantumWorkspace
from .provider_description_properties_py3 import ProviderDescriptionProperties
from .provider_description_py3 import ProviderDescription
from .provider_py3 import Provider
from .workspace_resource_properties_py3 import WorkspaceResourceProperties
from .provider_properties_aad_py3 import ProviderPropertiesAad
from .provider_properties_managed_application_py3 import ProviderPropertiesManagedApplication
from .target_description_py3 import TargetDescription
from .quota_dimension_py3 import QuotaDimension
from .pricing_detail_py3 import PricingDetail
from .sku_description_py3 import SkuDescription
from .pricing_dimension_py3 import PricingDimension
from .provider_properties_py3 import ProviderProperties
from .provider_description_py3 import ProviderDescription
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
except (SyntaxError, ImportError):
from .error_definition import ErrorDefinition
from .error_response import ErrorResponse, ErrorResponseException
from .provider import Provider
from .quantum_workspace_identity import QuantumWorkspaceIdentity
from .quantum_workspace import QuantumWorkspace
from .provider_description_properties import ProviderDescriptionProperties
from .provider_description import ProviderDescription
from .provider import Provider
from .workspace_resource_properties import WorkspaceResourceProperties
from .provider_properties_aad import ProviderPropertiesAad
from .provider_properties_managed_application import ProviderPropertiesManagedApplication
from .target_description import TargetDescription
from .quota_dimension import QuotaDimension
from .pricing_detail import PricingDetail
from .sku_description import SkuDescription
from .pricing_dimension import PricingDimension
from .provider_properties import ProviderProperties
from .provider_description import ProviderDescription
from .operation_display import OperationDisplay
from .operation import Operation
from .quantum_workspace_paged import QuantumWorkspacePaged
from .provider_description_paged import ProviderDescriptionPaged
from .operation_paged import OperationPaged
from .quantum_management_client_enums import (
Status,
UsableStatus,
Expand All @@ -48,19 +55,23 @@
__all__ = [
'ErrorDefinition',
'ErrorResponse', 'ErrorResponseException',
'Provider',
'QuantumWorkspaceIdentity',
'QuantumWorkspace',
'ProviderDescriptionProperties',
'ProviderDescription',
'Provider',
'WorkspaceResourceProperties',
'ProviderPropertiesAad',
'ProviderPropertiesManagedApplication',
'TargetDescription',
'QuotaDimension',
'PricingDetail',
'SkuDescription',
'PricingDimension',
'ProviderProperties',
'ProviderDescription',
'OperationDisplay',
'Operation',
'QuantumWorkspacePaged',
'ProviderDescriptionPaged',
'OperationPaged',
'Status',
'UsableStatus',
'ProvisioningStatus',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Operation(Model):
"""Operation provided by provider.

:param name: Name of the operation
:type name: str
:param display: Properties of the operation
:type display: ~quantum.models.OperationDisplay
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.display = kwargs.get('display', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class OperationDisplay(Model):
"""Properties of the operation.

:param provider: Provider name
:type provider: str
:param resource: Resource name
:type resource: str
:param operation: Operation name
:type operation: str
:param description: Description of the operation
:type description: str
"""

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, **kwargs):
super(OperationDisplay, self).__init__(**kwargs)
self.provider = kwargs.get('provider', None)
self.resource = kwargs.get('resource', None)
self.operation = kwargs.get('operation', None)
self.description = kwargs.get('description', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class OperationDisplay(Model):
"""Properties of the operation.

:param provider: Provider name
:type provider: str
:param resource: Resource name
:type resource: str
:param operation: Operation name
:type operation: str
:param description: Description of the operation
:type description: str
"""

_attribute_map = {
'provider': {'key': 'provider', 'type': 'str'},
'resource': {'key': 'resource', 'type': 'str'},
'operation': {'key': 'operation', 'type': 'str'},
'description': {'key': 'description', 'type': 'str'},
}

def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = provider
self.resource = resource
self.operation = operation
self.description = description
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class OperationPaged(Paged):
"""
A paging container for iterating over a list of :class:`Operation <quantum.models.Operation>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Operation]'}
}

def __init__(self, *args, **kwargs):

super(OperationPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class Operation(Model):
"""Operation provided by provider.

:param name: Name of the operation
:type name: str
:param display: Properties of the operation
:type display: ~quantum.models.OperationDisplay
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'display': {'key': 'display', 'type': 'OperationDisplay'},
}

def __init__(self, *, name: str=None, display=None, **kwargs) -> None:
super(Operation, self).__init__(**kwargs)
self.name = name
self.display = display
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class PricingDetail(Model):
"""Detailed pricing information for an sku.

:param id: Unique id for this pricing information.
:type id: str
:param value: The unit cost of this sku.
:type value: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PricingDetail, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.value = kwargs.get('value', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class PricingDetail(Model):
"""Detailed pricing information for an sku.

:param id: Unique id for this pricing information.
:type id: str
:param value: The unit cost of this sku.
:type value: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'value': {'key': 'value', 'type': 'str'},
}

def __init__(self, *, id: str=None, value: str=None, **kwargs) -> None:
super(PricingDetail, self).__init__(**kwargs)
self.id = id
self.value = value
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class PricingDimension(Model):
"""Information about pricing dimension.

:param id: Unique id of this pricing dimension.
:type id: str
:param name: The display name of this pricing dimension.
:type name: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
}

def __init__(self, **kwargs):
super(PricingDimension, self).__init__(**kwargs)
self.id = kwargs.get('id', None)
self.name = kwargs.get('name', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class PricingDimension(Model):
"""Information about pricing dimension.

:param id: Unique id of this pricing dimension.
:type id: str
:param name: The display name of this pricing dimension.
:type name: str
"""

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
}

def __init__(self, *, id: str=None, name: str=None, **kwargs) -> None:
super(PricingDimension, self).__init__(**kwargs)
self.id = id
self.name = name
Loading