зеркало из https://github.com/Azure/ARO-RP.git
remove non-generated files, rearrange path structure and Makefile
This commit is contained in:
Родитель
4a52e9d3f0
Коммит
f2382c78cb
25
Makefile
25
Makefile
|
@ -6,14 +6,13 @@ rp:
|
|||
clean:
|
||||
rm -f rp
|
||||
|
||||
client: client-go client-python
|
||||
|
||||
client-go:
|
||||
client:
|
||||
go generate ./...
|
||||
rm -rf pkg/client
|
||||
rm -rf azure-python-sdk pkg/client
|
||||
mkdir azure-python-sdk pkg/client
|
||||
sha256sum swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2019-12-31-preview/redhatopenshift.json >.sha256sum
|
||||
|
||||
sudo docker run \
|
||||
--net host \
|
||||
-v $(PWD)/pkg/client:/github.com/jim-minter/rp/pkg/client \
|
||||
-v $(PWD)/swagger:/swagger \
|
||||
azuresdk/autorest \
|
||||
|
@ -22,23 +21,19 @@ client-go:
|
|||
--input-file=/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2019-12-31-preview/redhatopenshift.json \
|
||||
--output-folder=/github.com/jim-minter/rp/pkg/client/services/preview/redhatopenshift/mgmt/2019-12-31-preview/redhatopenshift
|
||||
|
||||
sudo chown -R $(USER):$(USER) pkg/client
|
||||
go run ./vendor/golang.org/x/tools/cmd/goimports -w -local=github.com/jim-minter/rp pkg/client
|
||||
|
||||
client-python:
|
||||
go generate ./...
|
||||
sudo docker run \
|
||||
--net host \
|
||||
-v $(PWD)/az:/az \
|
||||
-v $(PWD)/azure-python-sdk:/azure-python-sdk \
|
||||
-v $(PWD)/swagger:/swagger \
|
||||
azuresdk/autorest \
|
||||
--use=@microsoft.azure/autorest.python@4.0.70 \
|
||||
--python \
|
||||
--azure-arm \
|
||||
--input-file=/swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2019-12-31-preview/redhatopenshift.json \
|
||||
--output-folder=/az/azure-python-sdk/2019-12-31-preview
|
||||
--output-folder=/azure-python-sdk/2019-12-31-preview
|
||||
|
||||
sudo chown -R $(USER):$(USER) az
|
||||
sudo chown -R $(USER):$(USER) azure-python-sdk pkg/client
|
||||
|
||||
go run ./vendor/golang.org/x/tools/cmd/goimports -w -local=github.com/jim-minter/rp pkg/client
|
||||
|
||||
image: rp
|
||||
docker build -t rp:$(COMMIT) .
|
||||
|
@ -65,4 +60,4 @@ test:
|
|||
go vet ./...
|
||||
go test ./...
|
||||
|
||||
.PHONY: rp clean client client-go client-python image secrets-update test
|
||||
.PHONY: rp clean client image secrets secrets-update test
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
# 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.service_client import ServiceClient
|
||||
from msrest import Configuration, Serializer, Deserializer
|
||||
from .version import VERSION
|
||||
from .operations.operations import Operations
|
||||
from .operations.open_shift_clusters_operations import OpenShiftClustersOperations
|
||||
from . import models
|
||||
|
||||
|
||||
class AzureRedHatOpenShiftClientConfiguration(Configuration):
|
||||
"""Configuration for AzureRedHatOpenShiftClient
|
||||
Note that all parameters used to create this instance are saved as instance
|
||||
attributes.
|
||||
|
||||
:param subscription_id: Subscription credentials which uniquely identify
|
||||
Microsoft Azure subscription. The subscription ID forms part of the URI
|
||||
for every service call.
|
||||
:type subscription_id: str
|
||||
:param credentials: Subscription credentials which uniquely identify
|
||||
client subscription.
|
||||
:type credentials: None
|
||||
:param str base_url: Service URL
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, subscription_id, credentials, base_url=None):
|
||||
|
||||
if subscription_id is None:
|
||||
raise ValueError("Parameter 'subscription_id' must not be None.")
|
||||
if credentials is None:
|
||||
raise ValueError("Parameter 'credentials' must not be None.")
|
||||
if not base_url:
|
||||
base_url = 'https://management.azure.com'
|
||||
|
||||
super(AzureRedHatOpenShiftClientConfiguration, self).__init__(base_url)
|
||||
|
||||
self.add_user_agent('azureredhatopenshiftclient/{}'.format(VERSION))
|
||||
|
||||
self.subscription_id = subscription_id
|
||||
self.credentials = credentials
|
||||
|
||||
|
||||
class AzureRedHatOpenShiftClient(object):
|
||||
"""Rest API for Azure Red Hat OpenShift
|
||||
|
||||
:ivar config: Configuration for client.
|
||||
:vartype config: AzureRedHatOpenShiftClientConfiguration
|
||||
|
||||
:ivar operations: Operations operations
|
||||
:vartype operations: redhatopenshift.operations.Operations
|
||||
:ivar open_shift_clusters: OpenShiftClusters operations
|
||||
:vartype open_shift_clusters: redhatopenshift.operations.OpenShiftClustersOperations
|
||||
|
||||
:param subscription_id: Subscription credentials which uniquely identify
|
||||
Microsoft Azure subscription. The subscription ID forms part of the URI
|
||||
for every service call.
|
||||
:type subscription_id: str
|
||||
:param credentials: Subscription credentials which uniquely identify
|
||||
client subscription.
|
||||
:type credentials: None
|
||||
:param str base_url: Service URL
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, subscription_id, credentials, base_url=None):
|
||||
|
||||
self.config = AzureRedHatOpenShiftClientConfiguration(subscription_id, credentials, base_url)
|
||||
self._client = ServiceClient(self.config.credentials, self.config)
|
||||
|
||||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
|
||||
self.api_version = '2019-12-31-preview'
|
||||
self._serialize = Serializer(client_models)
|
||||
self._deserialize = Deserializer(client_models)
|
||||
|
||||
self.operations = Operations(
|
||||
self._client, self.config, self._serialize, self._deserialize)
|
||||
self.open_shift_clusters = OpenShiftClustersOperations(
|
||||
self._client, self.config, self._serialize, self._deserialize)
|
|
@ -1,37 +0,0 @@
|
|||
# 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
|
||||
from msrest.exceptions import HttpOperationError
|
||||
|
||||
|
||||
class CloudError(Model):
|
||||
"""CloudError represents a cloud error.
|
||||
|
||||
:param error: An error response from the service.
|
||||
:type error: ~redhatopenshift.models.CloudErrorBody
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'error': {'key': 'error', 'type': 'CloudErrorBody'},
|
||||
}
|
||||
|
||||
def __init__(self, error=None):
|
||||
super(CloudError, self).__init__()
|
||||
self.error = error
|
||||
|
||||
|
||||
class CloudErrorException(HttpOperationError):
|
||||
"""Server responsed with exception of type: 'CloudError'.
|
||||
|
||||
:param deserialize: A deserializer
|
||||
:param response: Server response to be deserialized.
|
||||
"""
|
||||
|
||||
def __init__(self, deserialize, response, *args):
|
||||
|
||||
super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args)
|
|
@ -1,39 +0,0 @@
|
|||
# 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 CloudErrorBody(Model):
|
||||
"""CloudErrorBody represents the body of a cloud error.
|
||||
|
||||
:param code: An identifier for the error. Codes are invariant and are
|
||||
intended to be consumed programmatically.
|
||||
:type code: str
|
||||
:param message: A message describing the error, intended to be suitable
|
||||
for display in a user interface.
|
||||
:type message: str
|
||||
:param target: The target of the particular error. For example, the name
|
||||
of the property in error.
|
||||
:type target: str
|
||||
:param details: A list of additional details about the error.
|
||||
:type details: list[~redhatopenshift.models.CloudErrorBody]
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'code': {'key': 'code', 'type': 'str'},
|
||||
'message': {'key': 'message', 'type': 'str'},
|
||||
'target': {'key': 'target', 'type': 'str'},
|
||||
'details': {'key': 'details', 'type': '[CloudErrorBody]'},
|
||||
}
|
||||
|
||||
def __init__(self, code=None, message=None, target=None, details=None):
|
||||
super(CloudErrorBody, self).__init__()
|
||||
self.code = code
|
||||
self.message = message
|
||||
self.target = target
|
||||
self.details = details
|
|
@ -1,37 +0,0 @@
|
|||
# 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 Display(Model):
|
||||
"""Display represents the display details of an operation.
|
||||
|
||||
:param provider: Friendly name of the resource provider.
|
||||
:type provider: str
|
||||
:param resource: Resource type on which the operation is performed.
|
||||
:type resource: str
|
||||
:param operation: Operation type: read, write, delete, listKeys/action,
|
||||
etc.
|
||||
:type operation: str
|
||||
:param description: Friendly name 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=None, resource=None, operation=None, description=None):
|
||||
super(Display, self).__init__()
|
||||
self.provider = provider
|
||||
self.resource = resource
|
||||
self.operation = operation
|
||||
self.description = description
|
|
@ -1,29 +0,0 @@
|
|||
# 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 MasterProfile(Model):
|
||||
"""MasterProfile represents a master profile.
|
||||
|
||||
:param vm_size: The size of the master VMs (immutable). Possible values
|
||||
include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3'
|
||||
:type vm_size: str or ~redhatopenshift.models.enum
|
||||
:param subnet_id: The Azure resource ID of the worker subnet (immutable).
|
||||
:type subnet_id: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'vm_size': {'key': 'vmSize', 'type': 'str'},
|
||||
'subnet_id': {'key': 'subnetId', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, vm_size=None, subnet_id=None):
|
||||
super(MasterProfile, self).__init__()
|
||||
self.vm_size = vm_size
|
||||
self.subnet_id = subnet_id
|
|
@ -1,29 +0,0 @@
|
|||
# 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 NetworkProfile(Model):
|
||||
"""NetworkProfile represents a network profile.
|
||||
|
||||
:param pod_cidr: The CIDR used for OpenShift/Kubernetes Pods (immutable).
|
||||
:type pod_cidr: str
|
||||
:param service_cidr: The CIDR used for OpenShift/Kubernetes Services
|
||||
(immutable).
|
||||
:type service_cidr: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'pod_cidr': {'key': 'podCidr', 'type': 'str'},
|
||||
'service_cidr': {'key': 'serviceCidr', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, pod_cidr=None, service_cidr=None):
|
||||
super(NetworkProfile, self).__init__()
|
||||
self.pod_cidr = pod_cidr
|
||||
self.service_cidr = service_cidr
|
|
@ -1,81 +0,0 @@
|
|||
# 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 OpenShiftCluster(Model):
|
||||
"""OpenShiftCluster represents an Azure Red Hat OpenShift cluster.
|
||||
|
||||
Variables are only populated by the server, and will be ignored when
|
||||
sending a request.
|
||||
|
||||
:ivar id: The resource ID (immutable).
|
||||
:vartype id: str
|
||||
:ivar name: The resource name (immutable).
|
||||
:vartype name: str
|
||||
:ivar type: The resource type (immutable).
|
||||
:vartype type: str
|
||||
:param location: The resource location (immutable).
|
||||
:type location: str
|
||||
:param tags: The resource tags.
|
||||
:type tags: dict[str, str]
|
||||
:param provisioning_state: The cluster provisioning state (immutable).
|
||||
Possible values include: 'Creating', 'Deleting', 'Failed', 'Succeeded',
|
||||
'Updating'
|
||||
:type provisioning_state: str or ~redhatopenshift.models.enum
|
||||
:param service_principal_profile: The cluster service principal profile.
|
||||
:type service_principal_profile:
|
||||
~redhatopenshift.models.ServicePrincipalProfile
|
||||
:param network_profile: The cluster network profile.
|
||||
:type network_profile: ~redhatopenshift.models.NetworkProfile
|
||||
:param master_profile: The cluster master profile.
|
||||
:type master_profile: ~redhatopenshift.models.MasterProfile
|
||||
:param worker_profiles: The cluster worker profiles.
|
||||
:type worker_profiles: list[~redhatopenshift.models.WorkerProfile]
|
||||
:param apiserver_url: The URL to access the cluster API server
|
||||
(immutable).
|
||||
:type apiserver_url: str
|
||||
:param console_url: The URL to access the cluster console (immutable).
|
||||
:type console_url: str
|
||||
"""
|
||||
|
||||
_validation = {
|
||||
'id': {'readonly': True},
|
||||
'name': {'readonly': True},
|
||||
'type': {'readonly': True},
|
||||
}
|
||||
|
||||
_attribute_map = {
|
||||
'id': {'key': 'id', 'type': 'str'},
|
||||
'name': {'key': 'name', 'type': 'str'},
|
||||
'type': {'key': 'type', 'type': 'str'},
|
||||
'location': {'key': 'location', 'type': 'str'},
|
||||
'tags': {'key': 'tags', 'type': '{str}'},
|
||||
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
|
||||
'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ServicePrincipalProfile'},
|
||||
'network_profile': {'key': 'properties.networkProfile', 'type': 'NetworkProfile'},
|
||||
'master_profile': {'key': 'properties.masterProfile', 'type': 'MasterProfile'},
|
||||
'worker_profiles': {'key': 'properties.workerProfiles', 'type': '[WorkerProfile]'},
|
||||
'apiserver_url': {'key': 'properties.apiserverUrl', 'type': 'str'},
|
||||
'console_url': {'key': 'properties.consoleUrl', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, location=None, tags=None, provisioning_state=None, service_principal_profile=None, network_profile=None, master_profile=None, worker_profiles=None, apiserver_url=None, console_url=None):
|
||||
super(OpenShiftCluster, self).__init__()
|
||||
self.id = None
|
||||
self.name = None
|
||||
self.type = None
|
||||
self.location = location
|
||||
self.tags = tags
|
||||
self.provisioning_state = provisioning_state
|
||||
self.service_principal_profile = service_principal_profile
|
||||
self.network_profile = network_profile
|
||||
self.master_profile = master_profile
|
||||
self.worker_profiles = worker_profiles
|
||||
self.apiserver_url = apiserver_url
|
||||
self.console_url = console_url
|
|
@ -1,24 +0,0 @@
|
|||
# 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 OpenShiftClusterCredentials(Model):
|
||||
"""OpenShiftClusterCredentials represents an OpenShift cluster's credentials.
|
||||
|
||||
:param kubeadmin_password: The password for the kubeadmin user
|
||||
:type kubeadmin_password: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'kubeadmin_password': {'key': 'kubeadminPassword', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, kubeadmin_password=None):
|
||||
super(OpenShiftClusterCredentials, self).__init__()
|
||||
self.kubeadmin_password = kubeadmin_password
|
|
@ -1,24 +0,0 @@
|
|||
# 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 OpenShiftClusterList(Model):
|
||||
"""OpenShiftClusterList represents a list of OpenShift clusters.
|
||||
|
||||
:param value: The list of OpenShift clusters.
|
||||
:type value: list[~redhatopenshift.models.OpenShiftCluster]
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'value': {'key': 'value', 'type': '[OpenShiftCluster]'},
|
||||
}
|
||||
|
||||
def __init__(self, value=None):
|
||||
super(OpenShiftClusterList, self).__init__()
|
||||
self.value = value
|
|
@ -1,28 +0,0 @@
|
|||
# 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):
|
||||
"""Operation represents an operation.
|
||||
|
||||
:param name: Operation name: {provider}/{resource}/{operation}.
|
||||
:type name: str
|
||||
:param display: The object that describes the operation.
|
||||
:type display: ~redhatopenshift.models.Display
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'name': {'key': 'name', 'type': 'str'},
|
||||
'display': {'key': 'display', 'type': 'Display'},
|
||||
}
|
||||
|
||||
def __init__(self, name=None, display=None):
|
||||
super(Operation, self).__init__()
|
||||
self.name = name
|
||||
self.display = display
|
|
@ -1,24 +0,0 @@
|
|||
# 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 OperationList(Model):
|
||||
"""OperationList represents an operation list.
|
||||
|
||||
:param value: List of operations supported by the resource provider.
|
||||
:type value: list[~redhatopenshift.models.Operation]
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'value': {'key': 'value', 'type': '[Operation]'},
|
||||
}
|
||||
|
||||
def __init__(self, value=None):
|
||||
super(OperationList, self).__init__()
|
||||
self.value = value
|
|
@ -1,28 +0,0 @@
|
|||
# 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 ServicePrincipalProfile(Model):
|
||||
"""ServicePrincipalProfile represents a service principal profile.
|
||||
|
||||
:param client_id: The client ID used for the cluster
|
||||
:type client_id: str
|
||||
:param client_secret: The client secret used for the cluster
|
||||
:type client_secret: str
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'client_id': {'key': 'clientId', 'type': 'str'},
|
||||
'client_secret': {'key': 'clientSecret', 'type': 'str'},
|
||||
}
|
||||
|
||||
def __init__(self, client_id=None, client_secret=None):
|
||||
super(ServicePrincipalProfile, self).__init__()
|
||||
self.client_id = client_id
|
||||
self.client_secret = client_secret
|
|
@ -1,42 +0,0 @@
|
|||
# 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 WorkerProfile(Model):
|
||||
"""WorkerProfile represents a worker profile.
|
||||
|
||||
:param name: The worker profile name. Must be "worker" (immutable).
|
||||
:type name: str
|
||||
:param vm_size: The size of the worker VMs (immutable). Possible values
|
||||
include: 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3'
|
||||
:type vm_size: str or ~redhatopenshift.models.enum
|
||||
:param disk_size_gb: The disk size of the worker VMs. Must be 128 or
|
||||
greater (immutable).
|
||||
:type disk_size_gb: int
|
||||
:param subnet_id: The Azure resource ID of the worker subnet (immutable).
|
||||
:type subnet_id: str
|
||||
:param count: The number of worker VMs. Must be between 3 and 20.
|
||||
:type count: int
|
||||
"""
|
||||
|
||||
_attribute_map = {
|
||||
'name': {'key': 'name', 'type': 'str'},
|
||||
'vm_size': {'key': 'vmSize', 'type': 'str'},
|
||||
'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'},
|
||||
'subnet_id': {'key': 'subnetId', 'type': 'str'},
|
||||
'count': {'key': 'count', 'type': 'int'},
|
||||
}
|
||||
|
||||
def __init__(self, name=None, vm_size=None, disk_size_gb=None, subnet_id=None, count=None):
|
||||
super(WorkerProfile, self).__init__()
|
||||
self.name = name
|
||||
self.vm_size = vm_size
|
||||
self.disk_size_gb = disk_size_gb
|
||||
self.subnet_id = subnet_id
|
||||
self.count = count
|
|
@ -1,461 +0,0 @@
|
|||
# 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.pipeline import ClientRawResponse
|
||||
|
||||
from .. import models
|
||||
|
||||
|
||||
class OpenShiftClustersOperations(object):
|
||||
"""OpenShiftClustersOperations operations.
|
||||
|
||||
:param client: Client for service requests.
|
||||
:param config: Configuration of service client.
|
||||
:param serializer: An object model serializer.
|
||||
:param deserializer: An object model deserializer.
|
||||
:ivar api_version: Client API version. Constant value: "2019-12-31-preview".
|
||||
"""
|
||||
|
||||
models = models
|
||||
|
||||
def __init__(self, client, config, serializer, deserializer):
|
||||
|
||||
self._client = client
|
||||
self._serialize = serializer
|
||||
self._deserialize = deserializer
|
||||
|
||||
self.config = config
|
||||
self.api_version = "2019-12-31-preview"
|
||||
|
||||
def list(
|
||||
self, custom_headers=None, raw=False, **operation_config):
|
||||
"""Lists OpenShift clusters in the specified subscription.
|
||||
|
||||
Lists OpenShift clusters in the specified subscription. The operation
|
||||
returns properties of each OpenShift cluster.
|
||||
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OpenShiftClusterList or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OpenShiftClusterList or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.list.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OpenShiftClusterList', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RedHatOpenShift/openShiftClusters'}
|
||||
|
||||
def list_by_resource_group(
|
||||
self, resource_group_name, custom_headers=None, raw=False, **operation_config):
|
||||
"""Lists OpenShift clusters in the specified subscription and resource
|
||||
group.
|
||||
|
||||
Lists OpenShift clusters in the specified subscription and resource
|
||||
group. The operation returns properties of each OpenShift cluster.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OpenShiftClusterList or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OpenShiftClusterList or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.list_by_resource_group.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OpenShiftClusterList', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters'}
|
||||
|
||||
def get(
|
||||
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
|
||||
"""Gets a OpenShift cluster with the specified subscription, resource
|
||||
group and resource name.
|
||||
|
||||
Gets a OpenShift cluster with the specified subscription, resource
|
||||
group and resource name. The operation returns properties of a
|
||||
OpenShift cluster.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param resource_name: The name of the OpenShift cluster resource.
|
||||
:type resource_name: str
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OpenShiftCluster or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OpenShiftCluster or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.get.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
|
||||
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OpenShiftCluster', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'}
|
||||
|
||||
def create(
|
||||
self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config):
|
||||
"""Creates or updates a OpenShift cluster with the specified subscription,
|
||||
resource group and resource name.
|
||||
|
||||
Creates or updates a OpenShift cluster with the specified subscription,
|
||||
resource group and resource name. The operation returns properties of
|
||||
a OpenShift cluster.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param resource_name: The name of the OpenShift cluster resource.
|
||||
:type resource_name: str
|
||||
:param parameters: The OpenShift cluster resource.
|
||||
:type parameters: ~redhatopenshift.models.OpenShiftCluster
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OpenShiftCluster or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OpenShiftCluster or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.create.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
|
||||
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct body
|
||||
body_content = self._serialize.body(parameters, 'OpenShiftCluster')
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.put(url, query_parameters)
|
||||
response = self._client.send(
|
||||
request, header_parameters, body_content, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200, 201]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OpenShiftCluster', response)
|
||||
if response.status_code == 201:
|
||||
deserialized = self._deserialize('OpenShiftCluster', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'}
|
||||
|
||||
def delete(
|
||||
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
|
||||
"""Deletes a OpenShift cluster with the specified subscription, resource
|
||||
group and resource name.
|
||||
|
||||
Deletes a OpenShift cluster with the specified subscription, resource
|
||||
group and resource name. The operation returns nothing.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param resource_name: The name of the OpenShift cluster resource.
|
||||
:type resource_name: str
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: None or ClientRawResponse if raw=true
|
||||
:rtype: None or ~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.delete.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
|
||||
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.delete(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200, 204]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(None, response)
|
||||
return client_raw_response
|
||||
delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'}
|
||||
|
||||
def update(
|
||||
self, resource_group_name, resource_name, parameters, custom_headers=None, raw=False, **operation_config):
|
||||
"""Creates or updates a OpenShift cluster with the specified subscription,
|
||||
resource group and resource name.
|
||||
|
||||
Creates or updates a OpenShift cluster with the specified subscription,
|
||||
resource group and resource name. The operation returns properties of
|
||||
a OpenShift cluster.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param resource_name: The name of the OpenShift cluster resource.
|
||||
:type resource_name: str
|
||||
:param parameters: The OpenShift cluster resource.
|
||||
:type parameters: ~redhatopenshift.models.OpenShiftCluster
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OpenShiftCluster or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OpenShiftCluster or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.update.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
|
||||
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct body
|
||||
body_content = self._serialize.body(parameters, 'OpenShiftCluster')
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.patch(url, query_parameters)
|
||||
response = self._client.send(
|
||||
request, header_parameters, body_content, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200, 201]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OpenShiftCluster', response)
|
||||
if response.status_code == 201:
|
||||
deserialized = self._deserialize('OpenShiftCluster', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}'}
|
||||
|
||||
def get_credentials(
|
||||
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
|
||||
"""Gets credentials of a OpenShift cluster with the specified
|
||||
subscription, resource group and resource name.
|
||||
|
||||
Gets credentials of a OpenShift cluster with the specified
|
||||
subscription, resource group and resource name. The operation returns
|
||||
the credentials.
|
||||
|
||||
:param resource_group_name: The name of the resource group.
|
||||
:type resource_group_name: str
|
||||
:param resource_name: The name of the OpenShift cluster resource.
|
||||
:type resource_name: str
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OpenShiftClusterCredentials or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OpenShiftClusterCredentials or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.get_credentials.metadata['url']
|
||||
path_format_arguments = {
|
||||
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
|
||||
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
|
||||
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
|
||||
}
|
||||
url = self._client.format_url(url, **path_format_arguments)
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.post(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OpenShiftClusterCredentials', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
get_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RedHatOpenShift/openShiftClusters/{resourceName}/credentials'}
|
|
@ -1,82 +0,0 @@
|
|||
# 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.pipeline import ClientRawResponse
|
||||
|
||||
from .. import models
|
||||
|
||||
|
||||
class Operations(object):
|
||||
"""Operations operations.
|
||||
|
||||
:param client: Client for service requests.
|
||||
:param config: Configuration of service client.
|
||||
:param serializer: An object model serializer.
|
||||
:param deserializer: An object model deserializer.
|
||||
:ivar api_version: Client API version. Constant value: "2019-12-31-preview".
|
||||
"""
|
||||
|
||||
models = models
|
||||
|
||||
def __init__(self, client, config, serializer, deserializer):
|
||||
|
||||
self._client = client
|
||||
self._serialize = serializer
|
||||
self._deserialize = deserializer
|
||||
|
||||
self.config = config
|
||||
self.api_version = "2019-12-31-preview"
|
||||
|
||||
def list(
|
||||
self, custom_headers=None, raw=False, **operation_config):
|
||||
"""Lists all of the available RP operations.
|
||||
|
||||
Lists all of the available RP operations. The operation returns the
|
||||
operations.
|
||||
|
||||
:param dict custom_headers: headers that will be added to the request
|
||||
:param bool raw: returns the direct response alongside the
|
||||
deserialized response
|
||||
:param operation_config: :ref:`Operation configuration
|
||||
overrides<msrest:optionsforoperations>`.
|
||||
:return: OperationList or ClientRawResponse if raw=true
|
||||
:rtype: ~redhatopenshift.models.OperationList or
|
||||
~msrest.pipeline.ClientRawResponse
|
||||
:raises:
|
||||
:class:`CloudErrorException<redhatopenshift.models.CloudErrorException>`
|
||||
"""
|
||||
# Construct URL
|
||||
url = self.list.metadata['url']
|
||||
|
||||
# Construct parameters
|
||||
query_parameters = {}
|
||||
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
|
||||
|
||||
# Construct headers
|
||||
header_parameters = {}
|
||||
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
|
||||
if custom_headers:
|
||||
header_parameters.update(custom_headers)
|
||||
|
||||
# Construct and send request
|
||||
request = self._client.get(url, query_parameters)
|
||||
response = self._client.send(request, header_parameters, stream=False, **operation_config)
|
||||
|
||||
if response.status_code not in [200]:
|
||||
raise models.CloudErrorException(self._deserialize, response)
|
||||
|
||||
deserialized = None
|
||||
|
||||
if response.status_code == 200:
|
||||
deserialized = self._deserialize('OperationList', response)
|
||||
|
||||
if raw:
|
||||
client_raw_response = ClientRawResponse(deserialized, response)
|
||||
return client_raw_response
|
||||
|
||||
return deserialized
|
||||
list.metadata = {'url': '/providers/Microsoft.RedHatOpenShift/operations'}
|
Загрузка…
Ссылка в новой задаче