Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
test latest spec from Azure/azure-rest-api-specs#6653
Browse files Browse the repository at this point in the history
  • Loading branch information
ctaggart committed Jul 17, 2019
1 parent 89e60de commit fdea390
Show file tree
Hide file tree
Showing 14 changed files with 661 additions and 195 deletions.
13 changes: 7 additions & 6 deletions autorest.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh -e
# swagger validation
# https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-checklist.md#validation-tools-for-swagger-checklist
oav validate-spec vmwarevirtustream.json
oav validate-example vmwarevirtustream.json
autorest --input-file=vmwarevirtustream.json --azure-validator --openapi-type=arm
#!/bin/sh
# set -e
# swagger validation
# https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/swagger-checklist.md#validation-tools-for-swagger-checklist
oav validate-spec vmwarevirtustream.json
oav validate-example vmwarevirtustream.json
autorest --input-file=vmwarevirtustream.json --azure-validator --openapi-type=arm
autorest --input-file=vmwarevirtustream.json --python --output-folder=azext_vmware --namespace=vendored_sdks --azure-arm=true --override-client-name=VirtustreamClient [email protected]/autorest.python@~3.0.56
465 changes: 306 additions & 159 deletions azext_vmware/tests/latest/recordings/test_vmware.yaml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions azext_vmware/vendored_sdks/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# --------------------------------------------------------------------------

try:
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .global_reach_connection_request_py3 import GlobalReachConnectionRequest
from .delete_global_reach_connection_request_py3 import DeleteGlobalReachConnectionRequest
from .global_reach_connection_py3 import GlobalReachConnection
Expand All @@ -27,6 +29,8 @@
from .get_admin_credentials_response_py3 import GetAdminCredentialsResponse
from .move_resource_request_py3 import MoveResourceRequest
except (SyntaxError, ImportError):
from .operation_display import OperationDisplay
from .operation import Operation
from .global_reach_connection_request import GlobalReachConnectionRequest
from .delete_global_reach_connection_request import DeleteGlobalReachConnectionRequest
from .global_reach_connection import GlobalReachConnection
Expand All @@ -47,8 +51,11 @@
from .azure_operation_status import AzureOperationStatus
from .get_admin_credentials_response import GetAdminCredentialsResponse
from .move_resource_request import MoveResourceRequest
from .operation_paged import OperationPaged

__all__ = [
'OperationDisplay',
'Operation',
'GlobalReachConnectionRequest',
'DeleteGlobalReachConnectionRequest',
'GlobalReachConnection',
Expand All @@ -69,4 +76,5 @@
'AzureOperationStatus',
'GetAdminCredentialsResponse',
'MoveResourceRequest',
'OperationPaged',
]
25 changes: 19 additions & 6 deletions azext_vmware/vendored_sdks/models/azure_cluster_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,29 @@
class AzureClusterResponse(Model):
"""AzureClusterResponse.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id:
:vartype id: str
:param location:
:type location: str
:param name:
:type name: str
:ivar name:
:vartype name: str
:param properties:
:type properties: ~vendored_sdks.models.Cluster
:param type:
:type type: str
:ivar type:
:vartype type: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'Cluster'},
Expand All @@ -30,7 +42,8 @@ class AzureClusterResponse(Model):

def __init__(self, **kwargs):
super(AzureClusterResponse, self).__init__(**kwargs)
self.id = None
self.location = kwargs.get('location', None)
self.name = kwargs.get('name', None)
self.name = None
self.properties = kwargs.get('properties', None)
self.type = kwargs.get('type', None)
self.type = None
27 changes: 20 additions & 7 deletions azext_vmware/vendored_sdks/models/azure_cluster_response_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,39 @@
class AzureClusterResponse(Model):
"""AzureClusterResponse.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id:
:vartype id: str
:param location:
:type location: str
:param name:
:type name: str
:ivar name:
:vartype name: str
:param properties:
:type properties: ~vendored_sdks.models.Cluster
:param type:
:type type: str
:ivar type:
:vartype type: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

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

def __init__(self, *, location: str=None, name: str=None, properties=None, type: str=None, **kwargs) -> None:
def __init__(self, *, location: str=None, properties=None, **kwargs) -> None:
super(AzureClusterResponse, self).__init__(**kwargs)
self.id = None
self.location = location
self.name = name
self.name = None
self.properties = properties
self.type = type
self.type = None
25 changes: 19 additions & 6 deletions azext_vmware/vendored_sdks/models/azure_private_cloud_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,31 @@
class AzurePrivateCloudResponse(Model):
"""AzurePrivateCloudResponse.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id:
:vartype id: str
:param location:
:type location: str
:param name:
:type name: str
:ivar name:
:vartype name: str
:param properties:
:type properties: ~vendored_sdks.models.PrivateCloud
:param type:
:type type: str
:ivar type:
:vartype type: str
:param tags:
:type tags: object
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'PrivateCloud'},
Expand All @@ -33,8 +45,9 @@ class AzurePrivateCloudResponse(Model):

def __init__(self, **kwargs):
super(AzurePrivateCloudResponse, self).__init__(**kwargs)
self.id = None
self.location = kwargs.get('location', None)
self.name = kwargs.get('name', None)
self.name = None
self.properties = kwargs.get('properties', None)
self.type = kwargs.get('type', None)
self.type = None
self.tags = kwargs.get('tags', None)
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,43 @@
class AzurePrivateCloudResponse(Model):
"""AzurePrivateCloudResponse.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id:
:vartype id: str
:param location:
:type location: str
:param name:
:type name: str
:ivar name:
:vartype name: str
:param properties:
:type properties: ~vendored_sdks.models.PrivateCloud
:param type:
:type type: str
:ivar type:
:vartype type: str
:param tags:
:type tags: object
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'properties': {'key': 'properties', 'type': 'PrivateCloud'},
'type': {'key': 'type', 'type': 'str'},
'tags': {'key': 'tags', 'type': 'object'},
}

def __init__(self, *, location: str=None, name: str=None, properties=None, type: str=None, tags=None, **kwargs) -> None:
def __init__(self, *, location: str=None, properties=None, tags=None, **kwargs) -> None:
super(AzurePrivateCloudResponse, self).__init__(**kwargs)
self.id = None
self.location = location
self.name = name
self.name = None
self.properties = properties
self.type = type
self.type = None
self.tags = tags
38 changes: 38 additions & 0 deletions azext_vmware/vendored_sdks/models/operation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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):
"""A REST API operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar name: The name of the operation being performed on this particular
object.
:vartype name: str
:ivar display: Contains the localized display information for this
particular operation / action.
:vartype display: ~vendored_sdks.models.OperationDisplay
"""

_validation = {
'name': {'readonly': True},
'display': {'readonly': True},
}

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

def __init__(self, **kwargs):
super(Operation, self).__init__(**kwargs)
self.name = None
self.display = None
48 changes: 48 additions & 0 deletions azext_vmware/vendored_sdks/models/operation_display.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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):
"""Contains the localized display information for this particular operation /
action.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar provider: The localized friendly form of the resource provider name.
:vartype provider: str
:ivar resource: The localized friendly form of the resource type related
to this action/operation.
:vartype resource: str
:ivar operation: The localized friendly name for the operation.
:vartype operation: str
:ivar description: The localized friendly description for the operation.
:vartype description: str
"""

_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
'description': {'readonly': True},
}

_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 = None
self.resource = None
self.operation = None
self.description = None
48 changes: 48 additions & 0 deletions azext_vmware/vendored_sdks/models/operation_display_py3.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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):
"""Contains the localized display information for this particular operation /
action.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar provider: The localized friendly form of the resource provider name.
:vartype provider: str
:ivar resource: The localized friendly form of the resource type related
to this action/operation.
:vartype resource: str
:ivar operation: The localized friendly name for the operation.
:vartype operation: str
:ivar description: The localized friendly description for the operation.
:vartype description: str
"""

_validation = {
'provider': {'readonly': True},
'resource': {'readonly': True},
'operation': {'readonly': True},
'description': {'readonly': True},
}

_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) -> None:
super(OperationDisplay, self).__init__(**kwargs)
self.provider = None
self.resource = None
self.operation = None
self.description = None
Loading

0 comments on commit fdea390

Please sign in to comment.