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

[AutoPR azure-mgmt-databoxedge] Fix Swagger Correctness S360:Additional properties not allowed: capabilities #5435

Closed
Closed
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
1 change: 1 addition & 0 deletions sdk/databoxedge/azure-mgmt-databoxedge/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/databoxedge/azure-mgmt-databoxedge/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "V2",
"use": "@microsoft.azure/autorest.python@~4.0.71",
"commit": "1687e105fc76a9021387244a220407068f00c782",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/databoxedge/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2",
"readme": "specification/databoxedge/resource-manager/readme.md"
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
# license information.
# --------------------------------------------------------------------------
from .v2019_08_01.models import *
from .v2020_12_01.models import *
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
from ._models_py3 import Sku
from ._models_py3 import SKUCapability
from ._models_py3 import SkuCost
from ._models_py3 import SKUCost
from ._models_py3 import SkuInformation
from ._models_py3 import SkuLocationInfo
from ._models_py3 import SkuRestriction
Expand Down Expand Up @@ -128,7 +127,6 @@
from ._models import Sku
from ._models import SKUCapability
from ._models import SkuCost
from ._models import SKUCost
from ._models import SkuInformation
from ._models import SkuLocationInfo
from ._models import SkuRestriction
Expand Down Expand Up @@ -259,7 +257,6 @@
'Sku',
'SKUCapability',
'SkuCost',
'SKUCost',
'SkuInformation',
'SkuLocationInfo',
'SkuRestriction',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2412,39 +2412,6 @@ def __init__(self, **kwargs):
self.extended_unit = None


class SKUCost(Model):
"""The cost of the SKU.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar meter_id: The meter id
:vartype meter_id: str
:ivar quantity: The quantity
:vartype quantity: int
:ivar extended_unit: The extended unit
:vartype extended_unit: str
"""

_validation = {
'meter_id': {'readonly': True},
'quantity': {'readonly': True},
'extended_unit': {'readonly': True},
}

_attribute_map = {
'meter_id': {'key': 'meterId', 'type': 'str'},
'quantity': {'key': 'quantity', 'type': 'int'},
'extended_unit': {'key': 'extendedUnit', 'type': 'str'},
}

def __init__(self, **kwargs):
super(SKUCost, self).__init__(**kwargs)
self.meter_id = None
self.quantity = None
self.extended_unit = None


class SkuInformation(Model):
"""Sku information.

Expand Down Expand Up @@ -2476,7 +2443,7 @@ class SkuInformation(Model):
available.
:vartype required_features: list[str]
:ivar costs: The cost of the SKU
:vartype costs: list[~azure.mgmt.databoxedge.models.SKUCost]
:vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost]
:ivar capabilities: The capabilities of the SKU
:vartype capabilities: list[~azure.mgmt.databoxedge.models.SKUCapability]
"""
Expand Down Expand Up @@ -2507,7 +2474,7 @@ class SkuInformation(Model):
'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'},
'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'},
'required_features': {'key': 'requiredFeatures', 'type': '[str]'},
'costs': {'key': 'costs', 'type': '[SKUCost]'},
'costs': {'key': 'costs', 'type': '[SkuCost]'},
'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2412,39 +2412,6 @@ def __init__(self, **kwargs) -> None:
self.extended_unit = None


class SKUCost(Model):
"""The cost of the SKU.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar meter_id: The meter id
:vartype meter_id: str
:ivar quantity: The quantity
:vartype quantity: int
:ivar extended_unit: The extended unit
:vartype extended_unit: str
"""

_validation = {
'meter_id': {'readonly': True},
'quantity': {'readonly': True},
'extended_unit': {'readonly': True},
}

_attribute_map = {
'meter_id': {'key': 'meterId', 'type': 'str'},
'quantity': {'key': 'quantity', 'type': 'int'},
'extended_unit': {'key': 'extendedUnit', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(SKUCost, self).__init__(**kwargs)
self.meter_id = None
self.quantity = None
self.extended_unit = None


class SkuInformation(Model):
"""Sku information.

Expand Down Expand Up @@ -2476,7 +2443,7 @@ class SkuInformation(Model):
available.
:vartype required_features: list[str]
:ivar costs: The cost of the SKU
:vartype costs: list[~azure.mgmt.databoxedge.models.SKUCost]
:vartype costs: list[~azure.mgmt.databoxedge.models.SkuCost]
:ivar capabilities: The capabilities of the SKU
:vartype capabilities: list[~azure.mgmt.databoxedge.models.SKUCapability]
"""
Expand Down Expand Up @@ -2507,7 +2474,7 @@ class SkuInformation(Model):
'location_info': {'key': 'locationInfo', 'type': '[SkuLocationInfo]'},
'required_quota_ids': {'key': 'requiredQuotaIds', 'type': '[str]'},
'required_features': {'key': 'requiredFeatures', 'type': '[str]'},
'costs': {'key': 'costs', 'type': '[SKUCost]'},
'costs': {'key': 'costs', 'type': '[SkuCost]'},
'capabilities': {'key': 'capabilities', 'type': '[SKUCapability]'},
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._configuration import DataBoxEdgeManagementClientConfiguration
from ._data_box_edge_management_client import DataBoxEdgeManagementClient
__all__ = ['DataBoxEdgeManagementClient', 'DataBoxEdgeManagementClientConfiguration']

from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 msrestazure import AzureConfiguration

from .version import VERSION


class DataBoxEdgeManagementClientConfiguration(AzureConfiguration):
"""Configuration for DataBoxEdgeManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(DataBoxEdgeManagementClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-mgmt-databoxedge/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import DataBoxEdgeManagementClientConfiguration
from .operations import Operations
from .operations import AvailableSkusOperations
from .operations import DevicesOperations
from .operations import AlertsOperations
from .operations import BandwidthSchedulesOperations
from .operations import JobsOperations
from .operations import NodesOperations
from .operations import OperationsStatusOperations
from .operations import OrdersOperations
from .operations import RolesOperations
from .operations import AddonsOperations
from .operations import MonitoringConfigOperations
from .operations import SharesOperations
from .operations import StorageAccountCredentialsOperations
from .operations import StorageAccountsOperations
from .operations import ContainersOperations
from .operations import TriggersOperations
from .operations import UsersOperations
from . import models


class DataBoxEdgeManagementClient(SDKClient):
"""DataBoxEdgeManagementClient

:ivar config: Configuration for client.
:vartype config: DataBoxEdgeManagementClientConfiguration

:ivar operations: Operations operations
:vartype operations: azure.mgmt.databoxedge.operations.Operations
:ivar available_skus: AvailableSkus operations
:vartype available_skus: azure.mgmt.databoxedge.operations.AvailableSkusOperations
:ivar devices: Devices operations
:vartype devices: azure.mgmt.databoxedge.operations.DevicesOperations
:ivar alerts: Alerts operations
:vartype alerts: azure.mgmt.databoxedge.operations.AlertsOperations
:ivar bandwidth_schedules: BandwidthSchedules operations
:vartype bandwidth_schedules: azure.mgmt.databoxedge.operations.BandwidthSchedulesOperations
:ivar jobs: Jobs operations
:vartype jobs: azure.mgmt.databoxedge.operations.JobsOperations
:ivar nodes: Nodes operations
:vartype nodes: azure.mgmt.databoxedge.operations.NodesOperations
:ivar operations_status: OperationsStatus operations
:vartype operations_status: azure.mgmt.databoxedge.operations.OperationsStatusOperations
:ivar orders: Orders operations
:vartype orders: azure.mgmt.databoxedge.operations.OrdersOperations
:ivar roles: Roles operations
:vartype roles: azure.mgmt.databoxedge.operations.RolesOperations
:ivar addons: Addons operations
:vartype addons: azure.mgmt.databoxedge.operations.AddonsOperations
:ivar monitoring_config: MonitoringConfig operations
:vartype monitoring_config: azure.mgmt.databoxedge.operations.MonitoringConfigOperations
:ivar shares: Shares operations
:vartype shares: azure.mgmt.databoxedge.operations.SharesOperations
:ivar storage_account_credentials: StorageAccountCredentials operations
:vartype storage_account_credentials: azure.mgmt.databoxedge.operations.StorageAccountCredentialsOperations
:ivar storage_accounts: StorageAccounts operations
:vartype storage_accounts: azure.mgmt.databoxedge.operations.StorageAccountsOperations
:ivar containers: Containers operations
:vartype containers: azure.mgmt.databoxedge.operations.ContainersOperations
:ivar triggers: Triggers operations
:vartype triggers: azure.mgmt.databoxedge.operations.TriggersOperations
:ivar users: Users operations
:vartype users: azure.mgmt.databoxedge.operations.UsersOperations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription ID.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = DataBoxEdgeManagementClientConfiguration(credentials, subscription_id, base_url)
super(DataBoxEdgeManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2020-09-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.available_skus = AvailableSkusOperations(
self._client, self.config, self._serialize, self._deserialize)
self.devices = DevicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.alerts = AlertsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.bandwidth_schedules = BandwidthSchedulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.jobs = JobsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.nodes = NodesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations_status = OperationsStatusOperations(
self._client, self.config, self._serialize, self._deserialize)
self.orders = OrdersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.roles = RolesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.addons = AddonsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.monitoring_config = MonitoringConfigOperations(
self._client, self.config, self._serialize, self._deserialize)
self.shares = SharesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.storage_account_credentials = StorageAccountCredentialsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.storage_accounts = StorageAccountsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.containers = ContainersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.triggers = TriggersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.users = UsersOperations(
self._client, self.config, self._serialize, self._deserialize)
Loading