id
int64 0
843k
| repository_name
stringlengths 7
55
| file_path
stringlengths 9
332
| class_name
stringlengths 3
290
| human_written_code
stringlengths 12
4.36M
| class_skeleton
stringlengths 19
2.2M
| total_program_units
int64 1
9.57k
| total_doc_str
int64 0
4.2k
| AvgCountLine
float64 0
7.89k
| AvgCountLineBlank
float64 0
300
| AvgCountLineCode
float64 0
7.89k
| AvgCountLineComment
float64 0
7.89k
| AvgCyclomatic
float64 0
130
| CommentToCodeRatio
float64 0
176
| CountClassBase
float64 0
48
| CountClassCoupled
float64 0
589
| CountClassCoupledModified
float64 0
581
| CountClassDerived
float64 0
5.37k
| CountDeclInstanceMethod
float64 0
4.2k
| CountDeclInstanceVariable
float64 0
299
| CountDeclMethod
float64 0
4.2k
| CountDeclMethodAll
float64 0
4.2k
| CountLine
float64 1
115k
| CountLineBlank
float64 0
9.01k
| CountLineCode
float64 0
94.4k
| CountLineCodeDecl
float64 0
46.1k
| CountLineCodeExe
float64 0
91.3k
| CountLineComment
float64 0
27k
| CountStmt
float64 1
93.2k
| CountStmtDecl
float64 0
46.1k
| CountStmtExe
float64 0
90.2k
| MaxCyclomatic
float64 0
759
| MaxInheritanceTree
float64 0
16
| MaxNesting
float64 0
34
| SumCyclomatic
float64 0
6k
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9,100 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_resume.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._resume.Resume.FabricCapacitiesResume
|
class FabricCapacitiesResume(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
None,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}/resume",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"capacityName", self.ctx.args.capacity_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
|
class FabricCapacitiesResume(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
| 12 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 1 | 6 | 6 | 60 | 7 | 53 | 18 | 41 | 0 | 20 | 12 | 13 | 2 | 1 | 1 | 7 |
9,101 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_list_skus_for_capacity.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._list_skus_for_capacity.ListSkusForCapacity.FabricCapacitiesListSkusForCapacity
|
class FabricCapacitiesListSkusForCapacity(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}/skus",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"capacityName", self.ctx.args.capacity_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.resource_type = AAZStrType(
serialized_name="resourceType",
flags={"required": True},
)
_element.sku = AAZObjectType(
flags={"required": True},
)
sku = cls._schema_on_200.value.Element.sku
sku.name = AAZStrType(
flags={"required": True},
)
sku.tier = AAZStrType(
flags={"required": True},
)
return cls._schema_on_200
|
class FabricCapacitiesListSkusForCapacity(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 10 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 109 | 17 | 92 | 29 | 75 | 0 | 43 | 22 | 33 | 2 | 1 | 1 | 11 |
9,102 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_list_skus.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._list_skus.ListSkus.FabricCapacitiesListSkus
|
class FabricCapacitiesListSkus(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Fabric/skus",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.locations = AAZListType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"required": True},
)
_element.resource_type = AAZStrType(
serialized_name="resourceType",
flags={"required": True},
)
locations = cls._schema_on_200.value.Element.locations
locations.Element = AAZStrType()
return cls._schema_on_200
|
class FabricCapacitiesListSkus(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 9 | 1 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 99 | 17 | 82 | 29 | 65 | 0 | 43 | 22 | 33 | 2 | 1 | 1 | 11 |
9,103 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_list.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._list.List.FabricCapacitiesListBySubscription
|
class FabricCapacitiesListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Fabric/capacities",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType(
flags={"required": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.administration = AAZObjectType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.state = AAZStrType(
flags={"read_only": True},
)
administration = cls._schema_on_200.value.Element.properties.administration
administration.members = AAZListType(
flags={"required": True},
)
members = cls._schema_on_200.value.Element.properties.administration.members
members.Element = AAZStrType()
sku = cls._schema_on_200.value.Element.sku
sku.name = AAZStrType(
flags={"required": True},
)
sku.tier = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class FabricCapacitiesListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 16 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 160 | 22 | 138 | 34 | 121 | 0 | 66 | 27 | 56 | 2 | 1 | 1 | 11 |
9,104 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_list.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._list.List.FabricCapacitiesListByResourceGroup
|
class FabricCapacitiesListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType(
flags={"required": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.administration = AAZObjectType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.state = AAZStrType(
flags={"read_only": True},
)
administration = cls._schema_on_200.value.Element.properties.administration
administration.members = AAZListType(
flags={"required": True},
)
members = cls._schema_on_200.value.Element.properties.administration.members
members.Element = AAZStrType()
sku = cls._schema_on_200.value.Element.sku
sku.name = AAZStrType(
flags={"required": True},
)
sku.tier = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class FabricCapacitiesListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 164 | 22 | 142 | 34 | 125 | 0 | 66 | 27 | 56 | 2 | 1 | 1 | 11 |
9,105 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_delete.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._delete.Delete.FabricCapacitiesDelete
|
class FabricCapacitiesDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"capacityName", self.ctx.args.capacity_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
def on_204(self, session):
pass
def on_200_201(self, session):
pass
|
class FabricCapacitiesDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_204(self, session):
pass
def on_200_201(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
9,106 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_create.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._create.Create.FabricCapacitiesCreateOrUpdate
|
class FabricCapacitiesCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"capacityName", self.ctx.args.capacity_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("sku", AAZObjectType, ".sku",
typ_kwargs={"flags": {"required": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("administration", AAZObjectType, ".administration", typ_kwargs={
"flags": {"required": True}})
administration = _builder.get(".properties.administration")
if administration is not None:
administration.set_prop("members", AAZListType, ".members", typ_kwargs={
"flags": {"required": True}})
members = _builder.get(".properties.administration.members")
if members is not None:
members.set_elements(AAZStrType, ".")
sku = _builder.get(".sku")
if sku is not None:
sku.set_prop("name", AAZStrType, ".name", typ_kwargs={
"flags": {"required": True}})
sku.set_prop("tier", AAZStrType, ".tier", typ_kwargs={
"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.sku = AAZObjectType(
flags={"required": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.administration = AAZObjectType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.state = AAZStrType(
flags={"read_only": True},
)
administration = cls._schema_on_200_201.properties.administration
administration.members = AAZListType(
flags={"required": True},
)
members = cls._schema_on_200_201.properties.administration.members
members.Element = AAZStrType()
sku = cls._schema_on_200_201.sku
sku.name = AAZStrType(
flags={"required": True},
)
sku.tier = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class FabricCapacitiesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 19 | 2 | 17 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 211 | 27 | 184 | 41 | 165 | 0 | 86 | 32 | 75 | 6 | 1 | 1 | 18 |
9,107 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/microsoft-fabric/azext_microsoft_fabric/aaz/latest/fabric/capacity/_check_name_availability.py
|
azext_microsoft_fabric.aaz.latest.fabric.capacity._check_name_availability.CheckNameAvailability.FabricCapacitiesCheckNameAvailability
|
class FabricCapacitiesCheckNameAvailability(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/checkNameAvailability",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"location", self.ctx.args.location,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("name", AAZStrType, ".name")
_builder.set_prop("type", AAZStrType, ".type")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.message = AAZStrType()
_schema_on_200.name_available = AAZBoolType(
serialized_name="nameAvailable",
)
_schema_on_200.reason = AAZStrType()
return cls._schema_on_200
|
class FabricCapacitiesCheckNameAvailability(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 1 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 99 | 16 | 83 | 29 | 64 | 0 | 41 | 21 | 30 | 2 | 1 | 1 | 12 |
9,108 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mesh/azext_mesh/aaz/latest/mesh/volume/_show.py
|
azext_mesh.aaz.latest.mesh.volume._show.Show.VolumeGet
|
class VolumeGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes/{volumeResourceName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"volumeResourceName", self.ctx.args.name,
skip_quote=True,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.azure_file_parameters = AAZObjectType(
serialized_name="azureFileParameters",
)
properties.description = AAZStrType()
properties.provider = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
azure_file_parameters = cls._schema_on_200.properties.azure_file_parameters
azure_file_parameters.account_key = AAZStrType(
serialized_name="accountKey",
)
azure_file_parameters.account_name = AAZStrType(
serialized_name="accountName",
flags={"required": True},
)
azure_file_parameters.share_name = AAZStrType(
serialized_name="shareName",
flags={"required": True},
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class VolumeGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 13 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 134 | 17 | 117 | 29 | 100 | 0 | 52 | 22 | 42 | 2 | 1 | 1 | 11 |
9,109 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_list.py
|
azext_mixed_reality.aaz.latest.remote_rendering_account._list.List.RemoteRenderingAccountsListByResourceGroup
|
class RemoteRenderingAccountsListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.identity)
_element.kind = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.kind)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.plan = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.plan)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class RemoteRenderingAccountsListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 152 | 19 | 133 | 31 | 116 | 0 | 66 | 24 | 56 | 2 | 1 | 1 | 11 |
9,110 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_list.py
|
azext_mixed_reality.aaz.latest.remote_rendering_account._list.List.RemoteRenderingAccountsListBySubscription
|
class RemoteRenderingAccountsListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/remoteRenderingAccounts",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.identity)
_element.kind = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.kind)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.plan = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.plan)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class RemoteRenderingAccountsListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 148 | 19 | 129 | 31 | 112 | 0 | 66 | 24 | 56 | 2 | 1 | 1 | 11 |
9,111 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_show.py
|
azext_mixed_reality.aaz.latest.remote_rendering_account._show.Show.RemoteRenderingAccountsGet
|
class RemoteRenderingAccountsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_ShowHelper._build_schema_identity_read(_schema_on_200.identity)
_schema_on_200.kind = AAZObjectType()
_ShowHelper._build_schema_sku_read(_schema_on_200.kind)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.plan = AAZObjectType()
_ShowHelper._build_schema_identity_read(_schema_on_200.plan)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.sku = AAZObjectType()
_ShowHelper._build_schema_sku_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class RemoteRenderingAccountsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 147 | 17 | 130 | 29 | 113 | 0 | 61 | 22 | 51 | 2 | 1 | 1 | 11 |
9,112 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/_update.py
|
azext_mixed_reality.aaz.latest.remote_rendering_account._update.Update.RemoteRenderingAccountsUpdate
|
class RemoteRenderingAccountsUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}",
**self.url_parameters
)
@property
def method(self):
return "PATCH"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_UpdateHelper._build_schema_identity_update(
_builder.set_prop("identity", AAZObjectType, ".identity"))
_UpdateHelper._build_schema_sku_update(
_builder.set_prop("kind", AAZObjectType, ".kind"))
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_UpdateHelper._build_schema_sku_update(
_builder.set_prop("sku", AAZObjectType, ".sku"))
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("storageAccountName",
AAZStrType, ".storage_account_name")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_UpdateHelper._build_schema_identity_read(_schema_on_200.identity)
_schema_on_200.kind = AAZObjectType()
_UpdateHelper._build_schema_sku_read(_schema_on_200.kind)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.plan = AAZObjectType()
_UpdateHelper._build_schema_identity_read(_schema_on_200.plan)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.sku = AAZObjectType()
_UpdateHelper._build_schema_sku_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class RemoteRenderingAccountsUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 173 | 21 | 152 | 34 | 133 | 0 | 75 | 26 | 64 | 3 | 1 | 1 | 14 |
9,113 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/_wait.py
|
azext_mobile_network.aaz.latest.mobile_network._wait.Wait.MobileNetworksGet
|
class MobileNetworksGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_land_mobile_network_identifier = AAZObjectType(
serialized_name="publicLandMobileNetworkIdentifier",
flags={"required": True},
)
properties.service_key = AAZStrType(
serialized_name="serviceKey",
flags={"read_only": True},
)
public_land_mobile_network_identifier = cls._schema_on_200.properties.public_land_mobile_network_identifier
public_land_mobile_network_identifier.mcc = AAZStrType(
flags={"required": True},
)
public_land_mobile_network_identifier.mnc = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class MobileNetworksGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 148 | 18 | 130 | 30 | 113 | 0 | 56 | 23 | 46 | 2 | 1 | 1 | 11 |
9,114 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/_update.py
|
azext_mobile_network.aaz.latest.mobile_network._update.Update.MobileNetworksUpdateTags
|
class MobileNetworksUpdateTags(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}",
**self.url_parameters
)
@property
def method(self):
return "PATCH"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("tags", AAZDictType, ".tags")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_land_mobile_network_identifier = AAZObjectType(
serialized_name="publicLandMobileNetworkIdentifier",
flags={"required": True},
)
properties.service_key = AAZStrType(
serialized_name="serviceKey",
flags={"read_only": True},
)
public_land_mobile_network_identifier = cls._schema_on_200.properties.public_land_mobile_network_identifier
public_land_mobile_network_identifier.mcc = AAZStrType(
flags={"required": True},
)
public_land_mobile_network_identifier.mnc = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class MobileNetworksUpdateTags(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 166 | 21 | 145 | 34 | 126 | 0 | 63 | 26 | 52 | 2 | 1 | 1 | 13 |
9,115 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/_list.py
|
azext_mobile_network.aaz.latest.mobile_network._list.List.MobileNetworksListBySubscription
|
class MobileNetworksListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.MobileNetwork/mobileNetworks",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_land_mobile_network_identifier = AAZObjectType(
serialized_name="publicLandMobileNetworkIdentifier",
flags={"required": True},
)
properties.service_key = AAZStrType(
serialized_name="serviceKey",
flags={"read_only": True},
)
public_land_mobile_network_identifier = cls._schema_on_200.value.Element.properties.public_land_mobile_network_identifier
public_land_mobile_network_identifier.mcc = AAZStrType(
flags={"required": True},
)
public_land_mobile_network_identifier.mnc = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class MobileNetworksListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 150 | 20 | 130 | 32 | 113 | 0 | 61 | 25 | 51 | 2 | 1 | 1 | 11 |
9,116 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/_list.py
|
azext_mobile_network.aaz.latest.mobile_network._list.List.MobileNetworksListByResourceGroup
|
class MobileNetworksListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_land_mobile_network_identifier = AAZObjectType(
serialized_name="publicLandMobileNetworkIdentifier",
flags={"required": True},
)
properties.service_key = AAZStrType(
serialized_name="serviceKey",
flags={"read_only": True},
)
public_land_mobile_network_identifier = cls._schema_on_200.value.Element.properties.public_land_mobile_network_identifier
public_land_mobile_network_identifier.mcc = AAZStrType(
flags={"required": True},
)
public_land_mobile_network_identifier.mnc = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class MobileNetworksListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 154 | 20 | 134 | 32 | 117 | 0 | 61 | 25 | 51 | 2 | 1 | 1 | 11 |
9,117 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network._delete.Delete.MobileNetworksDelete
|
class MobileNetworksDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class MobileNetworksDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
9,118 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/_create.py
|
azext_mobile_network.aaz.latest.mobile_network._create.Create.MobileNetworksCreateOrUpdate
|
class MobileNetworksCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={
"flags": {"required": True, "client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("publicLandMobileNetworkIdentifier", AAZObjectType,
".identifier", typ_kwargs={"flags": {"required": True}})
public_land_mobile_network_identifier = _builder.get(
".properties.publicLandMobileNetworkIdentifier")
if public_land_mobile_network_identifier is not None:
public_land_mobile_network_identifier.set_prop(
"mcc", AAZStrType, ".mcc", typ_kwargs={"flags": {"required": True}})
public_land_mobile_network_identifier.set_prop(
"mnc", AAZStrType, ".mnc", typ_kwargs={"flags": {"required": True}})
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.public_land_mobile_network_identifier = AAZObjectType(
serialized_name="publicLandMobileNetworkIdentifier",
flags={"required": True},
)
properties.service_key = AAZStrType(
serialized_name="serviceKey",
flags={"read_only": True},
)
public_land_mobile_network_identifier = cls._schema_on_200_201.properties.public_land_mobile_network_identifier
public_land_mobile_network_identifier.mcc = AAZStrType(
flags={"required": True},
)
public_land_mobile_network_identifier.mnc = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class MobileNetworksCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 17 | 1 | 16 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 193 | 23 | 170 | 37 | 151 | 0 | 74 | 28 | 63 | 4 | 1 | 1 | 16 |
9,119 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/tests/latest/test_spatial_anchors_account.py
|
azext_mixed_reality.tests.latest.test_spatial_anchors_account.SpatialAnchorsAccountScenarioTest
|
class SpatialAnchorsAccountScenarioTest(ScenarioTest):
def __init__(self, method_name):
super(SpatialAnchorsAccountScenarioTest, self).__init__(
method_name, recording_processors=[KeyReplacer()]
)
@ResourceGroupPreparer(location='eastus2', parameter_name_for_location='location')
def test_spatial_anchors_account_scenario(self, resource_group, location):
self.kwargs.update({
'rg': resource_group,
'account_name': 'spatial-anchors-account-name',
'account_name1': 'spatial-anchors-account-name1',
'storage_account_name': 'storage_account_name',
'storage_account_name1': 'storage_account_name1',
})
# Create with minimum parameters
self.cmd(
'spatial-anchors-account create -g {rg} -n {account_name}', checks=self.not_exists('tags'))
# Create with more parameters
self.cmd('spatial-anchors-account create -g {rg} -n {account_name1} '
'--storage-account-name {storage_account_name} --tag tag=tag --kind name=P3',
checks=[self.exists('tags'),
self.check('storageAccountName', '{storage_account_name}')])
self.cmd('spatial-anchors-account update -g {rg} -n {account_name} '
'--storage-account-name {storage_account_name1}',
checks=self.check('storageAccountName', '{storage_account_name1}'))
self.cmd('spatial-anchors-account show -g {rg} -n {account_name}')
self.cmd(
'spatial-anchors-account list -g {rg}', checks=self.check('length(@)', 2))
self.cmd('spatial-anchors-account delete -g {rg} -n {account_name1}')
self.cmd(
'spatial-anchors-account list -g {rg}', checks=self.check('length(@)', 1))
# key
x = 'primaryKey'
y = 'secondaryKey'
key = self.cmd(
'spatial-anchors-account key show -g {rg} -n {account_name}').get_output_in_json()
key1 = self.cmd(
'spatial-anchors-account key renew -g {rg} -n {account_name}').get_output_in_json()
self.assertEqual(key[y], key1[y])
# self.assertNotEqual(key[x], key1[x]) # only for live test
key2 = self.cmd(
'spatial-anchors-account key renew -g {rg} -n {account_name} -k primary').get_output_in_json()
self.assertEqual(key2[y], key1[y])
# self.assertNotEqual(key2[x], key1[x]) # only for live test
key3 = self.cmd(
'spatial-anchors-account key renew -g {rg} -n {account_name} -k secondary').get_output_in_json()
self.assertEqual(key2[x], key3[x])
|
class SpatialAnchorsAccountScenarioTest(ScenarioTest):
def __init__(self, method_name):
pass
@ResourceGroupPreparer(location='eastus2', parameter_name_for_location='location')
def test_spatial_anchors_account_scenario(self, resource_group, location):
pass
| 4 | 0 | 23 | 4 | 17 | 3 | 1 | 0.14 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 2 | 50 | 10 | 35 | 10 | 31 | 5 | 21 | 9 | 18 | 1 | 1 | 0 | 2 |
9,120 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/tests/latest/test_remote_rendering_account.py
|
azext_mixed_reality.tests.latest.test_remote_rendering_account.RemoteRenderingAccountScenarioTest
|
class RemoteRenderingAccountScenarioTest(ScenarioTest):
def __init__(self, method_name):
super(RemoteRenderingAccountScenarioTest, self).__init__(
method_name, recording_processors=[KeyReplacer()]
)
@ResourceGroupPreparer(location='eastus2', parameter_name_for_location='location')
def test_remote_rendering_account_scenario(self, resource_group, location):
self.kwargs.update({
'rg': resource_group,
'account_name': 'remote-rendering-account-name',
'account_name1': 'remote-rendering-account-name1',
'storage_account_name': 'storage_account_name',
'storage_account_name1': 'storage_account_name1',
})
# Create with minimum parameters
self.cmd(
'remote-rendering-account create -g {rg} -n {account_name}', checks=self.not_exists('tags'))
# Create with more parameters
self.cmd('remote-rendering-account create -g {rg} -n {account_name1} '
'--storage-account-name {storage_account_name} --tag tag=tag --kind name=P3',
checks=[self.exists('tags'),
self.check('storageAccountName', '{storage_account_name}')])
self.cmd('remote-rendering-account update -g {rg} -n {account_name} '
'--storage-account-name {storage_account_name1}',
checks=self.check('storageAccountName', '{storage_account_name1}'))
self.cmd('remote-rendering-account show -g {rg} -n {account_name}')
self.cmd(
'remote-rendering-account list -g {rg}', checks=self.check('length(@)', 2))
self.cmd('remote-rendering-account delete -g {rg} -n {account_name1}')
self.cmd(
'remote-rendering-account list -g {rg}', checks=self.check('length(@)', 1))
# key
x = 'primaryKey'
y = 'secondaryKey'
key = self.cmd(
'remote-rendering-account key show -g {rg} -n {account_name}').get_output_in_json()
key1 = self.cmd(
'remote-rendering-account key renew -g {rg} -n {account_name}').get_output_in_json()
self.assertEqual(key[y], key1[y])
# self.assertNotEqual(key[x], key1[x]) # only for live test
key2 = self.cmd(
'remote-rendering-account key renew -g {rg} -n {account_name} -k primary').get_output_in_json()
self.assertEqual(key2[y], key1[y])
# self.assertNotEqual(key2[x], key1[x]) # only for live test
key3 = self.cmd(
'remote-rendering-account key renew -g {rg} -n {account_name} -k secondary').get_output_in_json()
self.assertEqual(key2[x], key3[x])
|
class RemoteRenderingAccountScenarioTest(ScenarioTest):
def __init__(self, method_name):
pass
@ResourceGroupPreparer(location='eastus2', parameter_name_for_location='location')
def test_remote_rendering_account_scenario(self, resource_group, location):
pass
| 4 | 0 | 23 | 4 | 17 | 3 | 1 | 0.14 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 2 | 49 | 9 | 35 | 10 | 31 | 5 | 21 | 9 | 18 | 1 | 1 | 0 | 2 |
9,121 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mesh/azext_mesh/aaz/latest/mesh/volume/_list.py
|
azext_mesh.aaz.latest.mesh.volume._list.List.VolumeListByResourceGroup
|
class VolumeListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/volumes",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2018-09-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.azure_file_parameters = AAZObjectType(
serialized_name="azureFileParameters",
)
properties.description = AAZStrType()
properties.provider = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.status = AAZStrType()
properties.status_details = AAZStrType(
serialized_name="statusDetails",
flags={"read_only": True},
)
azure_file_parameters = cls._schema_on_200.value.Element.properties.azure_file_parameters
azure_file_parameters.account_key = AAZStrType(
serialized_name="accountKey",
)
azure_file_parameters.account_name = AAZStrType(
serialized_name="accountName",
flags={"required": True},
)
azure_file_parameters.share_name = AAZStrType(
serialized_name="shareName",
flags={"required": True},
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class VolumeListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 13 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 138 | 19 | 119 | 31 | 102 | 0 | 57 | 24 | 47 | 2 | 1 | 1 | 11 |
9,122 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_show.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account.key._show.Show.SpatialAnchorsAccountsListKeys
|
class SpatialAnchorsAccountsListKeys(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/listKeys",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_schema_on_200.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
return cls._schema_on_200
|
class SpatialAnchorsAccountsListKeys(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 91 | 14 | 77 | 26 | 60 | 0 | 35 | 19 | 25 | 2 | 1 | 1 | 11 |
9,123 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_update.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account._update.Update.SpatialAnchorsAccountsUpdate
|
class SpatialAnchorsAccountsUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}",
**self.url_parameters
)
@property
def method(self):
return "PATCH"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_UpdateHelper._build_schema_sku_update(
_builder.set_prop("kind", AAZObjectType, ".kind"))
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_UpdateHelper._build_schema_sku_update(
_builder.set_prop("sku", AAZObjectType, ".sku"))
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("storageAccountName",
AAZStrType, ".storage_account_name")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_UpdateHelper._build_schema_identity_read(_schema_on_200.identity)
_schema_on_200.kind = AAZObjectType()
_UpdateHelper._build_schema_sku_read(_schema_on_200.kind)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.plan = AAZObjectType()
_UpdateHelper._build_schema_identity_read(_schema_on_200.plan)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.sku = AAZObjectType()
_UpdateHelper._build_schema_sku_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SpatialAnchorsAccountsUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 172 | 21 | 151 | 34 | 132 | 0 | 74 | 26 | 63 | 3 | 1 | 1 | 14 |
9,124 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_show.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account._show.Show.SpatialAnchorsAccountsGet
|
class SpatialAnchorsAccountsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_ShowHelper._build_schema_identity_read(_schema_on_200.identity)
_schema_on_200.kind = AAZObjectType()
_ShowHelper._build_schema_sku_read(_schema_on_200.kind)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.plan = AAZObjectType()
_ShowHelper._build_schema_identity_read(_schema_on_200.plan)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.sku = AAZObjectType()
_ShowHelper._build_schema_sku_read(_schema_on_200.sku)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SpatialAnchorsAccountsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 147 | 17 | 130 | 29 | 113 | 0 | 61 | 22 | 51 | 2 | 1 | 1 | 11 |
9,125 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_list.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account._list.List.SpatialAnchorsAccountsListBySubscription
|
class SpatialAnchorsAccountsListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.MixedReality/spatialAnchorsAccounts",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.identity)
_element.kind = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.kind)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.plan = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.plan)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SpatialAnchorsAccountsListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 14 | 1 | 13 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 148 | 19 | 129 | 31 | 112 | 0 | 66 | 24 | 56 | 2 | 1 | 1 | 11 |
9,126 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_list.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account._list.List.SpatialAnchorsAccountsListByResourceGroup
|
class SpatialAnchorsAccountsListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.identity)
_element.kind = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.kind)
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.plan = AAZObjectType()
_ListHelper._build_schema_identity_read(_element.plan)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.sku = AAZObjectType()
_ListHelper._build_schema_sku_read(_element.sku)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SpatialAnchorsAccountsListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 152 | 19 | 133 | 31 | 116 | 0 | 66 | 24 | 56 | 2 | 1 | 1 | 11 |
9,127 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_delete.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account._delete.Delete.SpatialAnchorsAccountsDelete
|
class SpatialAnchorsAccountsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SpatialAnchorsAccountsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 61 | 9 | 52 | 19 | 38 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
9,128 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/_create.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account._create.Create.SpatialAnchorsAccountsCreate
|
class SpatialAnchorsAccountsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_CreateHelper._build_schema_sku_create(
_builder.set_prop("kind", AAZObjectType, ".kind"))
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_CreateHelper._build_schema_sku_create(
_builder.set_prop("sku", AAZObjectType, ".sku"))
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("storageAccountName",
AAZStrType, ".storage_account_name")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZObjectType()
_CreateHelper._build_schema_identity_read(
_schema_on_200_201.identity)
_schema_on_200_201.kind = AAZObjectType()
_CreateHelper._build_schema_sku_read(_schema_on_200_201.kind)
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.plan = AAZObjectType()
_CreateHelper._build_schema_identity_read(_schema_on_200_201.plan)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.sku = AAZObjectType()
_CreateHelper._build_schema_sku_read(_schema_on_200_201.sku)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.account_domain = AAZStrType(
serialized_name="accountDomain",
flags={"read_only": True},
)
properties.account_id = AAZStrType(
serialized_name="accountId",
flags={"read_only": True},
)
properties.storage_account_name = AAZStrType(
serialized_name="storageAccountName",
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class SpatialAnchorsAccountsCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 15 | 1 | 14 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 173 | 21 | 152 | 34 | 133 | 0 | 75 | 26 | 64 | 3 | 1 | 1 | 14 |
9,129 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_show.py
|
azext_mixed_reality.aaz.latest.remote_rendering_account.key._show.Show.RemoteRenderingAccountsListKeys
|
class RemoteRenderingAccountsListKeys(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/listKeys",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_schema_on_200.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
return cls._schema_on_200
|
class RemoteRenderingAccountsListKeys(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 91 | 14 | 77 | 26 | 60 | 0 | 35 | 19 | 25 | 2 | 1 | 1 | 11 |
9,130 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/remote_rendering_account/key/_renew.py
|
azext_mixed_reality.aaz.latest.remote_rendering_account.key._renew.Renew.RemoteRenderingAccountsRegenerateKeys
|
class RemoteRenderingAccountsRegenerateKeys(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/remoteRenderingAccounts/{accountName}/regenerateKeys",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("serial", AAZIntType, ".serial")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_schema_on_200.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
return cls._schema_on_200
|
class RemoteRenderingAccountsRegenerateKeys(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 1 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 105 | 16 | 89 | 29 | 70 | 0 | 39 | 21 | 28 | 2 | 1 | 1 | 12 |
9,131 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mixed-reality/azext_mixed_reality/aaz/latest/spatial_anchors_account/key/_renew.py
|
azext_mixed_reality.aaz.latest.spatial_anchors_account.key._renew.Renew.SpatialAnchorsAccountsRegenerateKeys
|
class SpatialAnchorsAccountsRegenerateKeys(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MixedReality/spatialAnchorsAccounts/{accountName}/regenerateKeys",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2021-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("serial", AAZIntType, ".serial")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.primary_key = AAZStrType(
serialized_name="primaryKey",
flags={"read_only": True},
)
_schema_on_200.secondary_key = AAZStrType(
serialized_name="secondaryKey",
flags={"read_only": True},
)
return cls._schema_on_200
|
class SpatialAnchorsAccountsRegenerateKeys(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 8 | 1 | 8 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 105 | 16 | 89 | 29 | 70 | 0 | 39 | 21 | 28 | 2 | 1 | 1 | 12 |
9,132 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/sim/policy/_wait.py
|
azext_mobile_network.aaz.latest.mobile_network.sim.policy._wait.Wait.SimPoliciesGet
|
class SimPoliciesGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/simPolicies/{simPolicyName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"simPolicyName", self.ctx.args.sim_policy_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.default_slice = AAZObjectType(
serialized_name="defaultSlice",
flags={"required": True},
)
_WaitHelper._build_schema_slice_resource_id_read(
properties.default_slice)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.registration_timer = AAZIntType(
serialized_name="registrationTimer",
)
properties.rfsp_index = AAZIntType(
serialized_name="rfspIndex",
)
properties.site_provisioning_state = AAZDictType(
serialized_name="siteProvisioningState",
flags={"read_only": True},
)
properties.slice_configurations = AAZListType(
serialized_name="sliceConfigurations",
flags={"required": True},
)
properties.ue_ambr = AAZObjectType(
serialized_name="ueAmbr",
flags={"required": True},
)
_WaitHelper._build_schema_ambr_read(properties.ue_ambr)
site_provisioning_state = cls._schema_on_200.properties.site_provisioning_state
site_provisioning_state.Element = AAZStrType(
flags={"read_only": True},
)
slice_configurations = cls._schema_on_200.properties.slice_configurations
slice_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.slice_configurations.Element
_element.data_network_configurations = AAZListType(
serialized_name="dataNetworkConfigurations",
flags={"required": True},
)
_element.default_data_network = AAZObjectType(
serialized_name="defaultDataNetwork",
flags={"required": True},
)
_WaitHelper._build_schema_data_network_resource_id_read(
_element.default_data_network)
_element.slice = AAZObjectType(
flags={"required": True},
)
_WaitHelper._build_schema_slice_resource_id_read(_element.slice)
data_network_configurations = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations
data_network_configurations.Element = AAZObjectType()
_element = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element
_element["5qi"] = AAZIntType()
_element.additional_allowed_session_types = AAZListType(
serialized_name="additionalAllowedSessionTypes",
)
_element.allocation_and_retention_priority_level = AAZIntType(
serialized_name="allocationAndRetentionPriorityLevel",
)
_element.allowed_services = AAZListType(
serialized_name="allowedServices",
flags={"required": True},
)
_element.data_network = AAZObjectType(
serialized_name="dataNetwork",
flags={"required": True},
)
_WaitHelper._build_schema_data_network_resource_id_read(
_element.data_network)
_element.default_session_type = AAZStrType(
serialized_name="defaultSessionType",
)
_element.maximum_number_of_buffered_packets = AAZIntType(
serialized_name="maximumNumberOfBufferedPackets",
)
_element.preemption_capability = AAZStrType(
serialized_name="preemptionCapability",
)
_element.preemption_vulnerability = AAZStrType(
serialized_name="preemptionVulnerability",
)
_element.session_ambr = AAZObjectType(
serialized_name="sessionAmbr",
flags={"required": True},
)
_WaitHelper._build_schema_ambr_read(_element.session_ambr)
additional_allowed_session_types = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element.additional_allowed_session_types
additional_allowed_session_types.Element = AAZStrType()
allowed_services = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services
allowed_services.Element = AAZObjectType()
_element = cls._schema_on_200.properties.slice_configurations.Element.data_network_configurations.Element.allowed_services.Element
_element.id = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class SimPoliciesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 24 | 2 | 22 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 232 | 25 | 207 | 35 | 190 | 0 | 90 | 28 | 80 | 2 | 1 | 1 | 11 |
9,133 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/site/_create.py
|
azext_mobile_network.aaz.latest.mobile_network.site._create.Create.SitesCreateOrUpdate
|
class SitesCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"siteName", self.ctx.args.site_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.network_functions = AAZListType(
serialized_name="networkFunctions",
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
network_functions = cls._schema_on_200_201.properties.network_functions
network_functions.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.network_functions.Element
_element.id = AAZStrType(
flags={"required": True},
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class SitesCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 16 | 1 | 15 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 183 | 22 | 161 | 36 | 142 | 0 | 66 | 27 | 55 | 3 | 1 | 1 | 14 |
9,134 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/mobile-network/azext_mobile_network/aaz/latest/mobile_network/site/_delete.py
|
azext_mobile_network.aaz.latest.mobile_network.site._delete.Delete.SitesDelete
|
class SitesDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/mobileNetworks/{mobileNetworkName}/sites/{siteName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"mobileNetworkName", self.ctx.args.mobile_network_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"siteName", self.ctx.args.site_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SitesDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 88 | 9 | 79 | 20 | 65 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
9,135 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/__cmd_group.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping.__cmd_group.__CMDGroup
|
class __CMDGroup(AAZCommandGroup):
"""Manage a protection container mapping for a protection container.
"""
pass
|
class __CMDGroup(AAZCommandGroup):
'''Manage a protection container mapping for a protection container.
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,136 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._update._UpdateHelper
|
class _UpdateHelper:
"""Helper class for Update"""
_schema_protection_container_read = None
@classmethod
def _build_schema_protection_container_read(cls, _schema):
if cls._schema_protection_container_read is not None:
_schema.id = cls._schema_protection_container_read.id
_schema.location = cls._schema_protection_container_read.location
_schema.name = cls._schema_protection_container_read.name
_schema.properties = cls._schema_protection_container_read.properties
_schema.type = cls._schema_protection_container_read.type
return
cls._schema_protection_container_read = _schema_protection_container_read = AAZObjectType()
protection_container_read = _schema_protection_container_read
protection_container_read.id = AAZStrType(
flags={"read_only": True},
)
protection_container_read.location = AAZStrType()
protection_container_read.name = AAZStrType(
flags={"read_only": True},
)
protection_container_read.properties = AAZObjectType()
protection_container_read.type = AAZStrType(
flags={"read_only": True},
)
properties = _schema_protection_container_read.properties
properties.fabric_friendly_name = AAZStrType(
serialized_name="fabricFriendlyName",
)
properties.fabric_specific_details = AAZObjectType(
serialized_name="fabricSpecificDetails",
)
properties.fabric_type = AAZStrType(
serialized_name="fabricType",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.pairing_status = AAZStrType(
serialized_name="pairingStatus",
)
properties.protected_item_count = AAZIntType(
serialized_name="protectedItemCount",
)
properties.role = AAZStrType()
fabric_specific_details = _schema_protection_container_read.properties.fabric_specific_details
fabric_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"read_only": True},
)
_schema.id = cls._schema_protection_container_read.id
_schema.location = cls._schema_protection_container_read.location
_schema.name = cls._schema_protection_container_read.name
_schema.properties = cls._schema_protection_container_read.properties
_schema.type = cls._schema_protection_container_read.type
|
class _UpdateHelper:
'''Helper class for Update'''
@classmethod
def _build_schema_protection_container_read(cls, _schema):
pass
| 3 | 1 | 56 | 5 | 51 | 0 | 2 | 0.02 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 62 | 7 | 54 | 8 | 51 | 1 | 32 | 6 | 30 | 2 | 0 | 1 | 2 |
9,137 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._update.Update
|
class Update(AAZCommand):
"""Update to create a protection container.
:example: protection-container update
az site-recovery protection-container update -g rg --fabric-name fabric_source_name -n container_source_name --vault-name vault_name --provider-input '[{instance-type:A2ACrossClusterMigration}]'
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
AZ_SUPPORT_GENERIC_UPDATE = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.protection_container_name = AAZStrArg(
options=["-n", "--name", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.provider_specific_input = AAZListArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="Provider specific inputs for container creation.",
nullable=True,
)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.provider_specific_input.Element
_element.instance_type = AAZStrArg(
options=["instance-type"],
help="The class type.",
enum={"A2A": "A2A", "A2ACrossClusterMigration": "A2ACrossClusterMigration", "VMwareCbt": "VMwareCbt"},
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectionContainersGet(ctx=self.ctx)()
self.pre_instance_update(self.ctx.vars.instance)
self.InstanceUpdateByJson(ctx=self.ctx)()
self.InstanceUpdateByGeneric(ctx=self.ctx)()
self.post_instance_update(self.ctx.vars.instance)
yield self.ReplicationProtectionContainersCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainersGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_protection_container_read(cls._schema_on_200)
return cls._schema_on_200
class ReplicationProtectionContainersCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_protection_container_read(cls._schema_on_200)
return cls._schema_on_200
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("providerSpecificInput", AAZListType, ".provider_specific_input")
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificInput[]")
if _elements is not None:
_elements.set_prop("instanceType", AAZStrType, ".instance_type", typ_kwargs={"flags": {"required": True}})
return _instance_value
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance_by_generic(
self.ctx.vars.instance,
self.ctx.generic_update_args
)
|
class Update(AAZCommand):
'''Update to create a protection container.
:example: protection-container update
az site-recovery protection-container update -g rg --fabric-name fabric_source_name -n container_source_name --vault-name vault_name --provider-input '[{instance-type:A2ACrossClusterMigration}]'
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainersGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class ReplicationProtectionContainersCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
| 55 | 1 | 9 | 1 | 8 | 0 | 1 | 0.02 | 1 | 5 | 4 | 0 | 7 | 0 | 8 | 8 | 352 | 58 | 288 | 85 | 233 | 6 | 134 | 64 | 99 | 4 | 1 | 1 | 39 |
9,138 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_switch_protection.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._switch_protection._SwitchProtectionHelper
|
class _SwitchProtectionHelper:
"""Helper class for SwitchProtection"""
@classmethod
def _build_schema_disk_encryption_info_create(cls, _builder):
if _builder is None:
return
_builder.set_prop("diskEncryptionKeyInfo", AAZObjectType, ".disk_encryption_key_info")
_builder.set_prop("keyEncryptionKeyInfo", AAZObjectType, ".key_encryption_key_info")
disk_encryption_key_info = _builder.get(".diskEncryptionKeyInfo")
if disk_encryption_key_info is not None:
disk_encryption_key_info.set_prop("keyVaultResourceArmId", AAZStrType, ".key_vault_resource_arm_id")
disk_encryption_key_info.set_prop("secretIdentifier", AAZStrType, ".secret_identifier")
key_encryption_key_info = _builder.get(".keyEncryptionKeyInfo")
if key_encryption_key_info is not None:
key_encryption_key_info.set_prop("keyIdentifier", AAZStrType, ".key_identifier")
key_encryption_key_info.set_prop("keyVaultResourceArmId", AAZStrType, ".key_vault_resource_arm_id")
|
class _SwitchProtectionHelper:
'''Helper class for SwitchProtection'''
@classmethod
def _build_schema_disk_encryption_info_create(cls, _builder):
pass
| 3 | 1 | 15 | 2 | 13 | 0 | 4 | 0.07 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 19 | 3 | 15 | 5 | 12 | 1 | 14 | 4 | 12 | 4 | 0 | 1 | 4 |
9,139 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_switch_protection.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._switch_protection.SwitchProtection
|
class SwitchProtection(AAZCommand):
"""Operation to switch protection from one container to another or one replication provider to another.
:example: protection-container switch-protection for A2A
az site-recovery protection-container switch-protection --fabric-name fabric1_name -n container1_name --protected-item protected_item_name -g rg --vault-name vault_name --provider-details '{a2a:{policy-id:policy_id,recovery-container-id:container1_id,recovery-resource-group-id:vm_rg_id,vm-managed-disks:[{disk-id:recovery_os_disk,primary-staging-azure-storage-account-id:storage2_id,recovery-resource-group-id:vm_rg_id}]}}'
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/switchprotection", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Unique fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.protection_container_name = AAZStrArg(
options=["-n", "--protection-container-name"],
help="The name of the protection container.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.provider_specific_details = AAZObjectArg(
options=["--provider-details", "--provider-specific-details"],
arg_group="Properties",
help="Provider specific switch protection input.",
)
_args_schema.replication_protected_item_name = AAZStrArg(
options=["--protected-item", "--replication-protected-item-name"],
arg_group="Properties",
help="The unique replication protected item name.",
)
provider_specific_details = cls._args_schema.provider_specific_details
provider_specific_details.a2a = AAZObjectArg(
options=["a2a"],
help="A2A",
)
a2a = cls._args_schema.provider_specific_details.a2a
a2a.disk_encryption_info = AAZObjectArg(
options=["disk-encryption-info"],
help="The recovery disk encryption information.",
)
cls._build_args_disk_encryption_info_create(a2a.disk_encryption_info)
a2a.policy_id = AAZStrArg(
options=["policy-id"],
help="The Policy Id.",
)
a2a.recovery_availability_set_id = AAZStrArg(
options=["recovery-availability-set-id"],
help="The recovery availability set.",
)
a2a.recovery_availability_zone = AAZStrArg(
options=["recovery-availability-zone"],
help="The recovery availability zone.",
)
a2a.recovery_boot_diag_storage_account_id = AAZStrArg(
options=["recovery-boot-diag-storage-account-id"],
help="The boot diagnostic storage account.",
)
a2a.recovery_capacity_reservation_group_id = AAZStrArg(
options=["recovery-capacity-reservation-group-id"],
help="The recovery capacity reservation group Id.",
)
a2a.recovery_cloud_service_id = AAZStrArg(
options=["recovery-cloud-service-id"],
help="The recovery cloud service Id. Valid for V1 scenarios.",
)
a2a.recovery_container_id = AAZStrArg(
options=["recovery-container-id"],
help="The recovery container Id.",
)
a2a.recovery_proximity_placement_group_id = AAZStrArg(
options=["recovery-proximity-placement-group-id"],
help="The recovery proximity placement group Id.",
)
a2a.recovery_resource_group_id = AAZStrArg(
options=["recovery-resource-group-id"],
help="The recovery resource group Id. Valid for V2 scenarios.",
)
a2a.recovery_virtual_machine_scale_set_id = AAZStrArg(
options=["recovery-virtual-machine-scale-set-id"],
help="The virtual machine scale set id.",
)
a2a.vm_disks = AAZListArg(
options=["vm-disks"],
help="The list of vm disk details.",
)
a2a.vm_managed_disks = AAZListArg(
options=["vm-managed-disks"],
help="The list of vm managed disk details.",
)
vm_disks = cls._args_schema.provider_specific_details.a2a.vm_disks
vm_disks.Element = AAZObjectArg()
_element = cls._args_schema.provider_specific_details.a2a.vm_disks.Element
_element.disk_uri = AAZStrArg(
options=["disk-uri"],
help="The disk Uri.",
required=True,
)
_element.primary_staging_azure_storage_account_id = AAZStrArg(
options=["primary-staging-azure-storage-account-id"],
help="The primary staging storage account Id.",
required=True,
)
_element.recovery_azure_storage_account_id = AAZStrArg(
options=["recovery-azure-storage-account-id"],
help="The recovery VHD storage account Id.",
required=True,
)
vm_managed_disks = cls._args_schema.provider_specific_details.a2a.vm_managed_disks
vm_managed_disks.Element = AAZObjectArg()
_element = cls._args_schema.provider_specific_details.a2a.vm_managed_disks.Element
_element.disk_encryption_info = AAZObjectArg(
options=["disk-encryption-info"],
help="The recovery disk encryption information (for one / single pass flows).",
)
cls._build_args_disk_encryption_info_create(_element.disk_encryption_info)
_element.disk_id = AAZStrArg(
options=["disk-id"],
help="The disk Id.",
required=True,
)
_element.primary_staging_azure_storage_account_id = AAZStrArg(
options=["primary-staging-azure-storage-account-id"],
help="The primary staging storage account Arm Id.",
required=True,
)
_element.recovery_disk_encryption_set_id = AAZStrArg(
options=["recovery-disk-encryption-set-id"],
help="The recovery disk encryption set Id.",
)
_element.recovery_replica_disk_account_type = AAZStrArg(
options=["recovery-replica-disk-account-type"],
help="The replica disk type. Its an optional value and will be same as source disk type if not user provided.",
)
_element.recovery_resource_group_id = AAZStrArg(
options=["recovery-resource-group-id"],
help="The target resource group Arm Id.",
required=True,
)
_element.recovery_target_disk_account_type = AAZStrArg(
options=["recovery-target-disk-account-type"],
help="The target disk type after failover. Its an optional value and will be same as source disk type if not user provided.",
)
return cls._args_schema
_args_disk_encryption_info_create = None
@classmethod
def _build_args_disk_encryption_info_create(cls, _schema):
if cls._args_disk_encryption_info_create is not None:
_schema.disk_encryption_key_info = cls._args_disk_encryption_info_create.disk_encryption_key_info
_schema.key_encryption_key_info = cls._args_disk_encryption_info_create.key_encryption_key_info
return
cls._args_disk_encryption_info_create = AAZObjectArg()
disk_encryption_info_create = cls._args_disk_encryption_info_create
disk_encryption_info_create.disk_encryption_key_info = AAZObjectArg(
options=["disk-encryption-key-info"],
help="The recovery KeyVault reference for secret.",
)
disk_encryption_info_create.key_encryption_key_info = AAZObjectArg(
options=["key-encryption-key-info"],
help="The recovery KeyVault reference for key.",
)
disk_encryption_key_info = cls._args_disk_encryption_info_create.disk_encryption_key_info
disk_encryption_key_info.key_vault_resource_arm_id = AAZStrArg(
options=["key-vault-resource-arm-id"],
help="The KeyVault resource ARM id for secret.",
)
disk_encryption_key_info.secret_identifier = AAZStrArg(
options=["secret-identifier"],
help="The secret url / identifier.",
)
key_encryption_key_info = cls._args_disk_encryption_info_create.key_encryption_key_info
key_encryption_key_info.key_identifier = AAZStrArg(
options=["key-identifier"],
help="The key URL / identifier.",
)
key_encryption_key_info.key_vault_resource_arm_id = AAZStrArg(
options=["key-vault-resource-arm-id"],
help="The KeyVault resource ARM Id for key.",
)
_schema.disk_encryption_key_info = cls._args_disk_encryption_info_create.disk_encryption_key_info
_schema.key_encryption_key_info = cls._args_disk_encryption_info_create.key_encryption_key_info
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectionContainersSwitchProtection(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainersSwitchProtection(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/switchprotection",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("providerSpecificDetails", AAZObjectType, ".provider_specific_details")
properties.set_prop("replicationProtectedItemName", AAZStrType, ".replication_protected_item_name")
provider_specific_details = _builder.get(".properties.providerSpecificDetails")
if provider_specific_details is not None:
provider_specific_details.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
provider_specific_details.discriminate_by("instanceType", "A2A")
disc_a2_a = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}")
if disc_a2_a is not None:
_SwitchProtectionHelper._build_schema_disk_encryption_info_create(disc_a2_a.set_prop("diskEncryptionInfo", AAZObjectType, ".a2a.disk_encryption_info"))
disc_a2_a.set_prop("policyId", AAZStrType, ".a2a.policy_id")
disc_a2_a.set_prop("recoveryAvailabilitySetId", AAZStrType, ".a2a.recovery_availability_set_id")
disc_a2_a.set_prop("recoveryAvailabilityZone", AAZStrType, ".a2a.recovery_availability_zone")
disc_a2_a.set_prop("recoveryBootDiagStorageAccountId", AAZStrType, ".a2a.recovery_boot_diag_storage_account_id")
disc_a2_a.set_prop("recoveryCapacityReservationGroupId", AAZStrType, ".a2a.recovery_capacity_reservation_group_id")
disc_a2_a.set_prop("recoveryCloudServiceId", AAZStrType, ".a2a.recovery_cloud_service_id")
disc_a2_a.set_prop("recoveryContainerId", AAZStrType, ".a2a.recovery_container_id")
disc_a2_a.set_prop("recoveryProximityPlacementGroupId", AAZStrType, ".a2a.recovery_proximity_placement_group_id")
disc_a2_a.set_prop("recoveryResourceGroupId", AAZStrType, ".a2a.recovery_resource_group_id")
disc_a2_a.set_prop("recoveryVirtualMachineScaleSetId", AAZStrType, ".a2a.recovery_virtual_machine_scale_set_id")
disc_a2_a.set_prop("vmDisks", AAZListType, ".a2a.vm_disks")
disc_a2_a.set_prop("vmManagedDisks", AAZListType, ".a2a.vm_managed_disks")
vm_disks = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmDisks")
if vm_disks is not None:
vm_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmDisks[]")
if _elements is not None:
_elements.set_prop("diskUri", AAZStrType, ".disk_uri", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("primaryStagingAzureStorageAccountId", AAZStrType, ".primary_staging_azure_storage_account_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("recoveryAzureStorageAccountId", AAZStrType, ".recovery_azure_storage_account_id", typ_kwargs={"flags": {"required": True}})
vm_managed_disks = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmManagedDisks")
if vm_managed_disks is not None:
vm_managed_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmManagedDisks[]")
if _elements is not None:
_SwitchProtectionHelper._build_schema_disk_encryption_info_create(_elements.set_prop("diskEncryptionInfo", AAZObjectType, ".disk_encryption_info"))
_elements.set_prop("diskId", AAZStrType, ".disk_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("primaryStagingAzureStorageAccountId", AAZStrType, ".primary_staging_azure_storage_account_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("recoveryDiskEncryptionSetId", AAZStrType, ".recovery_disk_encryption_set_id")
_elements.set_prop("recoveryReplicaDiskAccountType", AAZStrType, ".recovery_replica_disk_account_type")
_elements.set_prop("recoveryResourceGroupId", AAZStrType, ".recovery_resource_group_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("recoveryTargetDiskAccountType", AAZStrType, ".recovery_target_disk_account_type")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.fabric_friendly_name = AAZStrType(
serialized_name="fabricFriendlyName",
)
properties.fabric_specific_details = AAZObjectType(
serialized_name="fabricSpecificDetails",
)
properties.fabric_type = AAZStrType(
serialized_name="fabricType",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.pairing_status = AAZStrType(
serialized_name="pairingStatus",
)
properties.protected_item_count = AAZIntType(
serialized_name="protectedItemCount",
)
properties.role = AAZStrType()
fabric_specific_details = cls._schema_on_200.properties.fabric_specific_details
fabric_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"read_only": True},
)
return cls._schema_on_200
|
class SwitchProtection(AAZCommand):
'''Operation to switch protection from one container to another or one replication provider to another.
:example: protection-container switch-protection for A2A
az site-recovery protection-container switch-protection --fabric-name fabric1_name -n container1_name --protected-item protected_item_name -g rg --vault-name vault_name --provider-details '{a2a:{policy-id:policy_id,recovery-container-id:container1_id,recovery-resource-group-id:vm_rg_id,vm-managed-disks:[{disk-id:recovery_os_disk,primary-staging-azure-storage-account-id:storage2_id,recovery-resource-group-id:vm_rg_id}]}}'
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
@classmethod
def _build_args_disk_encryption_info_create(cls, _schema):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainersSwitchProtection(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 31 | 1 | 24 | 2 | 22 | 0 | 2 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 7 | 7 | 456 | 53 | 397 | 64 | 366 | 6 | 180 | 51 | 161 | 8 | 1 | 1 | 29 |
9,140 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_show.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._show.Show
|
class Show(AAZCommand):
"""Get the details of a protection container.
:example: protection-container show
az site-recovery protection-container show -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}", "2022-08-01"],
]
}
def _handler(self, command_args):
super()._handler(command_args)
self._execute_operations()
return self._output()
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.protection_container_name = AAZStrArg(
options=["-n", "--name", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectionContainersGet(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainersGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.fabric_friendly_name = AAZStrType(
serialized_name="fabricFriendlyName",
)
properties.fabric_specific_details = AAZObjectType(
serialized_name="fabricSpecificDetails",
)
properties.fabric_type = AAZStrType(
serialized_name="fabricType",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.pairing_status = AAZStrType(
serialized_name="pairingStatus",
)
properties.protected_item_count = AAZIntType(
serialized_name="protectedItemCount",
)
properties.role = AAZStrType()
fabric_specific_details = cls._schema_on_200.properties.fabric_specific_details
fabric_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"read_only": True},
)
return cls._schema_on_200
|
class Show(AAZCommand):
'''Get the details of a protection container.
:example: protection-container show
az site-recovery protection-container show -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainersGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 10 | 1 | 10 | 0 | 1 | 0.03 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 199 | 28 | 166 | 42 | 139 | 5 | 76 | 32 | 59 | 2 | 1 | 1 | 18 |
9,141 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_remove.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._remove.Remove
|
class Remove(AAZCommand):
"""Operation to remove a protection container.
:example: protection-container remove
az site-recovery protection-container remove -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/remove", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, None)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Unique fabric ARM name.",
required=True,
id_part="child_name_1",
)
_args_schema.protection_container_name = AAZStrArg(
options=["-n", "--protection-container-name"],
help="The name of the protection container.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectionContainersDelete(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationProtectionContainersDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/remove",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class Remove(AAZCommand):
'''Operation to remove a protection container.
:example: protection-container remove
az site-recovery protection-container remove -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationProtectionContainersDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 23 | 1 | 9 | 0 | 9 | 0 | 1 | 0.04 | 1 | 2 | 1 | 0 | 4 | 0 | 5 | 5 | 159 | 21 | 133 | 33 | 110 | 5 | 53 | 24 | 38 | 4 | 1 | 1 | 17 |
9,142 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._list.List
|
class List(AAZCommand):
"""List the protection containers in the specified fabric.
:example: protection-container list
az site-recovery protection-container list -g rg --fabric-name fabric_source_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers", "2022-08-01"],
]
}
AZ_SUPPORT_PAGINATION = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectionContainersListByReplicationFabrics(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link
class ReplicationProtectionContainersListByReplicationFabrics(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.fabric_friendly_name = AAZStrType(
serialized_name="fabricFriendlyName",
)
properties.fabric_specific_details = AAZObjectType(
serialized_name="fabricSpecificDetails",
)
properties.fabric_type = AAZStrType(
serialized_name="fabricType",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.pairing_status = AAZStrType(
serialized_name="pairingStatus",
)
properties.protected_item_count = AAZIntType(
serialized_name="protectedItemCount",
)
properties.role = AAZStrType()
fabric_specific_details = cls._schema_on_200.value.Element.properties.fabric_specific_details
fabric_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"read_only": True},
)
return cls._schema_on_200
|
class List(AAZCommand):
'''List the protection containers in the specified fabric.
:example: protection-container list
az site-recovery protection-container list -g rg --fabric-name fabric_source_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainersListByReplicationFabrics(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 10 | 1 | 9 | 0 | 1 | 0.03 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 198 | 31 | 162 | 46 | 135 | 5 | 81 | 36 | 64 | 2 | 1 | 1 | 18 |
9,143 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/_create.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container._create.Create
|
class Create(AAZCommand):
"""Create to create a protection container.
:example: protection-container create for A2A
az site-recovery protection-container create -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name --provider-input '[{instance-type:A2A}]'
:example: protection-container create for hyper-v-replica-azure
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container \"Microsoft Azure\" --provider-input '{hyper-v-replica-azure:""}'
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Unique fabric ARM name.",
required=True,
)
_args_schema.protection_container_name = AAZStrArg(
options=["-n", "--name", "--protection-container-name"],
help="Unique protection container ARM name.",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.provider_specific_input = AAZListArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="Provider specific inputs for container creation.",
)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.Element = AAZObjectArg()
_element = cls._args_schema.provider_specific_input.Element
_element.instance_type = AAZStrArg(
options=["instance-type"],
help="The class type.",
required=True,
enum={"A2A": "A2A", "A2ACrossClusterMigration": "A2ACrossClusterMigration", "VMwareCbt": "VMwareCbt"},
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectionContainersCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainersCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("providerSpecificInput", AAZListType, ".provider_specific_input")
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificInput[]")
if _elements is not None:
_elements.set_prop("instanceType", AAZStrType, ".instance_type", typ_kwargs={"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.fabric_friendly_name = AAZStrType(
serialized_name="fabricFriendlyName",
)
properties.fabric_specific_details = AAZObjectType(
serialized_name="fabricSpecificDetails",
)
properties.fabric_type = AAZStrType(
serialized_name="fabricType",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.pairing_status = AAZStrType(
serialized_name="pairingStatus",
)
properties.protected_item_count = AAZIntType(
serialized_name="protectedItemCount",
)
properties.role = AAZStrType()
fabric_specific_details = cls._schema_on_200.properties.fabric_specific_details
fabric_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"read_only": True},
)
return cls._schema_on_200
|
class Create(AAZCommand):
'''Create to create a protection container.
:example: protection-container create for A2A
az site-recovery protection-container create -g rg --fabric-name fabric1_name -n container1_name --vault-name vault_name --provider-input '[{instance-type:A2A}]'
:example: protection-container create for hyper-v-replica-azure
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container "Microsoft Azure" --provider-input '{hyper-v-replica-azure:""}'
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainersCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 29 | 1 | 13 | 1 | 12 | 0 | 1 | 0.04 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 262 | 39 | 215 | 52 | 186 | 8 | 97 | 40 | 79 | 4 | 1 | 1 | 23 |
9,144 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/__cmd_group.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.__cmd_group.__CMDGroup
|
class __CMDGroup(AAZCommandGroup):
"""Manage Protection Container
"""
pass
|
class __CMDGroup(AAZCommandGroup):
'''Manage Protection Container
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,145 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protected_item/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.protected_item._update._UpdateHelper
|
class _UpdateHelper:
"""Helper class for Update"""
@classmethod
def _build_schema_disk_encryption_info_update(cls, _builder):
if _builder is None:
return
_builder.set_prop("diskEncryptionKeyInfo", AAZObjectType, ".disk_encryption_key_info")
_builder.set_prop("keyEncryptionKeyInfo", AAZObjectType, ".key_encryption_key_info")
disk_encryption_key_info = _builder.get(".diskEncryptionKeyInfo")
if disk_encryption_key_info is not None:
disk_encryption_key_info.set_prop("keyVaultResourceArmId", AAZStrType, ".key_vault_resource_arm_id")
disk_encryption_key_info.set_prop("secretIdentifier", AAZStrType, ".secret_identifier")
key_encryption_key_info = _builder.get(".keyEncryptionKeyInfo")
if key_encryption_key_info is not None:
key_encryption_key_info.set_prop("keyIdentifier", AAZStrType, ".key_identifier")
key_encryption_key_info.set_prop("keyVaultResourceArmId", AAZStrType, ".key_vault_resource_arm_id")
_schema_azure_vm_disk_details_read = None
@classmethod
def _build_schema_azure_vm_disk_details_read(cls, _schema):
if cls._schema_azure_vm_disk_details_read is not None:
_schema.custom_target_disk_name = cls._schema_azure_vm_disk_details_read.custom_target_disk_name
_schema.disk_encryption_set_id = cls._schema_azure_vm_disk_details_read.disk_encryption_set_id
_schema.disk_id = cls._schema_azure_vm_disk_details_read.disk_id
_schema.lun_id = cls._schema_azure_vm_disk_details_read.lun_id
_schema.max_size_mb = cls._schema_azure_vm_disk_details_read.max_size_mb
_schema.target_disk_location = cls._schema_azure_vm_disk_details_read.target_disk_location
_schema.target_disk_name = cls._schema_azure_vm_disk_details_read.target_disk_name
_schema.vhd_id = cls._schema_azure_vm_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_azure_vm_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_azure_vm_disk_details_read.vhd_type
return
cls._schema_azure_vm_disk_details_read = _schema_azure_vm_disk_details_read = AAZObjectType()
azure_vm_disk_details_read = _schema_azure_vm_disk_details_read
azure_vm_disk_details_read.custom_target_disk_name = AAZStrType(
serialized_name="customTargetDiskName",
)
azure_vm_disk_details_read.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
azure_vm_disk_details_read.disk_id = AAZStrType(
serialized_name="diskId",
)
azure_vm_disk_details_read.lun_id = AAZStrType(
serialized_name="lunId",
)
azure_vm_disk_details_read.max_size_mb = AAZStrType(
serialized_name="maxSizeMB",
)
azure_vm_disk_details_read.target_disk_location = AAZStrType(
serialized_name="targetDiskLocation",
)
azure_vm_disk_details_read.target_disk_name = AAZStrType(
serialized_name="targetDiskName",
)
azure_vm_disk_details_read.vhd_id = AAZStrType(
serialized_name="vhdId",
)
azure_vm_disk_details_read.vhd_name = AAZStrType(
serialized_name="vhdName",
)
azure_vm_disk_details_read.vhd_type = AAZStrType(
serialized_name="vhdType",
)
_schema.custom_target_disk_name = cls._schema_azure_vm_disk_details_read.custom_target_disk_name
_schema.disk_encryption_set_id = cls._schema_azure_vm_disk_details_read.disk_encryption_set_id
_schema.disk_id = cls._schema_azure_vm_disk_details_read.disk_id
_schema.lun_id = cls._schema_azure_vm_disk_details_read.lun_id
_schema.max_size_mb = cls._schema_azure_vm_disk_details_read.max_size_mb
_schema.target_disk_location = cls._schema_azure_vm_disk_details_read.target_disk_location
_schema.target_disk_name = cls._schema_azure_vm_disk_details_read.target_disk_name
_schema.vhd_id = cls._schema_azure_vm_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_azure_vm_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_azure_vm_disk_details_read.vhd_type
_schema_disk_details_read = None
@classmethod
def _build_schema_disk_details_read(cls, _schema):
if cls._schema_disk_details_read is not None:
_schema.max_size_mb = cls._schema_disk_details_read.max_size_mb
_schema.vhd_id = cls._schema_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_disk_details_read.vhd_type
return
cls._schema_disk_details_read = _schema_disk_details_read = AAZObjectType()
disk_details_read = _schema_disk_details_read
disk_details_read.max_size_mb = AAZIntType(
serialized_name="maxSizeMB",
)
disk_details_read.vhd_id = AAZStrType(
serialized_name="vhdId",
)
disk_details_read.vhd_name = AAZStrType(
serialized_name="vhdName",
)
disk_details_read.vhd_type = AAZStrType(
serialized_name="vhdType",
)
_schema.max_size_mb = cls._schema_disk_details_read.max_size_mb
_schema.vhd_id = cls._schema_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_disk_details_read.vhd_type
_schema_extended_location_read = None
@classmethod
def _build_schema_extended_location_read(cls, _schema):
if cls._schema_extended_location_read is not None:
_schema.name = cls._schema_extended_location_read.name
_schema.type = cls._schema_extended_location_read.type
return
cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType()
extended_location_read = _schema_extended_location_read
extended_location_read.name = AAZStrType(
flags={"required": True},
)
extended_location_read.type = AAZStrType(
flags={"required": True},
)
_schema.name = cls._schema_extended_location_read.name
_schema.type = cls._schema_extended_location_read.type
_schema_health_error_read = None
@classmethod
def _build_schema_health_error_read(cls, _schema):
if cls._schema_health_error_read is not None:
_schema.creation_time_utc = cls._schema_health_error_read.creation_time_utc
_schema.customer_resolvability = cls._schema_health_error_read.customer_resolvability
_schema.entity_id = cls._schema_health_error_read.entity_id
_schema.error_category = cls._schema_health_error_read.error_category
_schema.error_code = cls._schema_health_error_read.error_code
_schema.error_id = cls._schema_health_error_read.error_id
_schema.error_level = cls._schema_health_error_read.error_level
_schema.error_message = cls._schema_health_error_read.error_message
_schema.error_source = cls._schema_health_error_read.error_source
_schema.error_type = cls._schema_health_error_read.error_type
_schema.inner_health_errors = cls._schema_health_error_read.inner_health_errors
_schema.possible_causes = cls._schema_health_error_read.possible_causes
_schema.recommended_action = cls._schema_health_error_read.recommended_action
_schema.recovery_provider_error_message = cls._schema_health_error_read.recovery_provider_error_message
_schema.summary_message = cls._schema_health_error_read.summary_message
return
cls._schema_health_error_read = _schema_health_error_read = AAZObjectType()
health_error_read = _schema_health_error_read
health_error_read.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
health_error_read.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
health_error_read.entity_id = AAZStrType(
serialized_name="entityId",
)
health_error_read.error_category = AAZStrType(
serialized_name="errorCategory",
)
health_error_read.error_code = AAZStrType(
serialized_name="errorCode",
)
health_error_read.error_id = AAZStrType(
serialized_name="errorId",
)
health_error_read.error_level = AAZStrType(
serialized_name="errorLevel",
)
health_error_read.error_message = AAZStrType(
serialized_name="errorMessage",
)
health_error_read.error_source = AAZStrType(
serialized_name="errorSource",
)
health_error_read.error_type = AAZStrType(
serialized_name="errorType",
)
health_error_read.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
health_error_read.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
health_error_read.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
health_error_read.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
health_error_read.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = _schema_health_error_read.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = _schema_health_error_read.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
_schema.creation_time_utc = cls._schema_health_error_read.creation_time_utc
_schema.customer_resolvability = cls._schema_health_error_read.customer_resolvability
_schema.entity_id = cls._schema_health_error_read.entity_id
_schema.error_category = cls._schema_health_error_read.error_category
_schema.error_code = cls._schema_health_error_read.error_code
_schema.error_id = cls._schema_health_error_read.error_id
_schema.error_level = cls._schema_health_error_read.error_level
_schema.error_message = cls._schema_health_error_read.error_message
_schema.error_source = cls._schema_health_error_read.error_source
_schema.error_type = cls._schema_health_error_read.error_type
_schema.inner_health_errors = cls._schema_health_error_read.inner_health_errors
_schema.possible_causes = cls._schema_health_error_read.possible_causes
_schema.recommended_action = cls._schema_health_error_read.recommended_action
_schema.recovery_provider_error_message = cls._schema_health_error_read.recovery_provider_error_message
_schema.summary_message = cls._schema_health_error_read.summary_message
_schema_in_mage_rcm_failback_sync_details_read = None
@classmethod
def _build_schema_in_mage_rcm_failback_sync_details_read(cls, _schema):
if cls._schema_in_mage_rcm_failback_sync_details_read is not None:
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_failback_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_failback_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_failback_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_failback_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.transferred_bytes
return
cls._schema_in_mage_rcm_failback_sync_details_read = _schema_in_mage_rcm_failback_sync_details_read = AAZObjectType()
in_mage_rcm_failback_sync_details_read = _schema_in_mage_rcm_failback_sync_details_read
in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes = AAZIntType(
serialized_name="last15MinutesTransferredBytes",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc = AAZStrType(
serialized_name="lastDataTransferTimeUtc",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.last_refresh_time = AAZStrType(
serialized_name="lastRefreshTime",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.processed_bytes = AAZIntType(
serialized_name="processedBytes",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.progress_health = AAZStrType(
serialized_name="progressHealth",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.progress_percentage = AAZIntType(
serialized_name="progressPercentage",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.start_time = AAZStrType(
serialized_name="startTime",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.transferred_bytes = AAZIntType(
serialized_name="transferredBytes",
flags={"read_only": True},
)
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_failback_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_failback_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_failback_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_failback_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.transferred_bytes
_schema_in_mage_rcm_sync_details_read = None
@classmethod
def _build_schema_in_mage_rcm_sync_details_read(cls, _schema):
if cls._schema_in_mage_rcm_sync_details_read is not None:
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.transferred_bytes
return
cls._schema_in_mage_rcm_sync_details_read = _schema_in_mage_rcm_sync_details_read = AAZObjectType()
in_mage_rcm_sync_details_read = _schema_in_mage_rcm_sync_details_read
in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes = AAZIntType(
serialized_name="last15MinutesTransferredBytes",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.last_data_transfer_time_utc = AAZStrType(
serialized_name="lastDataTransferTimeUtc",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.last_refresh_time = AAZStrType(
serialized_name="lastRefreshTime",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.processed_bytes = AAZIntType(
serialized_name="processedBytes",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.progress_health = AAZStrType(
serialized_name="progressHealth",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.progress_percentage = AAZIntType(
serialized_name="progressPercentage",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.start_time = AAZStrType(
serialized_name="startTime",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.transferred_bytes = AAZIntType(
serialized_name="transferredBytes",
flags={"read_only": True},
)
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.transferred_bytes
_schema_initial_replication_details_read = None
@classmethod
def _build_schema_initial_replication_details_read(cls, _schema):
if cls._schema_initial_replication_details_read is not None:
_schema.initial_replication_progress_percentage = cls._schema_initial_replication_details_read.initial_replication_progress_percentage
_schema.initial_replication_type = cls._schema_initial_replication_details_read.initial_replication_type
return
cls._schema_initial_replication_details_read = _schema_initial_replication_details_read = AAZObjectType()
initial_replication_details_read = _schema_initial_replication_details_read
initial_replication_details_read.initial_replication_progress_percentage = AAZStrType(
serialized_name="initialReplicationProgressPercentage",
)
initial_replication_details_read.initial_replication_type = AAZStrType(
serialized_name="initialReplicationType",
)
_schema.initial_replication_progress_percentage = cls._schema_initial_replication_details_read.initial_replication_progress_percentage
_schema.initial_replication_type = cls._schema_initial_replication_details_read.initial_replication_type
_schema_replication_protected_item_read = None
@classmethod
def _build_schema_replication_protected_item_read(cls, _schema):
if cls._schema_replication_protected_item_read is not None:
_schema.id = cls._schema_replication_protected_item_read.id
_schema.location = cls._schema_replication_protected_item_read.location
_schema.name = cls._schema_replication_protected_item_read.name
_schema.properties = cls._schema_replication_protected_item_read.properties
_schema.type = cls._schema_replication_protected_item_read.type
return
cls._schema_replication_protected_item_read = _schema_replication_protected_item_read = AAZObjectType()
replication_protected_item_read = _schema_replication_protected_item_read
replication_protected_item_read.id = AAZStrType(
flags={"read_only": True},
)
replication_protected_item_read.location = AAZStrType()
replication_protected_item_read.name = AAZStrType(
flags={"read_only": True},
)
replication_protected_item_read.properties = AAZObjectType()
replication_protected_item_read.type = AAZStrType(
flags={"read_only": True},
)
properties = _schema_replication_protected_item_read.properties
properties.active_location = AAZStrType(
serialized_name="activeLocation",
)
properties.allowed_operations = AAZListType(
serialized_name="allowedOperations",
)
properties.current_scenario = AAZObjectType(
serialized_name="currentScenario",
)
properties.event_correlation_id = AAZStrType(
serialized_name="eventCorrelationId",
)
properties.failover_health = AAZStrType(
serialized_name="failoverHealth",
)
properties.failover_recovery_point_id = AAZStrType(
serialized_name="failoverRecoveryPointId",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.health_errors = AAZListType(
serialized_name="healthErrors",
)
properties.last_successful_failover_time = AAZStrType(
serialized_name="lastSuccessfulFailoverTime",
)
properties.last_successful_test_failover_time = AAZStrType(
serialized_name="lastSuccessfulTestFailoverTime",
)
properties.policy_friendly_name = AAZStrType(
serialized_name="policyFriendlyName",
)
properties.policy_id = AAZStrType(
serialized_name="policyId",
)
properties.primary_fabric_friendly_name = AAZStrType(
serialized_name="primaryFabricFriendlyName",
)
properties.primary_fabric_provider = AAZStrType(
serialized_name="primaryFabricProvider",
)
properties.primary_protection_container_friendly_name = AAZStrType(
serialized_name="primaryProtectionContainerFriendlyName",
)
properties.protectable_item_id = AAZStrType(
serialized_name="protectableItemId",
)
properties.protected_item_type = AAZStrType(
serialized_name="protectedItemType",
)
properties.protection_state = AAZStrType(
serialized_name="protectionState",
)
properties.protection_state_description = AAZStrType(
serialized_name="protectionStateDescription",
)
properties.provider_specific_details = AAZObjectType(
serialized_name="providerSpecificDetails",
)
properties.recovery_container_id = AAZStrType(
serialized_name="recoveryContainerId",
)
properties.recovery_fabric_friendly_name = AAZStrType(
serialized_name="recoveryFabricFriendlyName",
)
properties.recovery_fabric_id = AAZStrType(
serialized_name="recoveryFabricId",
)
properties.recovery_protection_container_friendly_name = AAZStrType(
serialized_name="recoveryProtectionContainerFriendlyName",
)
properties.recovery_services_provider_id = AAZStrType(
serialized_name="recoveryServicesProviderId",
)
properties.replication_health = AAZStrType(
serialized_name="replicationHealth",
)
properties.switch_provider_state = AAZStrType(
serialized_name="switchProviderState",
)
properties.switch_provider_state_description = AAZStrType(
serialized_name="switchProviderStateDescription",
)
properties.test_failover_state = AAZStrType(
serialized_name="testFailoverState",
)
properties.test_failover_state_description = AAZStrType(
serialized_name="testFailoverStateDescription",
)
allowed_operations = _schema_replication_protected_item_read.properties.allowed_operations
allowed_operations.Element = AAZStrType()
current_scenario = _schema_replication_protected_item_read.properties.current_scenario
current_scenario.job_id = AAZStrType(
serialized_name="jobId",
)
current_scenario.scenario_name = AAZStrType(
serialized_name="scenarioName",
)
current_scenario.start_time = AAZStrType(
serialized_name="startTime",
)
health_errors = _schema_replication_protected_item_read.properties.health_errors
health_errors.Element = AAZObjectType()
cls._build_schema_health_error_read(health_errors.Element)
provider_specific_details = _schema_replication_protected_item_read.properties.provider_specific_details
provider_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A")
disc_a2_a.agent_certificate_expiry_date = AAZStrType(
serialized_name="agentCertificateExpiryDate",
flags={"read_only": True},
)
disc_a2_a.agent_expiry_date = AAZStrType(
serialized_name="agentExpiryDate",
)
disc_a2_a.agent_version = AAZStrType(
serialized_name="agentVersion",
)
disc_a2_a.auto_protection_of_data_disk = AAZStrType(
serialized_name="autoProtectionOfDataDisk",
)
disc_a2_a.fabric_object_id = AAZStrType(
serialized_name="fabricObjectId",
)
disc_a2_a.initial_primary_extended_location = AAZObjectType(
serialized_name="initialPrimaryExtendedLocation",
)
cls._build_schema_extended_location_read(disc_a2_a.initial_primary_extended_location)
disc_a2_a.initial_primary_fabric_location = AAZStrType(
serialized_name="initialPrimaryFabricLocation",
flags={"read_only": True},
)
disc_a2_a.initial_primary_zone = AAZStrType(
serialized_name="initialPrimaryZone",
flags={"read_only": True},
)
disc_a2_a.initial_recovery_extended_location = AAZObjectType(
serialized_name="initialRecoveryExtendedLocation",
)
cls._build_schema_extended_location_read(disc_a2_a.initial_recovery_extended_location)
disc_a2_a.initial_recovery_fabric_location = AAZStrType(
serialized_name="initialRecoveryFabricLocation",
flags={"read_only": True},
)
disc_a2_a.initial_recovery_zone = AAZStrType(
serialized_name="initialRecoveryZone",
flags={"read_only": True},
)
disc_a2_a.is_replication_agent_certificate_update_required = AAZBoolType(
serialized_name="isReplicationAgentCertificateUpdateRequired",
)
disc_a2_a.is_replication_agent_update_required = AAZBoolType(
serialized_name="isReplicationAgentUpdateRequired",
)
disc_a2_a.last_heartbeat = AAZStrType(
serialized_name="lastHeartbeat",
)
disc_a2_a.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_a2_a.lifecycle_id = AAZStrType(
serialized_name="lifecycleId",
)
disc_a2_a.management_id = AAZStrType(
serialized_name="managementId",
)
disc_a2_a.monitoring_job_type = AAZStrType(
serialized_name="monitoringJobType",
)
disc_a2_a.monitoring_percentage_completion = AAZIntType(
serialized_name="monitoringPercentageCompletion",
)
disc_a2_a.multi_vm_group_create_option = AAZStrType(
serialized_name="multiVmGroupCreateOption",
)
disc_a2_a.multi_vm_group_id = AAZStrType(
serialized_name="multiVmGroupId",
)
disc_a2_a.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
)
disc_a2_a.os_type = AAZStrType(
serialized_name="osType",
)
disc_a2_a.primary_availability_zone = AAZStrType(
serialized_name="primaryAvailabilityZone",
)
disc_a2_a.primary_extended_location = AAZObjectType(
serialized_name="primaryExtendedLocation",
)
cls._build_schema_extended_location_read(disc_a2_a.primary_extended_location)
disc_a2_a.primary_fabric_location = AAZStrType(
serialized_name="primaryFabricLocation",
)
disc_a2_a.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_a2_a.protected_managed_disks = AAZListType(
serialized_name="protectedManagedDisks",
)
disc_a2_a.recovery_availability_set = AAZStrType(
serialized_name="recoveryAvailabilitySet",
)
disc_a2_a.recovery_availability_zone = AAZStrType(
serialized_name="recoveryAvailabilityZone",
)
disc_a2_a.recovery_azure_generation = AAZStrType(
serialized_name="recoveryAzureGeneration",
flags={"read_only": True},
)
disc_a2_a.recovery_azure_resource_group_id = AAZStrType(
serialized_name="recoveryAzureResourceGroupId",
)
disc_a2_a.recovery_azure_vm_name = AAZStrType(
serialized_name="recoveryAzureVMName",
)
disc_a2_a.recovery_azure_vm_size = AAZStrType(
serialized_name="recoveryAzureVMSize",
)
disc_a2_a.recovery_boot_diag_storage_account_id = AAZStrType(
serialized_name="recoveryBootDiagStorageAccountId",
)
disc_a2_a.recovery_capacity_reservation_group_id = AAZStrType(
serialized_name="recoveryCapacityReservationGroupId",
)
disc_a2_a.recovery_cloud_service = AAZStrType(
serialized_name="recoveryCloudService",
)
disc_a2_a.recovery_extended_location = AAZObjectType(
serialized_name="recoveryExtendedLocation",
)
cls._build_schema_extended_location_read(disc_a2_a.recovery_extended_location)
disc_a2_a.recovery_fabric_location = AAZStrType(
serialized_name="recoveryFabricLocation",
)
disc_a2_a.recovery_fabric_object_id = AAZStrType(
serialized_name="recoveryFabricObjectId",
)
disc_a2_a.recovery_proximity_placement_group_id = AAZStrType(
serialized_name="recoveryProximityPlacementGroupId",
)
disc_a2_a.recovery_virtual_machine_scale_set_id = AAZStrType(
serialized_name="recoveryVirtualMachineScaleSetId",
)
disc_a2_a.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_a2_a.selected_recovery_azure_network_id = AAZStrType(
serialized_name="selectedRecoveryAzureNetworkId",
)
disc_a2_a.selected_tfo_azure_network_id = AAZStrType(
serialized_name="selectedTfoAzureNetworkId",
)
disc_a2_a.test_failover_recovery_fabric_object_id = AAZStrType(
serialized_name="testFailoverRecoveryFabricObjectId",
)
disc_a2_a.tfo_azure_vm_name = AAZStrType(
serialized_name="tfoAzureVMName",
)
disc_a2_a.unprotected_disks = AAZListType(
serialized_name="unprotectedDisks",
)
disc_a2_a.vm_encryption_type = AAZStrType(
serialized_name="vmEncryptionType",
flags={"read_only": True},
)
disc_a2_a.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_a2_a.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_a2_a.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
disc_a2_a.vm_synced_config_details = AAZObjectType(
serialized_name="vmSyncedConfigDetails",
)
protected_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_disks
protected_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_disks.Element
_element.allowed_disk_level_operation = AAZListType(
serialized_name="allowedDiskLevelOperation",
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
)
_element.data_pending_in_staging_storage_account_in_mb = AAZFloatType(
serialized_name="dataPendingInStagingStorageAccountInMB",
)
_element.dek_key_vault_arm_id = AAZStrType(
serialized_name="dekKeyVaultArmId",
)
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_state = AAZStrType(
serialized_name="diskState",
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.disk_uri = AAZStrType(
serialized_name="diskUri",
)
_element.failover_disk_name = AAZStrType(
serialized_name="failoverDiskName",
)
_element.is_disk_encrypted = AAZBoolType(
serialized_name="isDiskEncrypted",
)
_element.is_disk_key_encrypted = AAZBoolType(
serialized_name="isDiskKeyEncrypted",
)
_element.kek_key_vault_arm_id = AAZStrType(
serialized_name="kekKeyVaultArmId",
)
_element.key_identifier = AAZStrType(
serialized_name="keyIdentifier",
)
_element.monitoring_job_type = AAZStrType(
serialized_name="monitoringJobType",
)
_element.monitoring_percentage_completion = AAZIntType(
serialized_name="monitoringPercentageCompletion",
)
_element.primary_disk_azure_storage_account_id = AAZStrType(
serialized_name="primaryDiskAzureStorageAccountId",
)
_element.primary_staging_azure_storage_account_id = AAZStrType(
serialized_name="primaryStagingAzureStorageAccountId",
)
_element.recovery_azure_storage_account_id = AAZStrType(
serialized_name="recoveryAzureStorageAccountId",
)
_element.recovery_disk_uri = AAZStrType(
serialized_name="recoveryDiskUri",
)
_element.resync_required = AAZBoolType(
serialized_name="resyncRequired",
)
_element.secret_identifier = AAZStrType(
serialized_name="secretIdentifier",
)
_element.tfo_disk_name = AAZStrType(
serialized_name="tfoDiskName",
)
allowed_disk_level_operation = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_disks.Element.allowed_disk_level_operation
allowed_disk_level_operation.Element = AAZStrType()
protected_managed_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_managed_disks
protected_managed_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_managed_disks.Element
_element.allowed_disk_level_operation = AAZListType(
serialized_name="allowedDiskLevelOperation",
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
)
_element.data_pending_in_staging_storage_account_in_mb = AAZFloatType(
serialized_name="dataPendingInStagingStorageAccountInMB",
)
_element.dek_key_vault_arm_id = AAZStrType(
serialized_name="dekKeyVaultArmId",
)
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_state = AAZStrType(
serialized_name="diskState",
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.failover_disk_name = AAZStrType(
serialized_name="failoverDiskName",
)
_element.is_disk_encrypted = AAZBoolType(
serialized_name="isDiskEncrypted",
)
_element.is_disk_key_encrypted = AAZBoolType(
serialized_name="isDiskKeyEncrypted",
)
_element.kek_key_vault_arm_id = AAZStrType(
serialized_name="kekKeyVaultArmId",
)
_element.key_identifier = AAZStrType(
serialized_name="keyIdentifier",
)
_element.monitoring_job_type = AAZStrType(
serialized_name="monitoringJobType",
)
_element.monitoring_percentage_completion = AAZIntType(
serialized_name="monitoringPercentageCompletion",
)
_element.primary_disk_encryption_set_id = AAZStrType(
serialized_name="primaryDiskEncryptionSetId",
)
_element.primary_staging_azure_storage_account_id = AAZStrType(
serialized_name="primaryStagingAzureStorageAccountId",
)
_element.recovery_disk_encryption_set_id = AAZStrType(
serialized_name="recoveryDiskEncryptionSetId",
)
_element.recovery_orignal_target_disk_id = AAZStrType(
serialized_name="recoveryOrignalTargetDiskId",
)
_element.recovery_replica_disk_account_type = AAZStrType(
serialized_name="recoveryReplicaDiskAccountType",
)
_element.recovery_replica_disk_id = AAZStrType(
serialized_name="recoveryReplicaDiskId",
)
_element.recovery_resource_group_id = AAZStrType(
serialized_name="recoveryResourceGroupId",
)
_element.recovery_target_disk_account_type = AAZStrType(
serialized_name="recoveryTargetDiskAccountType",
)
_element.recovery_target_disk_id = AAZStrType(
serialized_name="recoveryTargetDiskId",
)
_element.resync_required = AAZBoolType(
serialized_name="resyncRequired",
)
_element.secret_identifier = AAZStrType(
serialized_name="secretIdentifier",
)
_element.tfo_disk_name = AAZStrType(
serialized_name="tfoDiskName",
)
allowed_disk_level_operation = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_managed_disks.Element.allowed_disk_level_operation
allowed_disk_level_operation.Element = AAZStrType()
unprotected_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").unprotected_disks
unprotected_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").unprotected_disks.Element
_element.disk_auto_protection_status = AAZStrType(
serialized_name="diskAutoProtectionStatus",
)
_element.disk_lun_id = AAZIntType(
serialized_name="diskLunId",
)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
vm_synced_config_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details
vm_synced_config_details.input_endpoints = AAZListType(
serialized_name="inputEndpoints",
)
vm_synced_config_details.tags = AAZDictType()
input_endpoints = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details.input_endpoints
input_endpoints.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details.input_endpoints.Element
_element.endpoint_name = AAZStrType(
serialized_name="endpointName",
)
_element.private_port = AAZIntType(
serialized_name="privatePort",
)
_element.protocol = AAZStrType()
_element.public_port = AAZIntType(
serialized_name="publicPort",
)
tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details.tags
tags.Element = AAZStrType()
disc_a2_a_cross_cluster_migration = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "A2ACrossClusterMigration")
disc_a2_a_cross_cluster_migration.fabric_object_id = AAZStrType(
serialized_name="fabricObjectId",
)
disc_a2_a_cross_cluster_migration.lifecycle_id = AAZStrType(
serialized_name="lifecycleId",
)
disc_a2_a_cross_cluster_migration.os_type = AAZStrType(
serialized_name="osType",
)
disc_a2_a_cross_cluster_migration.primary_fabric_location = AAZStrType(
serialized_name="primaryFabricLocation",
)
disc_a2_a_cross_cluster_migration.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_a2_a_cross_cluster_migration.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
disc_hyper_v_replica2012 = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012")
disc_hyper_v_replica2012.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
cls._build_schema_initial_replication_details_read(disc_hyper_v_replica2012.initial_replication_details)
disc_hyper_v_replica2012.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica2012.v_m_disk_details = AAZListType(
serialized_name="vMDiskDetails",
)
disc_hyper_v_replica2012.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica2012.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica2012.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica2012.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
v_m_disk_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012").v_m_disk_details
v_m_disk_details.Element = AAZObjectType()
cls._build_schema_disk_details_read(v_m_disk_details.Element)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
disc_hyper_v_replica2012_r2 = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012R2")
disc_hyper_v_replica2012_r2.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
cls._build_schema_initial_replication_details_read(disc_hyper_v_replica2012_r2.initial_replication_details)
disc_hyper_v_replica2012_r2.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica2012_r2.v_m_disk_details = AAZListType(
serialized_name="vMDiskDetails",
)
disc_hyper_v_replica2012_r2.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica2012_r2.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica2012_r2.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica2012_r2.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
v_m_disk_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012R2").v_m_disk_details
v_m_disk_details.Element = AAZObjectType()
cls._build_schema_disk_details_read(v_m_disk_details.Element)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012R2").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
disc_hyper_v_replica_azure = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure")
disc_hyper_v_replica_azure.azure_vm_disk_details = AAZListType(
serialized_name="azureVmDiskDetails",
)
disc_hyper_v_replica_azure.enable_rdp_on_target_option = AAZStrType(
serialized_name="enableRdpOnTargetOption",
)
disc_hyper_v_replica_azure.encryption = AAZStrType()
disc_hyper_v_replica_azure.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
cls._build_schema_initial_replication_details_read(disc_hyper_v_replica_azure.initial_replication_details)
disc_hyper_v_replica_azure.last_recovery_point_received = AAZStrType(
serialized_name="lastRecoveryPointReceived",
flags={"read_only": True},
)
disc_hyper_v_replica_azure.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica_azure.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_hyper_v_replica_azure.license_type = AAZStrType(
serialized_name="licenseType",
)
disc_hyper_v_replica_azure.o_s_details = AAZObjectType(
serialized_name="oSDetails",
)
disc_hyper_v_replica_azure.protected_managed_disks = AAZListType(
serialized_name="protectedManagedDisks",
)
disc_hyper_v_replica_azure.recovery_availability_set_id = AAZStrType(
serialized_name="recoveryAvailabilitySetId",
)
disc_hyper_v_replica_azure.recovery_azure_log_storage_account_id = AAZStrType(
serialized_name="recoveryAzureLogStorageAccountId",
)
disc_hyper_v_replica_azure.recovery_azure_resource_group_id = AAZStrType(
serialized_name="recoveryAzureResourceGroupId",
)
disc_hyper_v_replica_azure.recovery_azure_storage_account = AAZStrType(
serialized_name="recoveryAzureStorageAccount",
)
disc_hyper_v_replica_azure.recovery_azure_vm_size = AAZStrType(
serialized_name="recoveryAzureVMSize",
)
disc_hyper_v_replica_azure.recovery_azure_vm_name = AAZStrType(
serialized_name="recoveryAzureVmName",
)
disc_hyper_v_replica_azure.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_hyper_v_replica_azure.seed_managed_disk_tags = AAZDictType(
serialized_name="seedManagedDiskTags",
)
disc_hyper_v_replica_azure.selected_recovery_azure_network_id = AAZStrType(
serialized_name="selectedRecoveryAzureNetworkId",
)
disc_hyper_v_replica_azure.selected_source_nic_id = AAZStrType(
serialized_name="selectedSourceNicId",
)
disc_hyper_v_replica_azure.source_vm_cpu_count = AAZIntType(
serialized_name="sourceVmCpuCount",
)
disc_hyper_v_replica_azure.source_vm_ram_size_in_mb = AAZIntType(
serialized_name="sourceVmRamSizeInMB",
)
disc_hyper_v_replica_azure.sql_server_license_type = AAZStrType(
serialized_name="sqlServerLicenseType",
)
disc_hyper_v_replica_azure.target_availability_zone = AAZStrType(
serialized_name="targetAvailabilityZone",
)
disc_hyper_v_replica_azure.target_managed_disk_tags = AAZDictType(
serialized_name="targetManagedDiskTags",
)
disc_hyper_v_replica_azure.target_nic_tags = AAZDictType(
serialized_name="targetNicTags",
)
disc_hyper_v_replica_azure.target_proximity_placement_group_id = AAZStrType(
serialized_name="targetProximityPlacementGroupId",
)
disc_hyper_v_replica_azure.target_vm_tags = AAZDictType(
serialized_name="targetVmTags",
)
disc_hyper_v_replica_azure.use_managed_disks = AAZStrType(
serialized_name="useManagedDisks",
)
disc_hyper_v_replica_azure.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica_azure.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica_azure.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica_azure.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
azure_vm_disk_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").azure_vm_disk_details
azure_vm_disk_details.Element = AAZObjectType()
cls._build_schema_azure_vm_disk_details_read(azure_vm_disk_details.Element)
o_s_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").o_s_details
o_s_details.o_s_major_version = AAZStrType(
serialized_name="oSMajorVersion",
)
o_s_details.o_s_minor_version = AAZStrType(
serialized_name="oSMinorVersion",
)
o_s_details.o_s_version = AAZStrType(
serialized_name="oSVersion",
)
o_s_details.os_edition = AAZStrType(
serialized_name="osEdition",
)
o_s_details.os_type = AAZStrType(
serialized_name="osType",
)
o_s_details.product_type = AAZStrType(
serialized_name="productType",
)
protected_managed_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").protected_managed_disks
protected_managed_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").protected_managed_disks.Element
_element.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.replica_disk_type = AAZStrType(
serialized_name="replicaDiskType",
)
_element.seed_managed_disk_id = AAZStrType(
serialized_name="seedManagedDiskId",
)
seed_managed_disk_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").seed_managed_disk_tags
seed_managed_disk_tags.Element = AAZStrType()
target_managed_disk_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").target_managed_disk_tags
target_managed_disk_tags.Element = AAZStrType()
target_nic_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").target_nic_tags
target_nic_tags.Element = AAZStrType()
target_vm_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").target_vm_tags
target_vm_tags.Element = AAZStrType()
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
disc_hyper_v_replica_base_replication_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaBaseReplicationDetails")
disc_hyper_v_replica_base_replication_details.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
cls._build_schema_initial_replication_details_read(disc_hyper_v_replica_base_replication_details.initial_replication_details)
disc_hyper_v_replica_base_replication_details.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica_base_replication_details.v_m_disk_details = AAZListType(
serialized_name="vMDiskDetails",
)
disc_hyper_v_replica_base_replication_details.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica_base_replication_details.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica_base_replication_details.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica_base_replication_details.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
v_m_disk_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaBaseReplicationDetails").v_m_disk_details
v_m_disk_details.Element = AAZObjectType()
cls._build_schema_disk_details_read(v_m_disk_details.Element)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaBaseReplicationDetails").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
disc_in_mage = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage")
disc_in_mage.active_site_type = AAZStrType(
serialized_name="activeSiteType",
)
disc_in_mage.agent_details = AAZObjectType(
serialized_name="agentDetails",
)
disc_in_mage.azure_storage_account_id = AAZStrType(
serialized_name="azureStorageAccountId",
)
disc_in_mage.compressed_data_rate_in_mb = AAZFloatType(
serialized_name="compressedDataRateInMB",
)
disc_in_mage.consistency_points = AAZDictType(
serialized_name="consistencyPoints",
)
disc_in_mage.datastores = AAZListType()
disc_in_mage.discovery_type = AAZStrType(
serialized_name="discoveryType",
)
disc_in_mage.disk_resized = AAZStrType(
serialized_name="diskResized",
)
disc_in_mage.infrastructure_vm_id = AAZStrType(
serialized_name="infrastructureVmId",
)
disc_in_mage.ip_address = AAZStrType(
serialized_name="ipAddress",
)
disc_in_mage.is_additional_stats_available = AAZBoolType(
serialized_name="isAdditionalStatsAvailable",
)
disc_in_mage.last_heartbeat = AAZStrType(
serialized_name="lastHeartbeat",
)
disc_in_mage.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_in_mage.last_update_received_time = AAZStrType(
serialized_name="lastUpdateReceivedTime",
)
disc_in_mage.master_target_id = AAZStrType(
serialized_name="masterTargetId",
)
disc_in_mage.multi_vm_group_id = AAZStrType(
serialized_name="multiVmGroupId",
)
disc_in_mage.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
)
disc_in_mage.multi_vm_sync_status = AAZStrType(
serialized_name="multiVmSyncStatus",
)
disc_in_mage.os_details = AAZObjectType(
serialized_name="osDetails",
)
disc_in_mage.os_version = AAZStrType(
serialized_name="osVersion",
)
disc_in_mage.process_server_id = AAZStrType(
serialized_name="processServerId",
)
disc_in_mage.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
disc_in_mage.reboot_after_update_status = AAZStrType(
serialized_name="rebootAfterUpdateStatus",
)
disc_in_mage.replica_id = AAZStrType(
serialized_name="replicaId",
)
disc_in_mage.resync_details = AAZObjectType(
serialized_name="resyncDetails",
)
cls._build_schema_initial_replication_details_read(disc_in_mage.resync_details)
disc_in_mage.retention_window_end = AAZStrType(
serialized_name="retentionWindowEnd",
)
disc_in_mage.retention_window_start = AAZStrType(
serialized_name="retentionWindowStart",
)
disc_in_mage.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_in_mage.source_vm_cpu_count = AAZIntType(
serialized_name="sourceVmCpuCount",
)
disc_in_mage.source_vm_ram_size_in_mb = AAZIntType(
serialized_name="sourceVmRamSizeInMB",
)
disc_in_mage.total_data_transferred = AAZIntType(
serialized_name="totalDataTransferred",
)
disc_in_mage.total_progress_health = AAZStrType(
serialized_name="totalProgressHealth",
)
disc_in_mage.uncompressed_data_rate_in_mb = AAZFloatType(
serialized_name="uncompressedDataRateInMB",
)
disc_in_mage.v_center_infrastructure_id = AAZStrType(
serialized_name="vCenterInfrastructureId",
)
disc_in_mage.validation_errors = AAZListType(
serialized_name="validationErrors",
)
disc_in_mage.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_in_mage.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_in_mage.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_in_mage.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
agent_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").agent_details
agent_details.agent_expiry_date = AAZStrType(
serialized_name="agentExpiryDate",
)
agent_details.agent_update_status = AAZStrType(
serialized_name="agentUpdateStatus",
)
agent_details.agent_version = AAZStrType(
serialized_name="agentVersion",
)
agent_details.post_update_reboot_status = AAZStrType(
serialized_name="postUpdateRebootStatus",
)
consistency_points = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").consistency_points
consistency_points.Element = AAZStrType()
datastores = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").datastores
datastores.Element = AAZStrType()
os_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").os_details
os_details.os_type = AAZStrType(
serialized_name="osType",
)
os_details.os_vhd_id = AAZStrType(
serialized_name="osVhdId",
)
os_details.vhd_name = AAZStrType(
serialized_name="vhdName",
)
protected_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").protected_disks
protected_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").protected_disks.Element
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_resized = AAZStrType(
serialized_name="diskResized",
)
_element.file_system_capacity_in_bytes = AAZIntType(
serialized_name="fileSystemCapacityInBytes",
)
_element.health_error_code = AAZStrType(
serialized_name="healthErrorCode",
)
_element.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
_element.progress_health = AAZStrType(
serialized_name="progressHealth",
)
_element.progress_status = AAZStrType(
serialized_name="progressStatus",
)
_element.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
_element.ps_data_in_mb = AAZFloatType(
serialized_name="psDataInMB",
)
_element.resync_duration_in_seconds = AAZIntType(
serialized_name="resyncDurationInSeconds",
)
_element.resync_last15_minutes_transferred_bytes = AAZIntType(
serialized_name="resyncLast15MinutesTransferredBytes",
)
_element.resync_last_data_transfer_time_utc = AAZStrType(
serialized_name="resyncLastDataTransferTimeUTC",
)
_element.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
)
_element.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
)
_element.resync_required = AAZStrType(
serialized_name="resyncRequired",
)
_element.resync_start_time = AAZStrType(
serialized_name="resyncStartTime",
)
_element.resync_total_transferred_bytes = AAZIntType(
serialized_name="resyncTotalTransferredBytes",
)
_element.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
_element.source_data_in_mb = AAZFloatType(
serialized_name="sourceDataInMB",
)
_element.target_data_in_mb = AAZFloatType(
serialized_name="targetDataInMB",
)
validation_errors = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").validation_errors
validation_errors.Element = AAZObjectType()
cls._build_schema_health_error_read(validation_errors.Element)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMage").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
disc_in_mage_azure_v2 = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2")
disc_in_mage_azure_v2.agent_expiry_date = AAZStrType(
serialized_name="agentExpiryDate",
)
disc_in_mage_azure_v2.agent_version = AAZStrType(
serialized_name="agentVersion",
)
disc_in_mage_azure_v2.azure_vm_disk_details = AAZListType(
serialized_name="azureVMDiskDetails",
)
disc_in_mage_azure_v2.azure_vm_generation = AAZStrType(
serialized_name="azureVmGeneration",
)
disc_in_mage_azure_v2.compressed_data_rate_in_mb = AAZFloatType(
serialized_name="compressedDataRateInMB",
)
disc_in_mage_azure_v2.datastores = AAZListType()
disc_in_mage_azure_v2.discovery_type = AAZStrType(
serialized_name="discoveryType",
)
disc_in_mage_azure_v2.disk_resized = AAZStrType(
serialized_name="diskResized",
)
disc_in_mage_azure_v2.enable_rdp_on_target_option = AAZStrType(
serialized_name="enableRdpOnTargetOption",
)
disc_in_mage_azure_v2.firmware_type = AAZStrType(
serialized_name="firmwareType",
)
disc_in_mage_azure_v2.infrastructure_vm_id = AAZStrType(
serialized_name="infrastructureVmId",
)
disc_in_mage_azure_v2.ip_address = AAZStrType(
serialized_name="ipAddress",
)
disc_in_mage_azure_v2.is_additional_stats_available = AAZBoolType(
serialized_name="isAdditionalStatsAvailable",
)
disc_in_mage_azure_v2.is_agent_update_required = AAZStrType(
serialized_name="isAgentUpdateRequired",
)
disc_in_mage_azure_v2.is_reboot_after_update_required = AAZStrType(
serialized_name="isRebootAfterUpdateRequired",
)
disc_in_mage_azure_v2.last_heartbeat = AAZStrType(
serialized_name="lastHeartbeat",
)
disc_in_mage_azure_v2.last_recovery_point_received = AAZStrType(
serialized_name="lastRecoveryPointReceived",
flags={"read_only": True},
)
disc_in_mage_azure_v2.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_in_mage_azure_v2.last_update_received_time = AAZStrType(
serialized_name="lastUpdateReceivedTime",
)
disc_in_mage_azure_v2.license_type = AAZStrType(
serialized_name="licenseType",
)
disc_in_mage_azure_v2.master_target_id = AAZStrType(
serialized_name="masterTargetId",
)
disc_in_mage_azure_v2.multi_vm_group_id = AAZStrType(
serialized_name="multiVmGroupId",
)
disc_in_mage_azure_v2.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
)
disc_in_mage_azure_v2.multi_vm_sync_status = AAZStrType(
serialized_name="multiVmSyncStatus",
)
disc_in_mage_azure_v2.os_disk_id = AAZStrType(
serialized_name="osDiskId",
)
disc_in_mage_azure_v2.os_type = AAZStrType(
serialized_name="osType",
)
disc_in_mage_azure_v2.os_version = AAZStrType(
serialized_name="osVersion",
)
disc_in_mage_azure_v2.process_server_id = AAZStrType(
serialized_name="processServerId",
)
disc_in_mage_azure_v2.process_server_name = AAZStrType(
serialized_name="processServerName",
)
disc_in_mage_azure_v2.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage_azure_v2.protected_managed_disks = AAZListType(
serialized_name="protectedManagedDisks",
)
disc_in_mage_azure_v2.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
disc_in_mage_azure_v2.recovery_availability_set_id = AAZStrType(
serialized_name="recoveryAvailabilitySetId",
)
disc_in_mage_azure_v2.recovery_azure_log_storage_account_id = AAZStrType(
serialized_name="recoveryAzureLogStorageAccountId",
)
disc_in_mage_azure_v2.recovery_azure_resource_group_id = AAZStrType(
serialized_name="recoveryAzureResourceGroupId",
)
disc_in_mage_azure_v2.recovery_azure_storage_account = AAZStrType(
serialized_name="recoveryAzureStorageAccount",
)
disc_in_mage_azure_v2.recovery_azure_vm_name = AAZStrType(
serialized_name="recoveryAzureVMName",
)
disc_in_mage_azure_v2.recovery_azure_vm_size = AAZStrType(
serialized_name="recoveryAzureVMSize",
)
disc_in_mage_azure_v2.replica_id = AAZStrType(
serialized_name="replicaId",
)
disc_in_mage_azure_v2.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
)
disc_in_mage_azure_v2.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_in_mage_azure_v2.seed_managed_disk_tags = AAZDictType(
serialized_name="seedManagedDiskTags",
)
disc_in_mage_azure_v2.selected_recovery_azure_network_id = AAZStrType(
serialized_name="selectedRecoveryAzureNetworkId",
)
disc_in_mage_azure_v2.selected_source_nic_id = AAZStrType(
serialized_name="selectedSourceNicId",
)
disc_in_mage_azure_v2.selected_tfo_azure_network_id = AAZStrType(
serialized_name="selectedTfoAzureNetworkId",
)
disc_in_mage_azure_v2.source_vm_cpu_count = AAZIntType(
serialized_name="sourceVmCpuCount",
)
disc_in_mage_azure_v2.source_vm_ram_size_in_mb = AAZIntType(
serialized_name="sourceVmRamSizeInMB",
)
disc_in_mage_azure_v2.sql_server_license_type = AAZStrType(
serialized_name="sqlServerLicenseType",
)
disc_in_mage_azure_v2.switch_provider_blocking_error_details = AAZListType(
serialized_name="switchProviderBlockingErrorDetails",
)
disc_in_mage_azure_v2.switch_provider_details = AAZObjectType(
serialized_name="switchProviderDetails",
)
disc_in_mage_azure_v2.target_availability_zone = AAZStrType(
serialized_name="targetAvailabilityZone",
)
disc_in_mage_azure_v2.target_managed_disk_tags = AAZDictType(
serialized_name="targetManagedDiskTags",
)
disc_in_mage_azure_v2.target_nic_tags = AAZDictType(
serialized_name="targetNicTags",
)
disc_in_mage_azure_v2.target_proximity_placement_group_id = AAZStrType(
serialized_name="targetProximityPlacementGroupId",
)
disc_in_mage_azure_v2.target_vm_id = AAZStrType(
serialized_name="targetVmId",
)
disc_in_mage_azure_v2.target_vm_tags = AAZDictType(
serialized_name="targetVmTags",
)
disc_in_mage_azure_v2.total_data_transferred = AAZIntType(
serialized_name="totalDataTransferred",
)
disc_in_mage_azure_v2.total_progress_health = AAZStrType(
serialized_name="totalProgressHealth",
)
disc_in_mage_azure_v2.uncompressed_data_rate_in_mb = AAZFloatType(
serialized_name="uncompressedDataRateInMB",
)
disc_in_mage_azure_v2.use_managed_disks = AAZStrType(
serialized_name="useManagedDisks",
)
disc_in_mage_azure_v2.v_center_infrastructure_id = AAZStrType(
serialized_name="vCenterInfrastructureId",
)
disc_in_mage_azure_v2.validation_errors = AAZListType(
serialized_name="validationErrors",
)
disc_in_mage_azure_v2.vhd_name = AAZStrType(
serialized_name="vhdName",
)
disc_in_mage_azure_v2.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_in_mage_azure_v2.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_in_mage_azure_v2.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_in_mage_azure_v2.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
azure_vm_disk_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").azure_vm_disk_details
azure_vm_disk_details.Element = AAZObjectType()
cls._build_schema_azure_vm_disk_details_read(azure_vm_disk_details.Element)
datastores = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").datastores
datastores.Element = AAZStrType()
protected_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_disks
protected_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_disks.Element
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_resized = AAZStrType(
serialized_name="diskResized",
)
_element.file_system_capacity_in_bytes = AAZIntType(
serialized_name="fileSystemCapacityInBytes",
)
_element.health_error_code = AAZStrType(
serialized_name="healthErrorCode",
)
_element.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
_element.progress_health = AAZStrType(
serialized_name="progressHealth",
)
_element.progress_status = AAZStrType(
serialized_name="progressStatus",
)
_element.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
_element.ps_data_in_mega_bytes = AAZFloatType(
serialized_name="psDataInMegaBytes",
)
_element.resync_duration_in_seconds = AAZIntType(
serialized_name="resyncDurationInSeconds",
)
_element.resync_last15_minutes_transferred_bytes = AAZIntType(
serialized_name="resyncLast15MinutesTransferredBytes",
)
_element.resync_last_data_transfer_time_utc = AAZStrType(
serialized_name="resyncLastDataTransferTimeUTC",
)
_element.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
)
_element.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
)
_element.resync_required = AAZStrType(
serialized_name="resyncRequired",
)
_element.resync_start_time = AAZStrType(
serialized_name="resyncStartTime",
)
_element.resync_total_transferred_bytes = AAZIntType(
serialized_name="resyncTotalTransferredBytes",
)
_element.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
_element.seconds_to_take_switch_provider = AAZIntType(
serialized_name="secondsToTakeSwitchProvider",
)
_element.source_data_in_mega_bytes = AAZFloatType(
serialized_name="sourceDataInMegaBytes",
)
_element.target_data_in_mega_bytes = AAZFloatType(
serialized_name="targetDataInMegaBytes",
)
protected_managed_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_managed_disks
protected_managed_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_managed_disks.Element
_element.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.replica_disk_type = AAZStrType(
serialized_name="replicaDiskType",
)
_element.seed_managed_disk_id = AAZStrType(
serialized_name="seedManagedDiskId",
)
_element.target_disk_name = AAZStrType(
serialized_name="targetDiskName",
)
seed_managed_disk_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").seed_managed_disk_tags
seed_managed_disk_tags.Element = AAZStrType()
switch_provider_blocking_error_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details
switch_provider_blocking_error_details.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details.Element
_element.error_code = AAZStrType(
serialized_name="errorCode",
flags={"read_only": True},
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_element.error_message_parameters = AAZDictType(
serialized_name="errorMessageParameters",
flags={"read_only": True},
)
_element.error_tags = AAZDictType(
serialized_name="errorTags",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
error_message_parameters = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details.Element.error_message_parameters
error_message_parameters.Element = AAZStrType()
error_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details.Element.error_tags
error_tags.Element = AAZStrType()
switch_provider_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_details
switch_provider_details.target_appliance_id = AAZStrType(
serialized_name="targetApplianceId",
flags={"read_only": True},
)
switch_provider_details.target_fabric_id = AAZStrType(
serialized_name="targetFabricId",
flags={"read_only": True},
)
switch_provider_details.target_resource_id = AAZStrType(
serialized_name="targetResourceId",
flags={"read_only": True},
)
switch_provider_details.target_vault_id = AAZStrType(
serialized_name="targetVaultId",
flags={"read_only": True},
)
target_managed_disk_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").target_managed_disk_tags
target_managed_disk_tags.Element = AAZStrType()
target_nic_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").target_nic_tags
target_nic_tags.Element = AAZStrType()
target_vm_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").target_vm_tags
target_vm_tags.Element = AAZStrType()
validation_errors = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").validation_errors
validation_errors.Element = AAZObjectType()
cls._build_schema_health_error_read(validation_errors.Element)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").vm_nics
vm_nics.Element = AAZObjectType()
cls._build_schema_vm_nic_details_read(vm_nics.Element)
disc_in_mage_rcm = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm")
disc_in_mage_rcm.agent_upgrade_attempt_to_version = AAZStrType(
serialized_name="agentUpgradeAttemptToVersion",
flags={"read_only": True},
)
disc_in_mage_rcm.agent_upgrade_blocking_error_details = AAZListType(
serialized_name="agentUpgradeBlockingErrorDetails",
)
disc_in_mage_rcm.agent_upgrade_job_id = AAZStrType(
serialized_name="agentUpgradeJobId",
flags={"read_only": True},
)
disc_in_mage_rcm.agent_upgrade_state = AAZStrType(
serialized_name="agentUpgradeState",
flags={"read_only": True},
)
disc_in_mage_rcm.allocated_memory_in_mb = AAZFloatType(
serialized_name="allocatedMemoryInMB",
flags={"read_only": True},
)
disc_in_mage_rcm.discovered_vm_details = AAZObjectType(
serialized_name="discoveredVmDetails",
)
disc_in_mage_rcm.discovery_type = AAZStrType(
serialized_name="discoveryType",
flags={"read_only": True},
)
disc_in_mage_rcm.fabric_discovery_machine_id = AAZStrType(
serialized_name="fabricDiscoveryMachineId",
flags={"read_only": True},
)
disc_in_mage_rcm.failover_recovery_point_id = AAZStrType(
serialized_name="failoverRecoveryPointId",
flags={"read_only": True},
)
disc_in_mage_rcm.firmware_type = AAZStrType(
serialized_name="firmwareType",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_processed_bytes = AAZIntType(
serialized_name="initialReplicationProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_progress_health = AAZStrType(
serialized_name="initialReplicationProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_progress_percentage = AAZIntType(
serialized_name="initialReplicationProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_transferred_bytes = AAZIntType(
serialized_name="initialReplicationTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.internal_identifier = AAZStrType(
serialized_name="internalIdentifier",
flags={"read_only": True},
)
disc_in_mage_rcm.is_agent_registration_successful_after_failover = AAZBoolType(
serialized_name="isAgentRegistrationSuccessfulAfterFailover",
flags={"read_only": True},
)
disc_in_mage_rcm.is_last_upgrade_successful = AAZStrType(
serialized_name="isLastUpgradeSuccessful",
flags={"read_only": True},
)
disc_in_mage_rcm.last_agent_upgrade_error_details = AAZListType(
serialized_name="lastAgentUpgradeErrorDetails",
)
disc_in_mage_rcm.last_agent_upgrade_type = AAZStrType(
serialized_name="lastAgentUpgradeType",
flags={"read_only": True},
)
disc_in_mage_rcm.last_recovery_point_id = AAZStrType(
serialized_name="lastRecoveryPointId",
flags={"read_only": True},
)
disc_in_mage_rcm.last_recovery_point_received = AAZStrType(
serialized_name="lastRecoveryPointReceived",
flags={"read_only": True},
)
disc_in_mage_rcm.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
flags={"read_only": True},
)
disc_in_mage_rcm.last_rpo_in_seconds = AAZIntType(
serialized_name="lastRpoInSeconds",
flags={"read_only": True},
)
disc_in_mage_rcm.license_type = AAZStrType(
serialized_name="licenseType",
)
disc_in_mage_rcm.mobility_agent_details = AAZObjectType(
serialized_name="mobilityAgentDetails",
)
disc_in_mage_rcm.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
flags={"read_only": True},
)
disc_in_mage_rcm.os_type = AAZStrType(
serialized_name="osType",
flags={"read_only": True},
)
disc_in_mage_rcm.primary_nic_ip_address = AAZStrType(
serialized_name="primaryNicIpAddress",
flags={"read_only": True},
)
disc_in_mage_rcm.process_server_id = AAZStrType(
serialized_name="processServerId",
flags={"read_only": True},
)
disc_in_mage_rcm.process_server_name = AAZStrType(
serialized_name="processServerName",
flags={"read_only": True},
)
disc_in_mage_rcm.processor_core_count = AAZIntType(
serialized_name="processorCoreCount",
flags={"read_only": True},
)
disc_in_mage_rcm.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage_rcm.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_progress_health = AAZStrType(
serialized_name="resyncProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_required = AAZStrType(
serialized_name="resyncRequired",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_state = AAZStrType(
serialized_name="resyncState",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_transferred_bytes = AAZIntType(
serialized_name="resyncTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.run_as_account_id = AAZStrType(
serialized_name="runAsAccountId",
flags={"read_only": True},
)
disc_in_mage_rcm.storage_account_id = AAZStrType(
serialized_name="storageAccountId",
flags={"read_only": True},
)
disc_in_mage_rcm.target_availability_set_id = AAZStrType(
serialized_name="targetAvailabilitySetId",
)
disc_in_mage_rcm.target_availability_zone = AAZStrType(
serialized_name="targetAvailabilityZone",
)
disc_in_mage_rcm.target_boot_diagnostics_storage_account_id = AAZStrType(
serialized_name="targetBootDiagnosticsStorageAccountId",
)
disc_in_mage_rcm.target_generation = AAZStrType(
serialized_name="targetGeneration",
flags={"read_only": True},
)
disc_in_mage_rcm.target_location = AAZStrType(
serialized_name="targetLocation",
)
disc_in_mage_rcm.target_network_id = AAZStrType(
serialized_name="targetNetworkId",
)
disc_in_mage_rcm.target_proximity_placement_group_id = AAZStrType(
serialized_name="targetProximityPlacementGroupId",
)
disc_in_mage_rcm.target_resource_group_id = AAZStrType(
serialized_name="targetResourceGroupId",
)
disc_in_mage_rcm.target_vm_name = AAZStrType(
serialized_name="targetVmName",
)
disc_in_mage_rcm.target_vm_size = AAZStrType(
serialized_name="targetVmSize",
)
disc_in_mage_rcm.test_network_id = AAZStrType(
serialized_name="testNetworkId",
)
disc_in_mage_rcm.vm_nics = AAZListType(
serialized_name="vmNics",
)
agent_upgrade_blocking_error_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details
agent_upgrade_blocking_error_details.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details.Element
_element.error_code = AAZStrType(
serialized_name="errorCode",
flags={"read_only": True},
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_element.error_message_parameters = AAZDictType(
serialized_name="errorMessageParameters",
flags={"read_only": True},
)
_element.error_tags = AAZDictType(
serialized_name="errorTags",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
error_message_parameters = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details.Element.error_message_parameters
error_message_parameters.Element = AAZStrType()
error_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details.Element.error_tags
error_tags.Element = AAZStrType()
discovered_vm_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").discovered_vm_details
discovered_vm_details.created_timestamp = AAZStrType(
serialized_name="createdTimestamp",
flags={"read_only": True},
)
discovered_vm_details.datastores = AAZListType(
flags={"read_only": True},
)
discovered_vm_details.ip_addresses = AAZListType(
serialized_name="ipAddresses",
flags={"read_only": True},
)
discovered_vm_details.is_deleted = AAZBoolType(
serialized_name="isDeleted",
flags={"read_only": True},
)
discovered_vm_details.last_discovery_time_in_utc = AAZStrType(
serialized_name="lastDiscoveryTimeInUtc",
flags={"read_only": True},
)
discovered_vm_details.os_name = AAZStrType(
serialized_name="osName",
flags={"read_only": True},
)
discovered_vm_details.power_status = AAZStrType(
serialized_name="powerStatus",
flags={"read_only": True},
)
discovered_vm_details.updated_timestamp = AAZStrType(
serialized_name="updatedTimestamp",
flags={"read_only": True},
)
discovered_vm_details.v_center_fqdn = AAZStrType(
serialized_name="vCenterFqdn",
flags={"read_only": True},
)
discovered_vm_details.v_center_id = AAZStrType(
serialized_name="vCenterId",
flags={"read_only": True},
)
discovered_vm_details.vm_fqdn = AAZStrType(
serialized_name="vmFqdn",
flags={"read_only": True},
)
discovered_vm_details.vmware_tools_status = AAZStrType(
serialized_name="vmwareToolsStatus",
flags={"read_only": True},
)
datastores = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").discovered_vm_details.datastores
datastores.Element = AAZStrType()
ip_addresses = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").discovered_vm_details.ip_addresses
ip_addresses.Element = AAZStrType()
last_agent_upgrade_error_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details
last_agent_upgrade_error_details.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details.Element
_element.error_code = AAZStrType(
serialized_name="errorCode",
flags={"read_only": True},
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_element.error_message_parameters = AAZDictType(
serialized_name="errorMessageParameters",
flags={"read_only": True},
)
_element.error_tags = AAZDictType(
serialized_name="errorTags",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
error_message_parameters = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details.Element.error_message_parameters
error_message_parameters.Element = AAZStrType()
error_tags = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details.Element.error_tags
error_tags.Element = AAZStrType()
mobility_agent_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").mobility_agent_details
mobility_agent_details.agent_version_expiry_date = AAZStrType(
serialized_name="agentVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.driver_version = AAZStrType(
serialized_name="driverVersion",
flags={"read_only": True},
)
mobility_agent_details.driver_version_expiry_date = AAZStrType(
serialized_name="driverVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.is_upgradeable = AAZStrType(
serialized_name="isUpgradeable",
flags={"read_only": True},
)
mobility_agent_details.last_heartbeat_utc = AAZStrType(
serialized_name="lastHeartbeatUtc",
flags={"read_only": True},
)
mobility_agent_details.latest_agent_release_date = AAZStrType(
serialized_name="latestAgentReleaseDate",
flags={"read_only": True},
)
mobility_agent_details.latest_upgradable_version_without_reboot = AAZStrType(
serialized_name="latestUpgradableVersionWithoutReboot",
flags={"read_only": True},
)
mobility_agent_details.latest_version = AAZStrType(
serialized_name="latestVersion",
flags={"read_only": True},
)
mobility_agent_details.reasons_blocking_upgrade = AAZListType(
serialized_name="reasonsBlockingUpgrade",
flags={"read_only": True},
)
mobility_agent_details.version = AAZStrType(
flags={"read_only": True},
)
reasons_blocking_upgrade = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").mobility_agent_details.reasons_blocking_upgrade
reasons_blocking_upgrade.Element = AAZStrType()
protected_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").protected_disks
protected_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").protected_disks.Element
_element.capacity_in_bytes = AAZIntType(
serialized_name="capacityInBytes",
flags={"read_only": True},
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
flags={"read_only": True},
)
_element.data_pending_in_log_data_store_in_mb = AAZFloatType(
serialized_name="dataPendingInLogDataStoreInMB",
flags={"read_only": True},
)
_element.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
flags={"read_only": True},
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
flags={"read_only": True},
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
flags={"read_only": True},
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.ir_details = AAZObjectType(
serialized_name="irDetails",
)
cls._build_schema_in_mage_rcm_sync_details_read(_element.ir_details)
_element.is_initial_replication_complete = AAZStrType(
serialized_name="isInitialReplicationComplete",
flags={"read_only": True},
)
_element.is_os_disk = AAZStrType(
serialized_name="isOSDisk",
flags={"read_only": True},
)
_element.log_storage_account_id = AAZStrType(
serialized_name="logStorageAccountId",
flags={"read_only": True},
)
_element.resync_details = AAZObjectType(
serialized_name="resyncDetails",
)
cls._build_schema_in_mage_rcm_sync_details_read(_element.resync_details)
_element.seed_blob_uri = AAZStrType(
serialized_name="seedBlobUri",
flags={"read_only": True},
)
_element.seed_managed_disk_id = AAZStrType(
serialized_name="seedManagedDiskId",
flags={"read_only": True},
)
_element.target_managed_disk_id = AAZStrType(
serialized_name="targetManagedDiskId",
flags={"read_only": True},
)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").vm_nics
vm_nics.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").vm_nics.Element
_element.is_primary_nic = AAZStrType(
serialized_name="isPrimaryNic",
)
_element.is_selected_for_failover = AAZStrType(
serialized_name="isSelectedForFailover",
)
_element.nic_id = AAZStrType(
serialized_name="nicId",
flags={"read_only": True},
)
_element.source_ip_address = AAZStrType(
serialized_name="sourceIPAddress",
flags={"read_only": True},
)
_element.source_ip_address_type = AAZStrType(
serialized_name="sourceIPAddressType",
flags={"read_only": True},
)
_element.source_network_id = AAZStrType(
serialized_name="sourceNetworkId",
flags={"read_only": True},
)
_element.source_subnet_name = AAZStrType(
serialized_name="sourceSubnetName",
flags={"read_only": True},
)
_element.target_ip_address = AAZStrType(
serialized_name="targetIPAddress",
)
_element.target_ip_address_type = AAZStrType(
serialized_name="targetIPAddressType",
)
_element.target_subnet_name = AAZStrType(
serialized_name="targetSubnetName",
)
_element.test_ip_address = AAZStrType(
serialized_name="testIPAddress",
)
_element.test_ip_address_type = AAZStrType(
serialized_name="testIPAddressType",
)
_element.test_subnet_name = AAZStrType(
serialized_name="testSubnetName",
)
disc_in_mage_rcm_failback = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback")
disc_in_mage_rcm_failback.azure_virtual_machine_id = AAZStrType(
serialized_name="azureVirtualMachineId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.discovered_vm_details = AAZObjectType(
serialized_name="discoveredVmDetails",
)
disc_in_mage_rcm_failback.initial_replication_processed_bytes = AAZIntType(
serialized_name="initialReplicationProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.initial_replication_progress_health = AAZStrType(
serialized_name="initialReplicationProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.initial_replication_progress_percentage = AAZIntType(
serialized_name="initialReplicationProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.initial_replication_transferred_bytes = AAZIntType(
serialized_name="initialReplicationTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.internal_identifier = AAZStrType(
serialized_name="internalIdentifier",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.is_agent_registration_successful_after_failover = AAZBoolType(
serialized_name="isAgentRegistrationSuccessfulAfterFailover",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_planned_failover_start_time = AAZStrType(
serialized_name="lastPlannedFailoverStartTime",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_planned_failover_status = AAZStrType(
serialized_name="lastPlannedFailoverStatus",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_used_policy_friendly_name = AAZStrType(
serialized_name="lastUsedPolicyFriendlyName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_used_policy_id = AAZStrType(
serialized_name="lastUsedPolicyId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.log_storage_account_id = AAZStrType(
serialized_name="logStorageAccountId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.mobility_agent_details = AAZObjectType(
serialized_name="mobilityAgentDetails",
)
disc_in_mage_rcm_failback.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.os_type = AAZStrType(
serialized_name="osType",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage_rcm_failback.reprotect_agent_id = AAZStrType(
serialized_name="reprotectAgentId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.reprotect_agent_name = AAZStrType(
serialized_name="reprotectAgentName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_progress_health = AAZStrType(
serialized_name="resyncProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_required = AAZStrType(
serialized_name="resyncRequired",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_state = AAZStrType(
serialized_name="resyncState",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_transferred_bytes = AAZIntType(
serialized_name="resyncTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.target_data_store_name = AAZStrType(
serialized_name="targetDataStoreName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.target_vm_name = AAZStrType(
serialized_name="targetVmName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.targetv_center_id = AAZStrType(
serialized_name="targetvCenterId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.vm_nics = AAZListType(
serialized_name="vmNics",
)
discovered_vm_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").discovered_vm_details
discovered_vm_details.created_timestamp = AAZStrType(
serialized_name="createdTimestamp",
flags={"read_only": True},
)
discovered_vm_details.datastores = AAZListType(
flags={"read_only": True},
)
discovered_vm_details.ip_addresses = AAZListType(
serialized_name="ipAddresses",
flags={"read_only": True},
)
discovered_vm_details.is_deleted = AAZBoolType(
serialized_name="isDeleted",
flags={"read_only": True},
)
discovered_vm_details.last_discovery_time_in_utc = AAZStrType(
serialized_name="lastDiscoveryTimeInUtc",
flags={"read_only": True},
)
discovered_vm_details.os_name = AAZStrType(
serialized_name="osName",
flags={"read_only": True},
)
discovered_vm_details.power_status = AAZStrType(
serialized_name="powerStatus",
flags={"read_only": True},
)
discovered_vm_details.updated_timestamp = AAZStrType(
serialized_name="updatedTimestamp",
flags={"read_only": True},
)
discovered_vm_details.v_center_fqdn = AAZStrType(
serialized_name="vCenterFqdn",
flags={"read_only": True},
)
discovered_vm_details.v_center_id = AAZStrType(
serialized_name="vCenterId",
flags={"read_only": True},
)
discovered_vm_details.vm_fqdn = AAZStrType(
serialized_name="vmFqdn",
flags={"read_only": True},
)
discovered_vm_details.vmware_tools_status = AAZStrType(
serialized_name="vmwareToolsStatus",
flags={"read_only": True},
)
datastores = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").discovered_vm_details.datastores
datastores.Element = AAZStrType()
ip_addresses = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").discovered_vm_details.ip_addresses
ip_addresses.Element = AAZStrType()
mobility_agent_details = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").mobility_agent_details
mobility_agent_details.agent_version_expiry_date = AAZStrType(
serialized_name="agentVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.driver_version = AAZStrType(
serialized_name="driverVersion",
flags={"read_only": True},
)
mobility_agent_details.driver_version_expiry_date = AAZStrType(
serialized_name="driverVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.is_upgradeable = AAZStrType(
serialized_name="isUpgradeable",
flags={"read_only": True},
)
mobility_agent_details.last_heartbeat_utc = AAZStrType(
serialized_name="lastHeartbeatUtc",
flags={"read_only": True},
)
mobility_agent_details.latest_upgradable_version_without_reboot = AAZStrType(
serialized_name="latestUpgradableVersionWithoutReboot",
flags={"read_only": True},
)
mobility_agent_details.latest_version = AAZStrType(
serialized_name="latestVersion",
flags={"read_only": True},
)
mobility_agent_details.reasons_blocking_upgrade = AAZListType(
serialized_name="reasonsBlockingUpgrade",
flags={"read_only": True},
)
mobility_agent_details.version = AAZStrType(
flags={"read_only": True},
)
reasons_blocking_upgrade = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").mobility_agent_details.reasons_blocking_upgrade
reasons_blocking_upgrade.Element = AAZStrType()
protected_disks = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").protected_disks
protected_disks.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").protected_disks.Element
_element.capacity_in_bytes = AAZIntType(
serialized_name="capacityInBytes",
flags={"read_only": True},
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
flags={"read_only": True},
)
_element.data_pending_in_log_data_store_in_mb = AAZFloatType(
serialized_name="dataPendingInLogDataStoreInMB",
flags={"read_only": True},
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
flags={"read_only": True},
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
flags={"read_only": True},
)
_element.disk_uuid = AAZStrType(
serialized_name="diskUuid",
flags={"read_only": True},
)
_element.ir_details = AAZObjectType(
serialized_name="irDetails",
)
cls._build_schema_in_mage_rcm_failback_sync_details_read(_element.ir_details)
_element.is_initial_replication_complete = AAZStrType(
serialized_name="isInitialReplicationComplete",
flags={"read_only": True},
)
_element.is_os_disk = AAZStrType(
serialized_name="isOSDisk",
flags={"read_only": True},
)
_element.last_sync_time = AAZStrType(
serialized_name="lastSyncTime",
flags={"read_only": True},
)
_element.resync_details = AAZObjectType(
serialized_name="resyncDetails",
)
cls._build_schema_in_mage_rcm_failback_sync_details_read(_element.resync_details)
vm_nics = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").vm_nics
vm_nics.Element = AAZObjectType()
_element = _schema_replication_protected_item_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").vm_nics.Element
_element.adapter_type = AAZStrType(
serialized_name="adapterType",
flags={"read_only": True},
)
_element.mac_address = AAZStrType(
serialized_name="macAddress",
flags={"read_only": True},
)
_element.network_name = AAZStrType(
serialized_name="networkName",
flags={"read_only": True},
)
_element.source_ip_address = AAZStrType(
serialized_name="sourceIpAddress",
flags={"read_only": True},
)
_schema.id = cls._schema_replication_protected_item_read.id
_schema.location = cls._schema_replication_protected_item_read.location
_schema.name = cls._schema_replication_protected_item_read.name
_schema.properties = cls._schema_replication_protected_item_read.properties
_schema.type = cls._schema_replication_protected_item_read.type
_schema_vm_nic_details_read = None
@classmethod
def _build_schema_vm_nic_details_read(cls, _schema):
if cls._schema_vm_nic_details_read is not None:
_schema.enable_accelerated_networking_on_recovery = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_recovery
_schema.enable_accelerated_networking_on_tfo = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_tfo
_schema.ip_configs = cls._schema_vm_nic_details_read.ip_configs
_schema.nic_id = cls._schema_vm_nic_details_read.nic_id
_schema.recovery_network_security_group_id = cls._schema_vm_nic_details_read.recovery_network_security_group_id
_schema.recovery_nic_name = cls._schema_vm_nic_details_read.recovery_nic_name
_schema.recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.recovery_nic_resource_group_name
_schema.recovery_vm_network_id = cls._schema_vm_nic_details_read.recovery_vm_network_id
_schema.replica_nic_id = cls._schema_vm_nic_details_read.replica_nic_id
_schema.reuse_existing_nic = cls._schema_vm_nic_details_read.reuse_existing_nic
_schema.selection_type = cls._schema_vm_nic_details_read.selection_type
_schema.source_nic_arm_id = cls._schema_vm_nic_details_read.source_nic_arm_id
_schema.target_nic_name = cls._schema_vm_nic_details_read.target_nic_name
_schema.tfo_network_security_group_id = cls._schema_vm_nic_details_read.tfo_network_security_group_id
_schema.tfo_recovery_nic_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_name
_schema.tfo_recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_resource_group_name
_schema.tfo_reuse_existing_nic = cls._schema_vm_nic_details_read.tfo_reuse_existing_nic
_schema.tfo_vm_network_id = cls._schema_vm_nic_details_read.tfo_vm_network_id
_schema.v_m_network_name = cls._schema_vm_nic_details_read.v_m_network_name
return
cls._schema_vm_nic_details_read = _schema_vm_nic_details_read = AAZObjectType()
vm_nic_details_read = _schema_vm_nic_details_read
vm_nic_details_read.enable_accelerated_networking_on_recovery = AAZBoolType(
serialized_name="enableAcceleratedNetworkingOnRecovery",
)
vm_nic_details_read.enable_accelerated_networking_on_tfo = AAZBoolType(
serialized_name="enableAcceleratedNetworkingOnTfo",
)
vm_nic_details_read.ip_configs = AAZListType(
serialized_name="ipConfigs",
)
vm_nic_details_read.nic_id = AAZStrType(
serialized_name="nicId",
)
vm_nic_details_read.recovery_network_security_group_id = AAZStrType(
serialized_name="recoveryNetworkSecurityGroupId",
)
vm_nic_details_read.recovery_nic_name = AAZStrType(
serialized_name="recoveryNicName",
)
vm_nic_details_read.recovery_nic_resource_group_name = AAZStrType(
serialized_name="recoveryNicResourceGroupName",
)
vm_nic_details_read.recovery_vm_network_id = AAZStrType(
serialized_name="recoveryVMNetworkId",
)
vm_nic_details_read.replica_nic_id = AAZStrType(
serialized_name="replicaNicId",
)
vm_nic_details_read.reuse_existing_nic = AAZBoolType(
serialized_name="reuseExistingNic",
)
vm_nic_details_read.selection_type = AAZStrType(
serialized_name="selectionType",
)
vm_nic_details_read.source_nic_arm_id = AAZStrType(
serialized_name="sourceNicArmId",
)
vm_nic_details_read.target_nic_name = AAZStrType(
serialized_name="targetNicName",
)
vm_nic_details_read.tfo_network_security_group_id = AAZStrType(
serialized_name="tfoNetworkSecurityGroupId",
)
vm_nic_details_read.tfo_recovery_nic_name = AAZStrType(
serialized_name="tfoRecoveryNicName",
)
vm_nic_details_read.tfo_recovery_nic_resource_group_name = AAZStrType(
serialized_name="tfoRecoveryNicResourceGroupName",
)
vm_nic_details_read.tfo_reuse_existing_nic = AAZBoolType(
serialized_name="tfoReuseExistingNic",
)
vm_nic_details_read.tfo_vm_network_id = AAZStrType(
serialized_name="tfoVMNetworkId",
)
vm_nic_details_read.v_m_network_name = AAZStrType(
serialized_name="vMNetworkName",
)
ip_configs = _schema_vm_nic_details_read.ip_configs
ip_configs.Element = AAZObjectType()
_element = _schema_vm_nic_details_read.ip_configs.Element
_element.ip_address_type = AAZStrType(
serialized_name="ipAddressType",
)
_element.is_primary = AAZBoolType(
serialized_name="isPrimary",
)
_element.is_seleted_for_failover = AAZBoolType(
serialized_name="isSeletedForFailover",
)
_element.name = AAZStrType()
_element.recovery_ip_address_type = AAZStrType(
serialized_name="recoveryIPAddressType",
)
_element.recovery_lb_backend_address_pool_ids = AAZListType(
serialized_name="recoveryLBBackendAddressPoolIds",
)
_element.recovery_public_ip_address_id = AAZStrType(
serialized_name="recoveryPublicIPAddressId",
)
_element.recovery_static_ip_address = AAZStrType(
serialized_name="recoveryStaticIPAddress",
)
_element.recovery_subnet_name = AAZStrType(
serialized_name="recoverySubnetName",
)
_element.static_ip_address = AAZStrType(
serialized_name="staticIPAddress",
)
_element.subnet_name = AAZStrType(
serialized_name="subnetName",
)
_element.tfo_lb_backend_address_pool_ids = AAZListType(
serialized_name="tfoLBBackendAddressPoolIds",
)
_element.tfo_public_ip_address_id = AAZStrType(
serialized_name="tfoPublicIPAddressId",
)
_element.tfo_static_ip_address = AAZStrType(
serialized_name="tfoStaticIPAddress",
)
_element.tfo_subnet_name = AAZStrType(
serialized_name="tfoSubnetName",
)
recovery_lb_backend_address_pool_ids = _schema_vm_nic_details_read.ip_configs.Element.recovery_lb_backend_address_pool_ids
recovery_lb_backend_address_pool_ids.Element = AAZStrType()
tfo_lb_backend_address_pool_ids = _schema_vm_nic_details_read.ip_configs.Element.tfo_lb_backend_address_pool_ids
tfo_lb_backend_address_pool_ids.Element = AAZStrType()
_schema.enable_accelerated_networking_on_recovery = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_recovery
_schema.enable_accelerated_networking_on_tfo = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_tfo
_schema.ip_configs = cls._schema_vm_nic_details_read.ip_configs
_schema.nic_id = cls._schema_vm_nic_details_read.nic_id
_schema.recovery_network_security_group_id = cls._schema_vm_nic_details_read.recovery_network_security_group_id
_schema.recovery_nic_name = cls._schema_vm_nic_details_read.recovery_nic_name
_schema.recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.recovery_nic_resource_group_name
_schema.recovery_vm_network_id = cls._schema_vm_nic_details_read.recovery_vm_network_id
_schema.replica_nic_id = cls._schema_vm_nic_details_read.replica_nic_id
_schema.reuse_existing_nic = cls._schema_vm_nic_details_read.reuse_existing_nic
_schema.selection_type = cls._schema_vm_nic_details_read.selection_type
_schema.source_nic_arm_id = cls._schema_vm_nic_details_read.source_nic_arm_id
_schema.target_nic_name = cls._schema_vm_nic_details_read.target_nic_name
_schema.tfo_network_security_group_id = cls._schema_vm_nic_details_read.tfo_network_security_group_id
_schema.tfo_recovery_nic_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_name
_schema.tfo_recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_resource_group_name
_schema.tfo_reuse_existing_nic = cls._schema_vm_nic_details_read.tfo_reuse_existing_nic
_schema.tfo_vm_network_id = cls._schema_vm_nic_details_read.tfo_vm_network_id
_schema.v_m_network_name = cls._schema_vm_nic_details_read.v_m_network_name
|
class _UpdateHelper:
'''Helper class for Update'''
@classmethod
def _build_schema_disk_encryption_info_update(cls, _builder):
pass
@classmethod
def _build_schema_azure_vm_disk_details_read(cls, _schema):
pass
@classmethod
def _build_schema_disk_details_read(cls, _schema):
pass
@classmethod
def _build_schema_extended_location_read(cls, _schema):
pass
@classmethod
def _build_schema_health_error_read(cls, _schema):
pass
@classmethod
def _build_schema_in_mage_rcm_failback_sync_details_read(cls, _schema):
pass
@classmethod
def _build_schema_in_mage_rcm_sync_details_read(cls, _schema):
pass
@classmethod
def _build_schema_initial_replication_details_read(cls, _schema):
pass
@classmethod
def _build_schema_replication_protected_item_read(cls, _schema):
pass
@classmethod
def _build_schema_vm_nic_details_read(cls, _schema):
pass
| 21 | 1 | 270 | 13 | 257 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 10 | 2,736 | 148 | 2,587 | 102 | 2,566 | 1 | 1,074 | 83 | 1,063 | 4 | 0 | 1 | 22 |
9,146 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protected_item/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.protected_item._update.Update
|
class Update(AAZCommand):
"""Update operation to create an ASR replication protected item (Enable replication).
:example: protected-item update
az site-recovery protected-item update -g rg --fabric-name fabric1_name -n protected_item_name --protection-container container1_name --vault-name vault_name --policy-id policy_id --provider-details '{a2a:{fabric-object-id:vm_id,vm-managed-disks:[{disk-id:os_disk,primary-staging-azure-storage-account-id:storage1_id,recovery-resource-group-id:rg_id}],recovery-azure-network-id:vnet2_id,recovery-container-id:container2_id,recovery-resource-group-id:rg_id,recovery-subnet-name:vnet2_subnet}}'
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotecteditems/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
AZ_SUPPORT_GENERIC_UPDATE = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric unique name.",
required=True,
id_part="child_name_1",
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.replicated_protected_item_name = AAZStrArg(
options=["-n", "--name", "--replicated-protected-item-name"],
help="Replication protected item name.",
required=True,
id_part="child_name_3",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.policy_id = AAZStrArg(
options=["--policy-id"],
arg_group="Properties",
help="The Policy Id.",
nullable=True,
)
_args_schema.protectable_item_id = AAZStrArg(
options=["--protectable-item-id"],
arg_group="Properties",
help="The protectable item Id.",
nullable=True,
)
_args_schema.provider_specific_details = AAZObjectArg(
options=["--provider-details", "--provider-specific-details"],
arg_group="Properties",
help="The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null.",
nullable=True,
)
provider_specific_details = cls._args_schema.provider_specific_details
provider_specific_details.a2a = AAZObjectArg(
options=["a2a"],
help="A2A",
)
provider_specific_details.a2a_cross_cluster_migration = AAZObjectArg(
options=["a2a-cross-cluster-migration"],
help="a2a-cross-cluster-migration",
)
provider_specific_details.hyper_v_replica_azure = AAZObjectArg(
options=["hyper-v-replica-azure"],
)
provider_specific_details.in_mage_rcm = AAZObjectArg(
options=["in-mage-rcm"],
)
a2a = cls._args_schema.provider_specific_details.a2a
a2a.disk_encryption_info = AAZObjectArg(
options=["disk-encryption-info"],
help="The recovery disk encryption information (for two pass flows).",
nullable=True,
)
cls._build_args_disk_encryption_info_update(a2a.disk_encryption_info)
a2a.fabric_object_id = AAZStrArg(
options=["fabric-object-id"],
help="The fabric specific object Id of the virtual machine.",
)
a2a.multi_vm_group_id = AAZStrArg(
options=["multi-vm-group-id"],
help="The multi vm group id.",
nullable=True,
)
a2a.multi_vm_group_name = AAZStrArg(
options=["multi-vm-group-name"],
help="The multi vm group name.",
nullable=True,
)
a2a.recovery_availability_set_id = AAZStrArg(
options=["recovery-availability-set-id"],
help="The recovery availability set Id.",
nullable=True,
)
a2a.recovery_availability_zone = AAZStrArg(
options=["recovery-availability-zone"],
help="The recovery availability zone.",
nullable=True,
)
a2a.recovery_azure_network_id = AAZStrArg(
options=["recovery-azure-network-id"],
help="The recovery Azure virtual network ARM id.",
nullable=True,
)
a2a.recovery_boot_diag_storage_account_id = AAZStrArg(
options=["recovery-boot-diag-storage-account-id"],
help="The boot diagnostic storage account.",
nullable=True,
)
a2a.recovery_capacity_reservation_group_id = AAZStrArg(
options=["recovery-capacity-reservation-group-id"],
help="The recovery capacity reservation group Id.",
nullable=True,
)
a2a.recovery_cloud_service_id = AAZStrArg(
options=["recovery-cloud-service-id"],
help="The recovery cloud service Id. Valid for V1 scenarios.",
nullable=True,
)
a2a.recovery_container_id = AAZStrArg(
options=["recovery-container-id"],
help="The recovery container Id.",
nullable=True,
)
a2a.recovery_extended_location = AAZObjectArg(
options=["recovery-extended-location"],
help="The recovery extended location.",
nullable=True,
)
a2a.recovery_proximity_placement_group_id = AAZStrArg(
options=["recovery-proximity-placement-group-id"],
help="The recovery proximity placement group Id.",
nullable=True,
)
a2a.recovery_resource_group_id = AAZStrArg(
options=["recovery-resource-group-id"],
help="The recovery resource group Id. Valid for V2 scenarios.",
nullable=True,
)
a2a.recovery_subnet_name = AAZStrArg(
options=["recovery-subnet-name"],
help="The recovery subnet name.",
nullable=True,
)
a2a.recovery_virtual_machine_scale_set_id = AAZStrArg(
options=["recovery-virtual-machine-scale-set-id"],
help="The virtual machine scale set Id.",
nullable=True,
)
a2a.vm_disks = AAZListArg(
options=["vm-disks"],
help="The list of vm disk details.",
nullable=True,
)
a2a.vm_managed_disks = AAZListArg(
options=["vm-managed-disks"],
help="The list of vm managed disk details.",
nullable=True,
)
recovery_extended_location = cls._args_schema.provider_specific_details.a2a.recovery_extended_location
recovery_extended_location.name = AAZStrArg(
options=["name"],
help="The name of the extended location.",
)
recovery_extended_location.type = AAZStrArg(
options=["type"],
help="The extended location type.",
enum={"EdgeZone": "EdgeZone"},
)
vm_disks = cls._args_schema.provider_specific_details.a2a.vm_disks
vm_disks.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.provider_specific_details.a2a.vm_disks.Element
_element.disk_uri = AAZStrArg(
options=["disk-uri"],
help="The disk Uri.",
)
_element.primary_staging_azure_storage_account_id = AAZStrArg(
options=["primary-staging-azure-storage-account-id"],
help="The primary staging storage account Id.",
)
_element.recovery_azure_storage_account_id = AAZStrArg(
options=["recovery-azure-storage-account-id"],
help="The recovery VHD storage account Id.",
)
vm_managed_disks = cls._args_schema.provider_specific_details.a2a.vm_managed_disks
vm_managed_disks.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.provider_specific_details.a2a.vm_managed_disks.Element
_element.disk_encryption_info = AAZObjectArg(
options=["disk-encryption-info"],
help="The recovery disk encryption information (for one / single pass flows).",
nullable=True,
)
cls._build_args_disk_encryption_info_update(_element.disk_encryption_info)
_element.disk_id = AAZStrArg(
options=["disk-id"],
help="The disk Id.",
)
_element.primary_staging_azure_storage_account_id = AAZStrArg(
options=["primary-staging-azure-storage-account-id"],
help="The primary staging storage account Arm Id.",
)
_element.recovery_disk_encryption_set_id = AAZStrArg(
options=["recovery-disk-encryption-set-id"],
help="The recovery disk encryption set Id.",
nullable=True,
)
_element.recovery_replica_disk_account_type = AAZStrArg(
options=["recovery-replica-disk-account-type"],
help="The replica disk type. Its an optional value and will be same as source disk type if not user provided.",
nullable=True,
)
_element.recovery_resource_group_id = AAZStrArg(
options=["recovery-resource-group-id"],
help="The target resource group Arm Id.",
)
_element.recovery_target_disk_account_type = AAZStrArg(
options=["recovery-target-disk-account-type"],
help="The target disk type after failover. Its an optional value and will be same as source disk type if not user provided.",
nullable=True,
)
a2a_cross_cluster_migration = cls._args_schema.provider_specific_details.a2a_cross_cluster_migration
a2a_cross_cluster_migration.fabric_object_id = AAZStrArg(
options=["fabric-object-id"],
help="The fabric specific object Id of the virtual machine.",
nullable=True,
)
a2a_cross_cluster_migration.recovery_container_id = AAZStrArg(
options=["recovery-container-id"],
help="The recovery container Id.",
nullable=True,
)
hyper_v_replica_azure = cls._args_schema.provider_specific_details.hyper_v_replica_azure
hyper_v_replica_azure.disk_encryption_set_id = AAZStrArg(
options=["disk-encryption-set-id"],
help="The DiskEncryptionSet ARM Id.",
nullable=True,
)
hyper_v_replica_azure.disk_type = AAZStrArg(
options=["disk-type"],
help="The DiskType.",
nullable=True,
enum={"Premium_LRS": "Premium_LRS", "StandardSSD_LRS": "StandardSSD_LRS", "Standard_LRS": "Standard_LRS"},
)
hyper_v_replica_azure.disks_to_include = AAZListArg(
options=["disks-to-include"],
help="The list of VHD Ids of disks to be protected.",
nullable=True,
)
hyper_v_replica_azure.disks_to_include_for_managed_disks = AAZListArg(
options=["disks-to-include-for-managed-disks"],
help="The disks to include list for managed disks.",
nullable=True,
)
hyper_v_replica_azure.enable_rdp_on_target_option = AAZStrArg(
options=["enable-rdp-on-target-option"],
help="The selected option to enable RDP\SSH on target vm after failover. String value of SrsDataContract.EnableRDPOnTargetOption enum.",
nullable=True,
)
hyper_v_replica_azure.hv_host_vm_id = AAZStrArg(
options=["hv-host-vm-id"],
help="The Hyper-V host VM Id.",
nullable=True,
)
hyper_v_replica_azure.license_type = AAZStrArg(
options=["license-type"],
help="License type.",
nullable=True,
enum={"NoLicenseType": "NoLicenseType", "NotSpecified": "NotSpecified", "WindowsServer": "WindowsServer"},
)
hyper_v_replica_azure.log_storage_account_id = AAZStrArg(
options=["log-storage-account-id"],
help="The storage account to be used for logging during replication.",
nullable=True,
)
hyper_v_replica_azure.os_type = AAZStrArg(
options=["os-type"],
help="The OS type associated with VM.",
nullable=True,
)
hyper_v_replica_azure.seed_managed_disk_tags = AAZDictArg(
options=["seed-managed-disk-tags"],
help="The tags for the seed managed disks.",
nullable=True,
)
hyper_v_replica_azure.sql_server_license_type = AAZStrArg(
options=["sql-server-license-type"],
help="The SQL Server license type.",
nullable=True,
enum={"AHUB": "AHUB", "NoLicenseType": "NoLicenseType", "NotSpecified": "NotSpecified", "PAYG": "PAYG"},
)
hyper_v_replica_azure.target_availability_set_id = AAZStrArg(
options=["target-availability-set-id"],
help="The target availability set ARM Id for resource manager deployment.",
nullable=True,
)
hyper_v_replica_azure.target_availability_zone = AAZStrArg(
options=["target-availability-zone"],
help="The target availability zone.",
nullable=True,
)
hyper_v_replica_azure.target_azure_network_id = AAZStrArg(
options=["target-azure-network-id"],
help="The selected target Azure network Id.",
nullable=True,
)
hyper_v_replica_azure.target_azure_subnet_id = AAZStrArg(
options=["target-azure-subnet-id"],
help="The selected target Azure subnet Id.",
nullable=True,
)
hyper_v_replica_azure.target_azure_v1_resource_group_id = AAZStrArg(
options=["target-azure-v1-resource-group-id"],
help="The Id of the target resource group (for classic deployment) in which the failover VM is to be created.",
nullable=True,
)
hyper_v_replica_azure.target_azure_v2_resource_group_id = AAZStrArg(
options=["target-azure-v2-resource-group-id"],
help="The Id of the target resource group (for resource manager deployment) in which the failover VM is to be created.",
nullable=True,
)
hyper_v_replica_azure.target_azure_vm_name = AAZStrArg(
options=["target-azure-vm-name"],
help="The target azure VM Name.",
nullable=True,
)
hyper_v_replica_azure.target_managed_disk_tags = AAZDictArg(
options=["target-managed-disk-tags"],
help="The tags for the target managed disks.",
nullable=True,
)
hyper_v_replica_azure.target_nic_tags = AAZDictArg(
options=["target-nic-tags"],
help="The tags for the target NICs.",
nullable=True,
)
hyper_v_replica_azure.target_proximity_placement_group_id = AAZStrArg(
options=["target-proximity-placement-group-id"],
help="The proximity placement group ARM Id.",
nullable=True,
)
hyper_v_replica_azure.target_storage_account_id = AAZStrArg(
options=["target-storage-account-id"],
help="The storage account Id.",
nullable=True,
)
hyper_v_replica_azure.target_vm_size = AAZStrArg(
options=["target-vm-size"],
help="The target VM size.",
nullable=True,
)
hyper_v_replica_azure.target_vm_tags = AAZDictArg(
options=["target-vm-tags"],
help="The target VM tags.",
nullable=True,
)
hyper_v_replica_azure.use_managed_disks = AAZStrArg(
options=["use-managed-disks"],
help="A value indicating whether managed disks should be used during failover.",
nullable=True,
)
hyper_v_replica_azure.use_managed_disks_for_replication = AAZStrArg(
options=["use-managed-disks-for-replication"],
help="A value indicating whether managed disks should be used during replication.",
nullable=True,
)
hyper_v_replica_azure.vhd_id = AAZStrArg(
options=["vhd-id"],
help="The OS disk VHD id associated with VM.",
nullable=True,
)
hyper_v_replica_azure.vm_name = AAZStrArg(
options=["vm-name"],
help="The VM Name.",
nullable=True,
)
disks_to_include = cls._args_schema.provider_specific_details.hyper_v_replica_azure.disks_to_include
disks_to_include.Element = AAZStrArg(
nullable=True,
)
disks_to_include_for_managed_disks = cls._args_schema.provider_specific_details.hyper_v_replica_azure.disks_to_include_for_managed_disks
disks_to_include_for_managed_disks.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.provider_specific_details.hyper_v_replica_azure.disks_to_include_for_managed_disks.Element
_element.disk_encryption_set_id = AAZStrArg(
options=["disk-encryption-set-id"],
help="The DiskEncryptionSet ARM ID.",
nullable=True,
)
_element.disk_id = AAZStrArg(
options=["disk-id"],
help="The DiskId.",
nullable=True,
)
_element.disk_type = AAZStrArg(
options=["disk-type"],
help="The DiskType.",
nullable=True,
enum={"Premium_LRS": "Premium_LRS", "StandardSSD_LRS": "StandardSSD_LRS", "Standard_LRS": "Standard_LRS"},
)
_element.log_storage_account_id = AAZStrArg(
options=["log-storage-account-id"],
help="The LogStorageAccountId.",
nullable=True,
)
seed_managed_disk_tags = cls._args_schema.provider_specific_details.hyper_v_replica_azure.seed_managed_disk_tags
seed_managed_disk_tags.Element = AAZStrArg(
nullable=True,
)
target_managed_disk_tags = cls._args_schema.provider_specific_details.hyper_v_replica_azure.target_managed_disk_tags
target_managed_disk_tags.Element = AAZStrArg(
nullable=True,
)
target_nic_tags = cls._args_schema.provider_specific_details.hyper_v_replica_azure.target_nic_tags
target_nic_tags.Element = AAZStrArg(
nullable=True,
)
target_vm_tags = cls._args_schema.provider_specific_details.hyper_v_replica_azure.target_vm_tags
target_vm_tags.Element = AAZStrArg(
nullable=True,
)
in_mage_rcm = cls._args_schema.provider_specific_details.in_mage_rcm
in_mage_rcm.disks_default = AAZObjectArg(
options=["disks-default"],
help="The default disk input.",
nullable=True,
)
in_mage_rcm.disks_to_include = AAZListArg(
options=["disks-to-include"],
help="The disks to include list.",
nullable=True,
fmt=AAZListArgFormat(
min_length=1,
),
)
in_mage_rcm.fabric_discovery_machine_id = AAZStrArg(
options=["fabric-discovery-machine-id"],
help="The ARM Id of discovered machine.",
)
in_mage_rcm.license_type = AAZStrArg(
options=["license-type"],
help="The license type.",
nullable=True,
enum={"NoLicenseType": "NoLicenseType", "NotSpecified": "NotSpecified", "WindowsServer": "WindowsServer"},
)
in_mage_rcm.multi_vm_group_name = AAZStrArg(
options=["multi-vm-group-name"],
help="The multi VM group name.",
nullable=True,
)
in_mage_rcm.process_server_id = AAZStrArg(
options=["process-server-id"],
help="The process server Id.",
)
in_mage_rcm.run_as_account_id = AAZStrArg(
options=["run-as-account-id"],
help="The run-as account Id.",
nullable=True,
)
in_mage_rcm.target_availability_set_id = AAZStrArg(
options=["target-availability-set-id"],
help="The target availability set ARM Id.",
nullable=True,
)
in_mage_rcm.target_availability_zone = AAZStrArg(
options=["target-availability-zone"],
help="The target availability zone.",
nullable=True,
)
in_mage_rcm.target_boot_diagnostics_storage_account_id = AAZStrArg(
options=["target-boot-diagnostics-storage-account-id"],
help="The target boot diagnostics storage account ARM Id.",
nullable=True,
)
in_mage_rcm.target_network_id = AAZStrArg(
options=["target-network-id"],
help="The selected target network ARM Id.",
nullable=True,
)
in_mage_rcm.target_proximity_placement_group_id = AAZStrArg(
options=["target-proximity-placement-group-id"],
help="The target proximity placement group Id.",
nullable=True,
)
in_mage_rcm.target_resource_group_id = AAZStrArg(
options=["target-resource-group-id"],
help="The target resource group ARM Id.",
)
in_mage_rcm.target_subnet_name = AAZStrArg(
options=["target-subnet-name"],
help="The selected target subnet name.",
nullable=True,
)
in_mage_rcm.target_vm_name = AAZStrArg(
options=["target-vm-name"],
help="The target VM name.",
nullable=True,
)
in_mage_rcm.target_vm_size = AAZStrArg(
options=["target-vm-size"],
help="The target VM size.",
nullable=True,
)
in_mage_rcm.test_network_id = AAZStrArg(
options=["test-network-id"],
help="The selected test network ARM Id.",
nullable=True,
)
in_mage_rcm.test_subnet_name = AAZStrArg(
options=["test-subnet-name"],
help="The selected test subnet name.",
nullable=True,
)
disks_default = cls._args_schema.provider_specific_details.in_mage_rcm.disks_default
disks_default.disk_encryption_set_id = AAZStrArg(
options=["disk-encryption-set-id"],
help="The DiskEncryptionSet ARM Id.",
nullable=True,
)
disks_default.disk_type = AAZStrArg(
options=["disk-type"],
help="The disk type.",
enum={"Premium_LRS": "Premium_LRS", "StandardSSD_LRS": "StandardSSD_LRS", "Standard_LRS": "Standard_LRS"},
)
disks_default.log_storage_account_id = AAZStrArg(
options=["log-storage-account-id"],
help="The log storage account ARM Id.",
)
disks_to_include = cls._args_schema.provider_specific_details.in_mage_rcm.disks_to_include
disks_to_include.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.provider_specific_details.in_mage_rcm.disks_to_include.Element
_element.disk_encryption_set_id = AAZStrArg(
options=["disk-encryption-set-id"],
help="The DiskEncryptionSet ARM Id.",
nullable=True,
)
_element.disk_id = AAZStrArg(
options=["disk-id"],
help="The disk Id.",
)
_element.disk_type = AAZStrArg(
options=["disk-type"],
help="The disk type.",
enum={"Premium_LRS": "Premium_LRS", "StandardSSD_LRS": "StandardSSD_LRS", "Standard_LRS": "Standard_LRS"},
)
_element.log_storage_account_id = AAZStrArg(
options=["log-storage-account-id"],
help="The log storage account ARM Id.",
)
return cls._args_schema
_args_disk_encryption_info_update = None
@classmethod
def _build_args_disk_encryption_info_update(cls, _schema):
if cls._args_disk_encryption_info_update is not None:
_schema.disk_encryption_key_info = cls._args_disk_encryption_info_update.disk_encryption_key_info
_schema.key_encryption_key_info = cls._args_disk_encryption_info_update.key_encryption_key_info
return
cls._args_disk_encryption_info_update = AAZObjectArg(
nullable=True,
)
disk_encryption_info_update = cls._args_disk_encryption_info_update
disk_encryption_info_update.disk_encryption_key_info = AAZObjectArg(
options=["disk-encryption-key-info"],
help="The recovery KeyVault reference for secret.",
nullable=True,
)
disk_encryption_info_update.key_encryption_key_info = AAZObjectArg(
options=["key-encryption-key-info"],
help="The recovery KeyVault reference for key.",
nullable=True,
)
disk_encryption_key_info = cls._args_disk_encryption_info_update.disk_encryption_key_info
disk_encryption_key_info.key_vault_resource_arm_id = AAZStrArg(
options=["key-vault-resource-arm-id"],
help="The KeyVault resource ARM id for secret.",
nullable=True,
)
disk_encryption_key_info.secret_identifier = AAZStrArg(
options=["secret-identifier"],
help="The secret url / identifier.",
nullable=True,
)
key_encryption_key_info = cls._args_disk_encryption_info_update.key_encryption_key_info
key_encryption_key_info.key_identifier = AAZStrArg(
options=["key-identifier"],
help="The key URL / identifier.",
nullable=True,
)
key_encryption_key_info.key_vault_resource_arm_id = AAZStrArg(
options=["key-vault-resource-arm-id"],
help="The KeyVault resource ARM Id for key.",
nullable=True,
)
_schema.disk_encryption_key_info = cls._args_disk_encryption_info_update.disk_encryption_key_info
_schema.key_encryption_key_info = cls._args_disk_encryption_info_update.key_encryption_key_info
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectedItemsGet(ctx=self.ctx)()
self.pre_instance_update(self.ctx.vars.instance)
self.InstanceUpdateByJson(ctx=self.ctx)()
self.InstanceUpdateByGeneric(ctx=self.ctx)()
self.post_instance_update(self.ctx.vars.instance)
yield self.ReplicationProtectedItemsCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectedItemsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"replicatedProtectedItemName", self.ctx.args.replicated_protected_item_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_replication_protected_item_read(cls._schema_on_200)
return cls._schema_on_200
class ReplicationProtectedItemsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"replicatedProtectedItemName", self.ctx.args.replicated_protected_item_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_replication_protected_item_read(cls._schema_on_200)
return cls._schema_on_200
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("policyId", AAZStrType, ".policy_id")
properties.set_prop("protectableItemId", AAZStrType, ".protectable_item_id")
properties.set_prop("providerSpecificDetails", AAZObjectType, ".provider_specific_details")
provider_specific_details = _builder.get(".properties.providerSpecificDetails")
if provider_specific_details is not None:
provider_specific_details.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "A2ACrossClusterMigration", AAZStrType, ".a2a_cross_cluster_migration", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "HyperVReplicaAzure", AAZStrType, ".hyper_v_replica_azure", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "InMageRcm", AAZStrType, ".in_mage_rcm", typ_kwargs={"flags": {"required": True}})
provider_specific_details.discriminate_by("instanceType", "A2A")
provider_specific_details.discriminate_by("instanceType", "A2ACrossClusterMigration")
provider_specific_details.discriminate_by("instanceType", "HyperVReplicaAzure")
provider_specific_details.discriminate_by("instanceType", "InMage")
provider_specific_details.discriminate_by("instanceType", "InMageAzureV2")
provider_specific_details.discriminate_by("instanceType", "InMageRcm")
disc_a2_a = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}")
if disc_a2_a is not None:
_UpdateHelper._build_schema_disk_encryption_info_update(disc_a2_a.set_prop("diskEncryptionInfo", AAZObjectType, ".a2a.disk_encryption_info"))
disc_a2_a.set_prop("fabricObjectId", AAZStrType, ".a2a.fabric_object_id", typ_kwargs={"flags": {"required": True}})
disc_a2_a.set_prop("multiVmGroupId", AAZStrType, ".a2a.multi_vm_group_id")
disc_a2_a.set_prop("multiVmGroupName", AAZStrType, ".a2a.multi_vm_group_name")
disc_a2_a.set_prop("recoveryAvailabilitySetId", AAZStrType, ".a2a.recovery_availability_set_id")
disc_a2_a.set_prop("recoveryAvailabilityZone", AAZStrType, ".a2a.recovery_availability_zone")
disc_a2_a.set_prop("recoveryAzureNetworkId", AAZStrType, ".a2a.recovery_azure_network_id")
disc_a2_a.set_prop("recoveryBootDiagStorageAccountId", AAZStrType, ".a2a.recovery_boot_diag_storage_account_id")
disc_a2_a.set_prop("recoveryCapacityReservationGroupId", AAZStrType, ".a2a.recovery_capacity_reservation_group_id")
disc_a2_a.set_prop("recoveryCloudServiceId", AAZStrType, ".a2a.recovery_cloud_service_id")
disc_a2_a.set_prop("recoveryContainerId", AAZStrType, ".a2a.recovery_container_id")
disc_a2_a.set_prop("recoveryExtendedLocation", AAZObjectType, ".a2a.recovery_extended_location")
disc_a2_a.set_prop("recoveryProximityPlacementGroupId", AAZStrType, ".a2a.recovery_proximity_placement_group_id")
disc_a2_a.set_prop("recoveryResourceGroupId", AAZStrType, ".a2a.recovery_resource_group_id")
disc_a2_a.set_prop("recoverySubnetName", AAZStrType, ".a2a.recovery_subnet_name")
disc_a2_a.set_prop("recoveryVirtualMachineScaleSetId", AAZStrType, ".a2a.recovery_virtual_machine_scale_set_id")
disc_a2_a.set_prop("vmDisks", AAZListType, ".a2a.vm_disks")
disc_a2_a.set_prop("vmManagedDisks", AAZListType, ".a2a.vm_managed_disks")
recovery_extended_location = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.recoveryExtendedLocation")
if recovery_extended_location is not None:
recovery_extended_location.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}})
recovery_extended_location.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}})
vm_disks = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmDisks")
if vm_disks is not None:
vm_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmDisks[]")
if _elements is not None:
_elements.set_prop("diskUri", AAZStrType, ".disk_uri", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("primaryStagingAzureStorageAccountId", AAZStrType, ".primary_staging_azure_storage_account_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("recoveryAzureStorageAccountId", AAZStrType, ".recovery_azure_storage_account_id", typ_kwargs={"flags": {"required": True}})
vm_managed_disks = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmManagedDisks")
if vm_managed_disks is not None:
vm_managed_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}.vmManagedDisks[]")
if _elements is not None:
_UpdateHelper._build_schema_disk_encryption_info_update(_elements.set_prop("diskEncryptionInfo", AAZObjectType, ".disk_encryption_info"))
_elements.set_prop("diskId", AAZStrType, ".disk_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("primaryStagingAzureStorageAccountId", AAZStrType, ".primary_staging_azure_storage_account_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("recoveryDiskEncryptionSetId", AAZStrType, ".recovery_disk_encryption_set_id")
_elements.set_prop("recoveryReplicaDiskAccountType", AAZStrType, ".recovery_replica_disk_account_type")
_elements.set_prop("recoveryResourceGroupId", AAZStrType, ".recovery_resource_group_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("recoveryTargetDiskAccountType", AAZStrType, ".recovery_target_disk_account_type")
disc_a2_a_cross_cluster_migration = _builder.get(".properties.providerSpecificDetails{instanceType:A2ACrossClusterMigration}")
if disc_a2_a_cross_cluster_migration is not None:
disc_a2_a_cross_cluster_migration.set_prop("fabricObjectId", AAZStrType, ".a2a_cross_cluster_migration.fabric_object_id")
disc_a2_a_cross_cluster_migration.set_prop("recoveryContainerId", AAZStrType, ".a2a_cross_cluster_migration.recovery_container_id")
disc_hyper_v_replica_azure = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}")
if disc_hyper_v_replica_azure is not None:
disc_hyper_v_replica_azure.set_prop("diskEncryptionSetId", AAZStrType, ".hyper_v_replica_azure.disk_encryption_set_id")
disc_hyper_v_replica_azure.set_prop("diskType", AAZStrType, ".hyper_v_replica_azure.disk_type")
disc_hyper_v_replica_azure.set_prop("disksToInclude", AAZListType, ".hyper_v_replica_azure.disks_to_include")
disc_hyper_v_replica_azure.set_prop("disksToIncludeForManagedDisks", AAZListType, ".hyper_v_replica_azure.disks_to_include_for_managed_disks")
disc_hyper_v_replica_azure.set_prop("enableRdpOnTargetOption", AAZStrType, ".hyper_v_replica_azure.enable_rdp_on_target_option")
disc_hyper_v_replica_azure.set_prop("hvHostVmId", AAZStrType, ".hyper_v_replica_azure.hv_host_vm_id")
disc_hyper_v_replica_azure.set_prop("licenseType", AAZStrType, ".hyper_v_replica_azure.license_type")
disc_hyper_v_replica_azure.set_prop("logStorageAccountId", AAZStrType, ".hyper_v_replica_azure.log_storage_account_id")
disc_hyper_v_replica_azure.set_prop("osType", AAZStrType, ".hyper_v_replica_azure.os_type")
disc_hyper_v_replica_azure.set_prop("seedManagedDiskTags", AAZDictType, ".hyper_v_replica_azure.seed_managed_disk_tags")
disc_hyper_v_replica_azure.set_prop("sqlServerLicenseType", AAZStrType, ".hyper_v_replica_azure.sql_server_license_type")
disc_hyper_v_replica_azure.set_prop("targetAvailabilitySetId", AAZStrType, ".hyper_v_replica_azure.target_availability_set_id")
disc_hyper_v_replica_azure.set_prop("targetAvailabilityZone", AAZStrType, ".hyper_v_replica_azure.target_availability_zone")
disc_hyper_v_replica_azure.set_prop("targetAzureNetworkId", AAZStrType, ".hyper_v_replica_azure.target_azure_network_id")
disc_hyper_v_replica_azure.set_prop("targetAzureSubnetId", AAZStrType, ".hyper_v_replica_azure.target_azure_subnet_id")
disc_hyper_v_replica_azure.set_prop("targetAzureV1ResourceGroupId", AAZStrType, ".hyper_v_replica_azure.target_azure_v1_resource_group_id")
disc_hyper_v_replica_azure.set_prop("targetAzureV2ResourceGroupId", AAZStrType, ".hyper_v_replica_azure.target_azure_v2_resource_group_id")
disc_hyper_v_replica_azure.set_prop("targetAzureVmName", AAZStrType, ".hyper_v_replica_azure.target_azure_vm_name")
disc_hyper_v_replica_azure.set_prop("targetManagedDiskTags", AAZDictType, ".hyper_v_replica_azure.target_managed_disk_tags")
disc_hyper_v_replica_azure.set_prop("targetNicTags", AAZDictType, ".hyper_v_replica_azure.target_nic_tags")
disc_hyper_v_replica_azure.set_prop("targetProximityPlacementGroupId", AAZStrType, ".hyper_v_replica_azure.target_proximity_placement_group_id")
disc_hyper_v_replica_azure.set_prop("targetStorageAccountId", AAZStrType, ".hyper_v_replica_azure.target_storage_account_id")
disc_hyper_v_replica_azure.set_prop("targetVmSize", AAZStrType, ".hyper_v_replica_azure.target_vm_size")
disc_hyper_v_replica_azure.set_prop("targetVmTags", AAZDictType, ".hyper_v_replica_azure.target_vm_tags")
disc_hyper_v_replica_azure.set_prop("useManagedDisks", AAZStrType, ".hyper_v_replica_azure.use_managed_disks")
disc_hyper_v_replica_azure.set_prop("useManagedDisksForReplication", AAZStrType, ".hyper_v_replica_azure.use_managed_disks_for_replication")
disc_hyper_v_replica_azure.set_prop("vhdId", AAZStrType, ".hyper_v_replica_azure.vhd_id")
disc_hyper_v_replica_azure.set_prop("vmName", AAZStrType, ".hyper_v_replica_azure.vm_name")
disks_to_include = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.disksToInclude")
if disks_to_include is not None:
disks_to_include.set_elements(AAZStrType, ".")
disks_to_include_for_managed_disks = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.disksToIncludeForManagedDisks")
if disks_to_include_for_managed_disks is not None:
disks_to_include_for_managed_disks.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.disksToIncludeForManagedDisks[]")
if _elements is not None:
_elements.set_prop("diskEncryptionSetId", AAZStrType, ".disk_encryption_set_id")
_elements.set_prop("diskId", AAZStrType, ".disk_id")
_elements.set_prop("diskType", AAZStrType, ".disk_type")
_elements.set_prop("logStorageAccountId", AAZStrType, ".log_storage_account_id")
seed_managed_disk_tags = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.seedManagedDiskTags")
if seed_managed_disk_tags is not None:
seed_managed_disk_tags.set_elements(AAZStrType, ".")
target_managed_disk_tags = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.targetManagedDiskTags")
if target_managed_disk_tags is not None:
target_managed_disk_tags.set_elements(AAZStrType, ".")
target_nic_tags = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.targetNicTags")
if target_nic_tags is not None:
target_nic_tags.set_elements(AAZStrType, ".")
target_vm_tags = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}.targetVmTags")
if target_vm_tags is not None:
target_vm_tags.set_elements(AAZStrType, ".")
disc_in_mage = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}")
if disc_in_mage is not None:
disc_in_mage.set_prop("datastoreName", AAZStrType, ".in_mage.datastore_name")
disc_in_mage.set_prop("diskExclusionInput", AAZObjectType, ".in_mage.disk_exclusion_input")
disc_in_mage.set_prop("disksToInclude", AAZListType, ".in_mage.disks_to_include")
disc_in_mage.set_prop("masterTargetId", AAZStrType, ".in_mage.master_target_id", typ_kwargs={"flags": {"required": True}})
disc_in_mage.set_prop("multiVmGroupId", AAZStrType, ".in_mage.multi_vm_group_id", typ_kwargs={"flags": {"required": True}})
disc_in_mage.set_prop("multiVmGroupName", AAZStrType, ".in_mage.multi_vm_group_name", typ_kwargs={"flags": {"required": True}})
disc_in_mage.set_prop("processServerId", AAZStrType, ".in_mage.process_server_id", typ_kwargs={"flags": {"required": True}})
disc_in_mage.set_prop("retentionDrive", AAZStrType, ".in_mage.retention_drive", typ_kwargs={"flags": {"required": True}})
disc_in_mage.set_prop("runAsAccountId", AAZStrType, ".in_mage.run_as_account_id")
disc_in_mage.set_prop("vmFriendlyName", AAZStrType, ".in_mage.vm_friendly_name")
disk_exclusion_input = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}.diskExclusionInput")
if disk_exclusion_input is not None:
disk_exclusion_input.set_prop("diskSignatureOptions", AAZListType, ".disk_signature_options")
disk_exclusion_input.set_prop("volumeOptions", AAZListType, ".volume_options")
disk_signature_options = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}.diskExclusionInput.diskSignatureOptions")
if disk_signature_options is not None:
disk_signature_options.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}.diskExclusionInput.diskSignatureOptions[]")
if _elements is not None:
_elements.set_prop("diskSignature", AAZStrType, ".disk_signature")
volume_options = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}.diskExclusionInput.volumeOptions")
if volume_options is not None:
volume_options.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}.diskExclusionInput.volumeOptions[]")
if _elements is not None:
_elements.set_prop("onlyExcludeIfSingleVolume", AAZStrType, ".only_exclude_if_single_volume")
_elements.set_prop("volumeLabel", AAZStrType, ".volume_label")
disks_to_include = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}.disksToInclude")
if disks_to_include is not None:
disks_to_include.set_elements(AAZStrType, ".")
disc_in_mage_azure_v2 = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}")
if disc_in_mage_azure_v2 is not None:
disc_in_mage_azure_v2.set_prop("diskEncryptionSetId", AAZStrType, ".in_mage_azure_v2.disk_encryption_set_id")
disc_in_mage_azure_v2.set_prop("diskType", AAZStrType, ".in_mage_azure_v2.disk_type")
disc_in_mage_azure_v2.set_prop("disksToInclude", AAZListType, ".in_mage_azure_v2.disks_to_include")
disc_in_mage_azure_v2.set_prop("enableRdpOnTargetOption", AAZStrType, ".in_mage_azure_v2.enable_rdp_on_target_option")
disc_in_mage_azure_v2.set_prop("licenseType", AAZStrType, ".in_mage_azure_v2.license_type")
disc_in_mage_azure_v2.set_prop("logStorageAccountId", AAZStrType, ".in_mage_azure_v2.log_storage_account_id")
disc_in_mage_azure_v2.set_prop("masterTargetId", AAZStrType, ".in_mage_azure_v2.master_target_id")
disc_in_mage_azure_v2.set_prop("multiVmGroupId", AAZStrType, ".in_mage_azure_v2.multi_vm_group_id")
disc_in_mage_azure_v2.set_prop("multiVmGroupName", AAZStrType, ".in_mage_azure_v2.multi_vm_group_name")
disc_in_mage_azure_v2.set_prop("processServerId", AAZStrType, ".in_mage_azure_v2.process_server_id")
disc_in_mage_azure_v2.set_prop("runAsAccountId", AAZStrType, ".in_mage_azure_v2.run_as_account_id")
disc_in_mage_azure_v2.set_prop("seedManagedDiskTags", AAZDictType, ".in_mage_azure_v2.seed_managed_disk_tags")
disc_in_mage_azure_v2.set_prop("sqlServerLicenseType", AAZStrType, ".in_mage_azure_v2.sql_server_license_type")
disc_in_mage_azure_v2.set_prop("storageAccountId", AAZStrType, ".in_mage_azure_v2.storage_account_id")
disc_in_mage_azure_v2.set_prop("targetAvailabilitySetId", AAZStrType, ".in_mage_azure_v2.target_availability_set_id")
disc_in_mage_azure_v2.set_prop("targetAvailabilityZone", AAZStrType, ".in_mage_azure_v2.target_availability_zone")
disc_in_mage_azure_v2.set_prop("targetAzureNetworkId", AAZStrType, ".in_mage_azure_v2.target_azure_network_id")
disc_in_mage_azure_v2.set_prop("targetAzureSubnetId", AAZStrType, ".in_mage_azure_v2.target_azure_subnet_id")
disc_in_mage_azure_v2.set_prop("targetAzureV1ResourceGroupId", AAZStrType, ".in_mage_azure_v2.target_azure_v1_resource_group_id")
disc_in_mage_azure_v2.set_prop("targetAzureV2ResourceGroupId", AAZStrType, ".in_mage_azure_v2.target_azure_v2_resource_group_id")
disc_in_mage_azure_v2.set_prop("targetAzureVmName", AAZStrType, ".in_mage_azure_v2.target_azure_vm_name")
disc_in_mage_azure_v2.set_prop("targetManagedDiskTags", AAZDictType, ".in_mage_azure_v2.target_managed_disk_tags")
disc_in_mage_azure_v2.set_prop("targetNicTags", AAZDictType, ".in_mage_azure_v2.target_nic_tags")
disc_in_mage_azure_v2.set_prop("targetProximityPlacementGroupId", AAZStrType, ".in_mage_azure_v2.target_proximity_placement_group_id")
disc_in_mage_azure_v2.set_prop("targetVmSize", AAZStrType, ".in_mage_azure_v2.target_vm_size")
disc_in_mage_azure_v2.set_prop("targetVmTags", AAZDictType, ".in_mage_azure_v2.target_vm_tags")
disks_to_include = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}.disksToInclude")
if disks_to_include is not None:
disks_to_include.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}.disksToInclude[]")
if _elements is not None:
_elements.set_prop("diskEncryptionSetId", AAZStrType, ".disk_encryption_set_id")
_elements.set_prop("diskId", AAZStrType, ".disk_id")
_elements.set_prop("diskType", AAZStrType, ".disk_type")
_elements.set_prop("logStorageAccountId", AAZStrType, ".log_storage_account_id")
seed_managed_disk_tags = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}.seedManagedDiskTags")
if seed_managed_disk_tags is not None:
seed_managed_disk_tags.set_elements(AAZStrType, ".")
target_managed_disk_tags = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}.targetManagedDiskTags")
if target_managed_disk_tags is not None:
target_managed_disk_tags.set_elements(AAZStrType, ".")
target_nic_tags = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}.targetNicTags")
if target_nic_tags is not None:
target_nic_tags.set_elements(AAZStrType, ".")
target_vm_tags = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}.targetVmTags")
if target_vm_tags is not None:
target_vm_tags.set_elements(AAZStrType, ".")
disc_in_mage_rcm = _builder.get(".properties.providerSpecificDetails{instanceType:InMageRcm}")
if disc_in_mage_rcm is not None:
disc_in_mage_rcm.set_prop("disksDefault", AAZObjectType, ".in_mage_rcm.disks_default")
disc_in_mage_rcm.set_prop("disksToInclude", AAZListType, ".in_mage_rcm.disks_to_include")
disc_in_mage_rcm.set_prop("fabricDiscoveryMachineId", AAZStrType, ".in_mage_rcm.fabric_discovery_machine_id", typ_kwargs={"flags": {"required": True}})
disc_in_mage_rcm.set_prop("licenseType", AAZStrType, ".in_mage_rcm.license_type")
disc_in_mage_rcm.set_prop("multiVmGroupName", AAZStrType, ".in_mage_rcm.multi_vm_group_name")
disc_in_mage_rcm.set_prop("processServerId", AAZStrType, ".in_mage_rcm.process_server_id", typ_kwargs={"flags": {"required": True}})
disc_in_mage_rcm.set_prop("runAsAccountId", AAZStrType, ".in_mage_rcm.run_as_account_id")
disc_in_mage_rcm.set_prop("targetAvailabilitySetId", AAZStrType, ".in_mage_rcm.target_availability_set_id")
disc_in_mage_rcm.set_prop("targetAvailabilityZone", AAZStrType, ".in_mage_rcm.target_availability_zone")
disc_in_mage_rcm.set_prop("targetBootDiagnosticsStorageAccountId", AAZStrType, ".in_mage_rcm.target_boot_diagnostics_storage_account_id")
disc_in_mage_rcm.set_prop("targetNetworkId", AAZStrType, ".in_mage_rcm.target_network_id")
disc_in_mage_rcm.set_prop("targetProximityPlacementGroupId", AAZStrType, ".in_mage_rcm.target_proximity_placement_group_id")
disc_in_mage_rcm.set_prop("targetResourceGroupId", AAZStrType, ".in_mage_rcm.target_resource_group_id", typ_kwargs={"flags": {"required": True}})
disc_in_mage_rcm.set_prop("targetSubnetName", AAZStrType, ".in_mage_rcm.target_subnet_name")
disc_in_mage_rcm.set_prop("targetVmName", AAZStrType, ".in_mage_rcm.target_vm_name")
disc_in_mage_rcm.set_prop("targetVmSize", AAZStrType, ".in_mage_rcm.target_vm_size")
disc_in_mage_rcm.set_prop("testNetworkId", AAZStrType, ".in_mage_rcm.test_network_id")
disc_in_mage_rcm.set_prop("testSubnetName", AAZStrType, ".in_mage_rcm.test_subnet_name")
disks_default = _builder.get(".properties.providerSpecificDetails{instanceType:InMageRcm}.disksDefault")
if disks_default is not None:
disks_default.set_prop("diskEncryptionSetId", AAZStrType, ".disk_encryption_set_id")
disks_default.set_prop("diskType", AAZStrType, ".disk_type", typ_kwargs={"flags": {"required": True}})
disks_default.set_prop("logStorageAccountId", AAZStrType, ".log_storage_account_id", typ_kwargs={"flags": {"required": True}})
disks_to_include = _builder.get(".properties.providerSpecificDetails{instanceType:InMageRcm}.disksToInclude")
if disks_to_include is not None:
disks_to_include.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificDetails{instanceType:InMageRcm}.disksToInclude[]")
if _elements is not None:
_elements.set_prop("diskEncryptionSetId", AAZStrType, ".disk_encryption_set_id")
_elements.set_prop("diskId", AAZStrType, ".disk_id", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("diskType", AAZStrType, ".disk_type", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("logStorageAccountId", AAZStrType, ".log_storage_account_id", typ_kwargs={"flags": {"required": True}})
return _instance_value
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance_by_generic(
self.ctx.vars.instance,
self.ctx.generic_update_args
)
|
class Update(AAZCommand):
'''Update operation to create an ASR replication protected item (Enable replication).
:example: protected-item update
az site-recovery protected-item update -g rg --fabric-name fabric1_name -n protected_item_name --protection-container container1_name --vault-name vault_name --policy-id policy_id --provider-details '{a2a:{fabric-object-id:vm_id,vm-managed-disks:[{disk-id:os_disk,primary-staging-azure-storage-account-id:storage1_id,recovery-resource-group-id:rg_id}],recovery-azure-network-id:vnet2_id,recovery-container-id:container2_id,recovery-resource-group-id:rg_id,recovery-subnet-name:vnet2_subnet}}'
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
@classmethod
def _build_args_disk_encryption_info_update(cls, _schema):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectedItemsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class ReplicationProtectedItemsCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
| 57 | 1 | 36 | 2 | 33 | 0 | 2 | 0.01 | 1 | 5 | 4 | 0 | 7 | 0 | 9 | 9 | 1,197 | 115 | 1,076 | 124 | 1,019 | 6 | 500 | 102 | 464 | 36 | 1 | 1 | 73 |
9,147 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protected_item/_unplanned_failover.py
|
azext_site_recovery.aaz.latest.site_recovery.protected_item._unplanned_failover._UnplannedFailoverHelper
|
class _UnplannedFailoverHelper:
"""Helper class for UnplannedFailover"""
_schema_azure_vm_disk_details_read = None
@classmethod
def _build_schema_azure_vm_disk_details_read(cls, _schema):
if cls._schema_azure_vm_disk_details_read is not None:
_schema.custom_target_disk_name = cls._schema_azure_vm_disk_details_read.custom_target_disk_name
_schema.disk_encryption_set_id = cls._schema_azure_vm_disk_details_read.disk_encryption_set_id
_schema.disk_id = cls._schema_azure_vm_disk_details_read.disk_id
_schema.lun_id = cls._schema_azure_vm_disk_details_read.lun_id
_schema.max_size_mb = cls._schema_azure_vm_disk_details_read.max_size_mb
_schema.target_disk_location = cls._schema_azure_vm_disk_details_read.target_disk_location
_schema.target_disk_name = cls._schema_azure_vm_disk_details_read.target_disk_name
_schema.vhd_id = cls._schema_azure_vm_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_azure_vm_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_azure_vm_disk_details_read.vhd_type
return
cls._schema_azure_vm_disk_details_read = _schema_azure_vm_disk_details_read = AAZObjectType()
azure_vm_disk_details_read = _schema_azure_vm_disk_details_read
azure_vm_disk_details_read.custom_target_disk_name = AAZStrType(
serialized_name="customTargetDiskName",
)
azure_vm_disk_details_read.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
azure_vm_disk_details_read.disk_id = AAZStrType(
serialized_name="diskId",
)
azure_vm_disk_details_read.lun_id = AAZStrType(
serialized_name="lunId",
)
azure_vm_disk_details_read.max_size_mb = AAZStrType(
serialized_name="maxSizeMB",
)
azure_vm_disk_details_read.target_disk_location = AAZStrType(
serialized_name="targetDiskLocation",
)
azure_vm_disk_details_read.target_disk_name = AAZStrType(
serialized_name="targetDiskName",
)
azure_vm_disk_details_read.vhd_id = AAZStrType(
serialized_name="vhdId",
)
azure_vm_disk_details_read.vhd_name = AAZStrType(
serialized_name="vhdName",
)
azure_vm_disk_details_read.vhd_type = AAZStrType(
serialized_name="vhdType",
)
_schema.custom_target_disk_name = cls._schema_azure_vm_disk_details_read.custom_target_disk_name
_schema.disk_encryption_set_id = cls._schema_azure_vm_disk_details_read.disk_encryption_set_id
_schema.disk_id = cls._schema_azure_vm_disk_details_read.disk_id
_schema.lun_id = cls._schema_azure_vm_disk_details_read.lun_id
_schema.max_size_mb = cls._schema_azure_vm_disk_details_read.max_size_mb
_schema.target_disk_location = cls._schema_azure_vm_disk_details_read.target_disk_location
_schema.target_disk_name = cls._schema_azure_vm_disk_details_read.target_disk_name
_schema.vhd_id = cls._schema_azure_vm_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_azure_vm_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_azure_vm_disk_details_read.vhd_type
_schema_disk_details_read = None
@classmethod
def _build_schema_disk_details_read(cls, _schema):
if cls._schema_disk_details_read is not None:
_schema.max_size_mb = cls._schema_disk_details_read.max_size_mb
_schema.vhd_id = cls._schema_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_disk_details_read.vhd_type
return
cls._schema_disk_details_read = _schema_disk_details_read = AAZObjectType()
disk_details_read = _schema_disk_details_read
disk_details_read.max_size_mb = AAZIntType(
serialized_name="maxSizeMB",
)
disk_details_read.vhd_id = AAZStrType(
serialized_name="vhdId",
)
disk_details_read.vhd_name = AAZStrType(
serialized_name="vhdName",
)
disk_details_read.vhd_type = AAZStrType(
serialized_name="vhdType",
)
_schema.max_size_mb = cls._schema_disk_details_read.max_size_mb
_schema.vhd_id = cls._schema_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_disk_details_read.vhd_type
_schema_extended_location_read = None
@classmethod
def _build_schema_extended_location_read(cls, _schema):
if cls._schema_extended_location_read is not None:
_schema.name = cls._schema_extended_location_read.name
_schema.type = cls._schema_extended_location_read.type
return
cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType()
extended_location_read = _schema_extended_location_read
extended_location_read.name = AAZStrType(
flags={"required": True},
)
extended_location_read.type = AAZStrType(
flags={"required": True},
)
_schema.name = cls._schema_extended_location_read.name
_schema.type = cls._schema_extended_location_read.type
_schema_health_error_read = None
@classmethod
def _build_schema_health_error_read(cls, _schema):
if cls._schema_health_error_read is not None:
_schema.creation_time_utc = cls._schema_health_error_read.creation_time_utc
_schema.customer_resolvability = cls._schema_health_error_read.customer_resolvability
_schema.entity_id = cls._schema_health_error_read.entity_id
_schema.error_category = cls._schema_health_error_read.error_category
_schema.error_code = cls._schema_health_error_read.error_code
_schema.error_id = cls._schema_health_error_read.error_id
_schema.error_level = cls._schema_health_error_read.error_level
_schema.error_message = cls._schema_health_error_read.error_message
_schema.error_source = cls._schema_health_error_read.error_source
_schema.error_type = cls._schema_health_error_read.error_type
_schema.inner_health_errors = cls._schema_health_error_read.inner_health_errors
_schema.possible_causes = cls._schema_health_error_read.possible_causes
_schema.recommended_action = cls._schema_health_error_read.recommended_action
_schema.recovery_provider_error_message = cls._schema_health_error_read.recovery_provider_error_message
_schema.summary_message = cls._schema_health_error_read.summary_message
return
cls._schema_health_error_read = _schema_health_error_read = AAZObjectType()
health_error_read = _schema_health_error_read
health_error_read.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
health_error_read.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
health_error_read.entity_id = AAZStrType(
serialized_name="entityId",
)
health_error_read.error_category = AAZStrType(
serialized_name="errorCategory",
)
health_error_read.error_code = AAZStrType(
serialized_name="errorCode",
)
health_error_read.error_id = AAZStrType(
serialized_name="errorId",
)
health_error_read.error_level = AAZStrType(
serialized_name="errorLevel",
)
health_error_read.error_message = AAZStrType(
serialized_name="errorMessage",
)
health_error_read.error_source = AAZStrType(
serialized_name="errorSource",
)
health_error_read.error_type = AAZStrType(
serialized_name="errorType",
)
health_error_read.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
health_error_read.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
health_error_read.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
health_error_read.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
health_error_read.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = _schema_health_error_read.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = _schema_health_error_read.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
_schema.creation_time_utc = cls._schema_health_error_read.creation_time_utc
_schema.customer_resolvability = cls._schema_health_error_read.customer_resolvability
_schema.entity_id = cls._schema_health_error_read.entity_id
_schema.error_category = cls._schema_health_error_read.error_category
_schema.error_code = cls._schema_health_error_read.error_code
_schema.error_id = cls._schema_health_error_read.error_id
_schema.error_level = cls._schema_health_error_read.error_level
_schema.error_message = cls._schema_health_error_read.error_message
_schema.error_source = cls._schema_health_error_read.error_source
_schema.error_type = cls._schema_health_error_read.error_type
_schema.inner_health_errors = cls._schema_health_error_read.inner_health_errors
_schema.possible_causes = cls._schema_health_error_read.possible_causes
_schema.recommended_action = cls._schema_health_error_read.recommended_action
_schema.recovery_provider_error_message = cls._schema_health_error_read.recovery_provider_error_message
_schema.summary_message = cls._schema_health_error_read.summary_message
_schema_in_mage_rcm_failback_sync_details_read = None
@classmethod
def _build_schema_in_mage_rcm_failback_sync_details_read(cls, _schema):
if cls._schema_in_mage_rcm_failback_sync_details_read is not None:
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_failback_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_failback_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_failback_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_failback_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.transferred_bytes
return
cls._schema_in_mage_rcm_failback_sync_details_read = _schema_in_mage_rcm_failback_sync_details_read = AAZObjectType()
in_mage_rcm_failback_sync_details_read = _schema_in_mage_rcm_failback_sync_details_read
in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes = AAZIntType(
serialized_name="last15MinutesTransferredBytes",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc = AAZStrType(
serialized_name="lastDataTransferTimeUtc",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.last_refresh_time = AAZStrType(
serialized_name="lastRefreshTime",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.processed_bytes = AAZIntType(
serialized_name="processedBytes",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.progress_health = AAZStrType(
serialized_name="progressHealth",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.progress_percentage = AAZIntType(
serialized_name="progressPercentage",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.start_time = AAZStrType(
serialized_name="startTime",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.transferred_bytes = AAZIntType(
serialized_name="transferredBytes",
flags={"read_only": True},
)
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_failback_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_failback_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_failback_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_failback_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.transferred_bytes
_schema_in_mage_rcm_sync_details_read = None
@classmethod
def _build_schema_in_mage_rcm_sync_details_read(cls, _schema):
if cls._schema_in_mage_rcm_sync_details_read is not None:
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.transferred_bytes
return
cls._schema_in_mage_rcm_sync_details_read = _schema_in_mage_rcm_sync_details_read = AAZObjectType()
in_mage_rcm_sync_details_read = _schema_in_mage_rcm_sync_details_read
in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes = AAZIntType(
serialized_name="last15MinutesTransferredBytes",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.last_data_transfer_time_utc = AAZStrType(
serialized_name="lastDataTransferTimeUtc",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.last_refresh_time = AAZStrType(
serialized_name="lastRefreshTime",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.processed_bytes = AAZIntType(
serialized_name="processedBytes",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.progress_health = AAZStrType(
serialized_name="progressHealth",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.progress_percentage = AAZIntType(
serialized_name="progressPercentage",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.start_time = AAZStrType(
serialized_name="startTime",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.transferred_bytes = AAZIntType(
serialized_name="transferredBytes",
flags={"read_only": True},
)
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.transferred_bytes
_schema_initial_replication_details_read = None
@classmethod
def _build_schema_initial_replication_details_read(cls, _schema):
if cls._schema_initial_replication_details_read is not None:
_schema.initial_replication_progress_percentage = cls._schema_initial_replication_details_read.initial_replication_progress_percentage
_schema.initial_replication_type = cls._schema_initial_replication_details_read.initial_replication_type
return
cls._schema_initial_replication_details_read = _schema_initial_replication_details_read = AAZObjectType()
initial_replication_details_read = _schema_initial_replication_details_read
initial_replication_details_read.initial_replication_progress_percentage = AAZStrType(
serialized_name="initialReplicationProgressPercentage",
)
initial_replication_details_read.initial_replication_type = AAZStrType(
serialized_name="initialReplicationType",
)
_schema.initial_replication_progress_percentage = cls._schema_initial_replication_details_read.initial_replication_progress_percentage
_schema.initial_replication_type = cls._schema_initial_replication_details_read.initial_replication_type
_schema_vm_nic_details_read = None
@classmethod
def _build_schema_vm_nic_details_read(cls, _schema):
if cls._schema_vm_nic_details_read is not None:
_schema.enable_accelerated_networking_on_recovery = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_recovery
_schema.enable_accelerated_networking_on_tfo = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_tfo
_schema.ip_configs = cls._schema_vm_nic_details_read.ip_configs
_schema.nic_id = cls._schema_vm_nic_details_read.nic_id
_schema.recovery_network_security_group_id = cls._schema_vm_nic_details_read.recovery_network_security_group_id
_schema.recovery_nic_name = cls._schema_vm_nic_details_read.recovery_nic_name
_schema.recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.recovery_nic_resource_group_name
_schema.recovery_vm_network_id = cls._schema_vm_nic_details_read.recovery_vm_network_id
_schema.replica_nic_id = cls._schema_vm_nic_details_read.replica_nic_id
_schema.reuse_existing_nic = cls._schema_vm_nic_details_read.reuse_existing_nic
_schema.selection_type = cls._schema_vm_nic_details_read.selection_type
_schema.source_nic_arm_id = cls._schema_vm_nic_details_read.source_nic_arm_id
_schema.target_nic_name = cls._schema_vm_nic_details_read.target_nic_name
_schema.tfo_network_security_group_id = cls._schema_vm_nic_details_read.tfo_network_security_group_id
_schema.tfo_recovery_nic_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_name
_schema.tfo_recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_resource_group_name
_schema.tfo_reuse_existing_nic = cls._schema_vm_nic_details_read.tfo_reuse_existing_nic
_schema.tfo_vm_network_id = cls._schema_vm_nic_details_read.tfo_vm_network_id
_schema.v_m_network_name = cls._schema_vm_nic_details_read.v_m_network_name
return
cls._schema_vm_nic_details_read = _schema_vm_nic_details_read = AAZObjectType()
vm_nic_details_read = _schema_vm_nic_details_read
vm_nic_details_read.enable_accelerated_networking_on_recovery = AAZBoolType(
serialized_name="enableAcceleratedNetworkingOnRecovery",
)
vm_nic_details_read.enable_accelerated_networking_on_tfo = AAZBoolType(
serialized_name="enableAcceleratedNetworkingOnTfo",
)
vm_nic_details_read.ip_configs = AAZListType(
serialized_name="ipConfigs",
)
vm_nic_details_read.nic_id = AAZStrType(
serialized_name="nicId",
)
vm_nic_details_read.recovery_network_security_group_id = AAZStrType(
serialized_name="recoveryNetworkSecurityGroupId",
)
vm_nic_details_read.recovery_nic_name = AAZStrType(
serialized_name="recoveryNicName",
)
vm_nic_details_read.recovery_nic_resource_group_name = AAZStrType(
serialized_name="recoveryNicResourceGroupName",
)
vm_nic_details_read.recovery_vm_network_id = AAZStrType(
serialized_name="recoveryVMNetworkId",
)
vm_nic_details_read.replica_nic_id = AAZStrType(
serialized_name="replicaNicId",
)
vm_nic_details_read.reuse_existing_nic = AAZBoolType(
serialized_name="reuseExistingNic",
)
vm_nic_details_read.selection_type = AAZStrType(
serialized_name="selectionType",
)
vm_nic_details_read.source_nic_arm_id = AAZStrType(
serialized_name="sourceNicArmId",
)
vm_nic_details_read.target_nic_name = AAZStrType(
serialized_name="targetNicName",
)
vm_nic_details_read.tfo_network_security_group_id = AAZStrType(
serialized_name="tfoNetworkSecurityGroupId",
)
vm_nic_details_read.tfo_recovery_nic_name = AAZStrType(
serialized_name="tfoRecoveryNicName",
)
vm_nic_details_read.tfo_recovery_nic_resource_group_name = AAZStrType(
serialized_name="tfoRecoveryNicResourceGroupName",
)
vm_nic_details_read.tfo_reuse_existing_nic = AAZBoolType(
serialized_name="tfoReuseExistingNic",
)
vm_nic_details_read.tfo_vm_network_id = AAZStrType(
serialized_name="tfoVMNetworkId",
)
vm_nic_details_read.v_m_network_name = AAZStrType(
serialized_name="vMNetworkName",
)
ip_configs = _schema_vm_nic_details_read.ip_configs
ip_configs.Element = AAZObjectType()
_element = _schema_vm_nic_details_read.ip_configs.Element
_element.ip_address_type = AAZStrType(
serialized_name="ipAddressType",
)
_element.is_primary = AAZBoolType(
serialized_name="isPrimary",
)
_element.is_seleted_for_failover = AAZBoolType(
serialized_name="isSeletedForFailover",
)
_element.name = AAZStrType()
_element.recovery_ip_address_type = AAZStrType(
serialized_name="recoveryIPAddressType",
)
_element.recovery_lb_backend_address_pool_ids = AAZListType(
serialized_name="recoveryLBBackendAddressPoolIds",
)
_element.recovery_public_ip_address_id = AAZStrType(
serialized_name="recoveryPublicIPAddressId",
)
_element.recovery_static_ip_address = AAZStrType(
serialized_name="recoveryStaticIPAddress",
)
_element.recovery_subnet_name = AAZStrType(
serialized_name="recoverySubnetName",
)
_element.static_ip_address = AAZStrType(
serialized_name="staticIPAddress",
)
_element.subnet_name = AAZStrType(
serialized_name="subnetName",
)
_element.tfo_lb_backend_address_pool_ids = AAZListType(
serialized_name="tfoLBBackendAddressPoolIds",
)
_element.tfo_public_ip_address_id = AAZStrType(
serialized_name="tfoPublicIPAddressId",
)
_element.tfo_static_ip_address = AAZStrType(
serialized_name="tfoStaticIPAddress",
)
_element.tfo_subnet_name = AAZStrType(
serialized_name="tfoSubnetName",
)
recovery_lb_backend_address_pool_ids = _schema_vm_nic_details_read.ip_configs.Element.recovery_lb_backend_address_pool_ids
recovery_lb_backend_address_pool_ids.Element = AAZStrType()
tfo_lb_backend_address_pool_ids = _schema_vm_nic_details_read.ip_configs.Element.tfo_lb_backend_address_pool_ids
tfo_lb_backend_address_pool_ids.Element = AAZStrType()
_schema.enable_accelerated_networking_on_recovery = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_recovery
_schema.enable_accelerated_networking_on_tfo = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_tfo
_schema.ip_configs = cls._schema_vm_nic_details_read.ip_configs
_schema.nic_id = cls._schema_vm_nic_details_read.nic_id
_schema.recovery_network_security_group_id = cls._schema_vm_nic_details_read.recovery_network_security_group_id
_schema.recovery_nic_name = cls._schema_vm_nic_details_read.recovery_nic_name
_schema.recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.recovery_nic_resource_group_name
_schema.recovery_vm_network_id = cls._schema_vm_nic_details_read.recovery_vm_network_id
_schema.replica_nic_id = cls._schema_vm_nic_details_read.replica_nic_id
_schema.reuse_existing_nic = cls._schema_vm_nic_details_read.reuse_existing_nic
_schema.selection_type = cls._schema_vm_nic_details_read.selection_type
_schema.source_nic_arm_id = cls._schema_vm_nic_details_read.source_nic_arm_id
_schema.target_nic_name = cls._schema_vm_nic_details_read.target_nic_name
_schema.tfo_network_security_group_id = cls._schema_vm_nic_details_read.tfo_network_security_group_id
_schema.tfo_recovery_nic_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_name
_schema.tfo_recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_resource_group_name
_schema.tfo_reuse_existing_nic = cls._schema_vm_nic_details_read.tfo_reuse_existing_nic
_schema.tfo_vm_network_id = cls._schema_vm_nic_details_read.tfo_vm_network_id
_schema.v_m_network_name = cls._schema_vm_nic_details_read.v_m_network_name
|
class _UnplannedFailoverHelper:
'''Helper class for UnplannedFailover'''
@classmethod
def _build_schema_azure_vm_disk_details_read(cls, _schema):
pass
@classmethod
def _build_schema_disk_details_read(cls, _schema):
pass
@classmethod
def _build_schema_extended_location_read(cls, _schema):
pass
@classmethod
def _build_schema_health_error_read(cls, _schema):
pass
@classmethod
def _build_schema_in_mage_rcm_failback_sync_details_read(cls, _schema):
pass
@classmethod
def _build_schema_in_mage_rcm_sync_details_read(cls, _schema):
pass
@classmethod
def _build_schema_initial_replication_details_read(cls, _schema):
pass
@classmethod
def _build_schema_vm_nic_details_read(cls, _schema):
pass
| 17 | 1 | 65 | 4 | 61 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 8 | 555 | 46 | 508 | 47 | 491 | 1 | 292 | 31 | 283 | 2 | 0 | 1 | 16 |
9,148 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protected_item/_unplanned_failover.py
|
azext_site_recovery.aaz.latest.site_recovery.protected_item._unplanned_failover.UnplannedFailover
|
class UnplannedFailover(AAZCommand):
"""Operation to initiate a failover of the replication protected item.
:example: protected-item unplanned-failover for A2A
az site-recovery protected-item unplanned-failover --fabric-name fabric1_name --protection-container container1_name -n protected_item_name -g rg --vault-name vault_name --failover-direction PrimaryToRecovery --provider-details '{a2a:{}}' --source-site-operations NotRequired
:example: protected-item failback for A2A
az site-recovery protected-item unplanned-failover --fabric-name fabric2_name --protection-container container2_name -n protected_item_name -g rg --vault-name vault_name --failover-direction PrimaryToRecovery --provider-details '{a2a:{}}' --source-site-operations NotRequired
:example: protected-item failover hyper-v-replica-azure
az site-recovery protected-item unplanned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction PrimaryToRecovery --provider-details '{hyper-v-replica-azure:""}' --source-site-operations NotRequired
:example: protected-item unplanned-failover for v2arcm
az site-recovery protected-item unplanned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction PrimaryToRecovery --provider-details '{in-mage-rcm:{perform-shutdown:true}}' --source-site-operations NotRequired
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotecteditems/{}/unplannedfailover", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Unique fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.replicated_protected_item_name = AAZStrArg(
options=["-n", "--name", "--replicated-protected-item-name"],
help="Replication protected item name.",
required=True,
id_part="child_name_3",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.failover_direction = AAZStrArg(
options=["--failover-direction"],
arg_group="Properties",
help="Failover direction.",
)
_args_schema.provider_specific_details = AAZObjectArg(
options=["--provider-details", "--provider-specific-details"],
arg_group="Properties",
help="Provider specific settings.",
)
_args_schema.source_site_operations = AAZStrArg(
options=["--source-site-operations"],
arg_group="Properties",
help="Source site operations status.",
)
provider_specific_details = cls._args_schema.provider_specific_details
provider_specific_details.a2a = AAZObjectArg(
options=["a2a"],
help="A2A",
)
provider_specific_details.hyper_v_replica_azure = AAZObjectArg(
options=["hyper-v-replica-azure"],
)
provider_specific_details.in_mage = AAZObjectArg(
options=["in-mage"],
)
provider_specific_details.in_mage_azure_v2 = AAZObjectArg(
options=["in-mage-azure-v2"],
)
provider_specific_details.in_mage_rcm = AAZObjectArg(
options=["in-mage-rcm"],
)
a2a = cls._args_schema.provider_specific_details.a2a
a2a.cloud_service_creation_option = AAZStrArg(
options=["cloud-service-creation-option"],
help="A value indicating whether to use recovery cloud service for failover or not.",
)
a2a.recovery_point_id = AAZStrArg(
options=["recovery-point-id"],
help="The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed.",
)
hyper_v_replica_azure = cls._args_schema.provider_specific_details.hyper_v_replica_azure
hyper_v_replica_azure.primary_kek_certificate_pfx = AAZStrArg(
options=["primary-kek-certificate-pfx"],
help="Primary kek certificate pfx.",
)
hyper_v_replica_azure.recovery_point_id = AAZStrArg(
options=["recovery-point-id"],
help="The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed.",
)
hyper_v_replica_azure.secondary_kek_certificate_pfx = AAZStrArg(
options=["secondary-kek-certificate-pfx"],
help="Secondary kek certificate pfx.",
)
in_mage = cls._args_schema.provider_specific_details.in_mage
in_mage.recovery_point_id = AAZStrArg(
options=["recovery-point-id"],
help="The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed.",
)
in_mage.recovery_point_type = AAZStrArg(
options=["recovery-point-type"],
help="The recovery point type. Values from LatestTime, LatestTag or Custom. In the case of custom, the recovery point provided by RecoveryPointId will be used. In the other two cases, recovery point id will be ignored.",
enum={"Custom": "Custom", "LatestTag": "LatestTag", "LatestTime": "LatestTime"},
)
in_mage_azure_v2 = cls._args_schema.provider_specific_details.in_mage_azure_v2
in_mage_azure_v2.recovery_point_id = AAZStrArg(
options=["recovery-point-id"],
help="The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed.",
)
in_mage_rcm = cls._args_schema.provider_specific_details.in_mage_rcm
in_mage_rcm.perform_shutdown = AAZStrArg(
options=["perform-shutdown"],
help="A value indicating whether VM is to be shutdown.",
required=True,
)
in_mage_rcm.recovery_point_id = AAZStrArg(
options=["recovery-point-id"],
help="The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed.",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectedItemsUnplannedFailover(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectedItemsUnplannedFailover(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectedItems/{replicatedProtectedItemName}/unplannedFailover",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"replicatedProtectedItemName", self.ctx.args.replicated_protected_item_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("failoverDirection", AAZStrType, ".failover_direction")
properties.set_prop("providerSpecificDetails", AAZObjectType, ".provider_specific_details")
properties.set_prop("sourceSiteOperations", AAZStrType, ".source_site_operations")
provider_specific_details = _builder.get(".properties.providerSpecificDetails")
if provider_specific_details is not None:
provider_specific_details.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "HyperVReplicaAzure", AAZStrType, ".hyper_v_replica_azure", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "InMage", AAZStrType, ".in_mage", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "InMageAzureV2", AAZStrType, ".in_mage_azure_v2", typ_kwargs={"flags": {"required": True}})
provider_specific_details.set_const("instanceType", "InMageRcm", AAZStrType, ".in_mage_rcm", typ_kwargs={"flags": {"required": True}})
provider_specific_details.discriminate_by("instanceType", "A2A")
provider_specific_details.discriminate_by("instanceType", "HyperVReplicaAzure")
provider_specific_details.discriminate_by("instanceType", "InMage")
provider_specific_details.discriminate_by("instanceType", "InMageAzureV2")
provider_specific_details.discriminate_by("instanceType", "InMageRcm")
disc_a2_a = _builder.get(".properties.providerSpecificDetails{instanceType:A2A}")
if disc_a2_a is not None:
disc_a2_a.set_prop("cloudServiceCreationOption", AAZStrType, ".a2a.cloud_service_creation_option")
disc_a2_a.set_prop("recoveryPointId", AAZStrType, ".a2a.recovery_point_id")
disc_hyper_v_replica_azure = _builder.get(".properties.providerSpecificDetails{instanceType:HyperVReplicaAzure}")
if disc_hyper_v_replica_azure is not None:
disc_hyper_v_replica_azure.set_prop("primaryKekCertificatePfx", AAZStrType, ".hyper_v_replica_azure.primary_kek_certificate_pfx")
disc_hyper_v_replica_azure.set_prop("recoveryPointId", AAZStrType, ".hyper_v_replica_azure.recovery_point_id")
disc_hyper_v_replica_azure.set_prop("secondaryKekCertificatePfx", AAZStrType, ".hyper_v_replica_azure.secondary_kek_certificate_pfx")
disc_in_mage = _builder.get(".properties.providerSpecificDetails{instanceType:InMage}")
if disc_in_mage is not None:
disc_in_mage.set_prop("recoveryPointId", AAZStrType, ".in_mage.recovery_point_id")
disc_in_mage.set_prop("recoveryPointType", AAZStrType, ".in_mage.recovery_point_type")
disc_in_mage_azure_v2 = _builder.get(".properties.providerSpecificDetails{instanceType:InMageAzureV2}")
if disc_in_mage_azure_v2 is not None:
disc_in_mage_azure_v2.set_prop("recoveryPointId", AAZStrType, ".in_mage_azure_v2.recovery_point_id")
disc_in_mage_rcm = _builder.get(".properties.providerSpecificDetails{instanceType:InMageRcm}")
if disc_in_mage_rcm is not None:
disc_in_mage_rcm.set_prop("performShutdown", AAZStrType, ".in_mage_rcm.perform_shutdown", typ_kwargs={"flags": {"required": True}})
disc_in_mage_rcm.set_prop("recoveryPointId", AAZStrType, ".in_mage_rcm.recovery_point_id")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.active_location = AAZStrType(
serialized_name="activeLocation",
)
properties.allowed_operations = AAZListType(
serialized_name="allowedOperations",
)
properties.current_scenario = AAZObjectType(
serialized_name="currentScenario",
)
properties.event_correlation_id = AAZStrType(
serialized_name="eventCorrelationId",
)
properties.failover_health = AAZStrType(
serialized_name="failoverHealth",
)
properties.failover_recovery_point_id = AAZStrType(
serialized_name="failoverRecoveryPointId",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.health_errors = AAZListType(
serialized_name="healthErrors",
)
properties.last_successful_failover_time = AAZStrType(
serialized_name="lastSuccessfulFailoverTime",
)
properties.last_successful_test_failover_time = AAZStrType(
serialized_name="lastSuccessfulTestFailoverTime",
)
properties.policy_friendly_name = AAZStrType(
serialized_name="policyFriendlyName",
)
properties.policy_id = AAZStrType(
serialized_name="policyId",
)
properties.primary_fabric_friendly_name = AAZStrType(
serialized_name="primaryFabricFriendlyName",
)
properties.primary_fabric_provider = AAZStrType(
serialized_name="primaryFabricProvider",
)
properties.primary_protection_container_friendly_name = AAZStrType(
serialized_name="primaryProtectionContainerFriendlyName",
)
properties.protectable_item_id = AAZStrType(
serialized_name="protectableItemId",
)
properties.protected_item_type = AAZStrType(
serialized_name="protectedItemType",
)
properties.protection_state = AAZStrType(
serialized_name="protectionState",
)
properties.protection_state_description = AAZStrType(
serialized_name="protectionStateDescription",
)
properties.provider_specific_details = AAZObjectType(
serialized_name="providerSpecificDetails",
)
properties.recovery_container_id = AAZStrType(
serialized_name="recoveryContainerId",
)
properties.recovery_fabric_friendly_name = AAZStrType(
serialized_name="recoveryFabricFriendlyName",
)
properties.recovery_fabric_id = AAZStrType(
serialized_name="recoveryFabricId",
)
properties.recovery_protection_container_friendly_name = AAZStrType(
serialized_name="recoveryProtectionContainerFriendlyName",
)
properties.recovery_services_provider_id = AAZStrType(
serialized_name="recoveryServicesProviderId",
)
properties.replication_health = AAZStrType(
serialized_name="replicationHealth",
)
properties.switch_provider_state = AAZStrType(
serialized_name="switchProviderState",
)
properties.switch_provider_state_description = AAZStrType(
serialized_name="switchProviderStateDescription",
)
properties.test_failover_state = AAZStrType(
serialized_name="testFailoverState",
)
properties.test_failover_state_description = AAZStrType(
serialized_name="testFailoverStateDescription",
)
allowed_operations = cls._schema_on_200.properties.allowed_operations
allowed_operations.Element = AAZStrType()
current_scenario = cls._schema_on_200.properties.current_scenario
current_scenario.job_id = AAZStrType(
serialized_name="jobId",
)
current_scenario.scenario_name = AAZStrType(
serialized_name="scenarioName",
)
current_scenario.start_time = AAZStrType(
serialized_name="startTime",
)
health_errors = cls._schema_on_200.properties.health_errors
health_errors.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_health_error_read(health_errors.Element)
provider_specific_details = cls._schema_on_200.properties.provider_specific_details
provider_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A")
disc_a2_a.agent_certificate_expiry_date = AAZStrType(
serialized_name="agentCertificateExpiryDate",
flags={"read_only": True},
)
disc_a2_a.agent_expiry_date = AAZStrType(
serialized_name="agentExpiryDate",
)
disc_a2_a.agent_version = AAZStrType(
serialized_name="agentVersion",
)
disc_a2_a.auto_protection_of_data_disk = AAZStrType(
serialized_name="autoProtectionOfDataDisk",
)
disc_a2_a.fabric_object_id = AAZStrType(
serialized_name="fabricObjectId",
)
disc_a2_a.initial_primary_extended_location = AAZObjectType(
serialized_name="initialPrimaryExtendedLocation",
)
_UnplannedFailoverHelper._build_schema_extended_location_read(disc_a2_a.initial_primary_extended_location)
disc_a2_a.initial_primary_fabric_location = AAZStrType(
serialized_name="initialPrimaryFabricLocation",
flags={"read_only": True},
)
disc_a2_a.initial_primary_zone = AAZStrType(
serialized_name="initialPrimaryZone",
flags={"read_only": True},
)
disc_a2_a.initial_recovery_extended_location = AAZObjectType(
serialized_name="initialRecoveryExtendedLocation",
)
_UnplannedFailoverHelper._build_schema_extended_location_read(disc_a2_a.initial_recovery_extended_location)
disc_a2_a.initial_recovery_fabric_location = AAZStrType(
serialized_name="initialRecoveryFabricLocation",
flags={"read_only": True},
)
disc_a2_a.initial_recovery_zone = AAZStrType(
serialized_name="initialRecoveryZone",
flags={"read_only": True},
)
disc_a2_a.is_replication_agent_certificate_update_required = AAZBoolType(
serialized_name="isReplicationAgentCertificateUpdateRequired",
)
disc_a2_a.is_replication_agent_update_required = AAZBoolType(
serialized_name="isReplicationAgentUpdateRequired",
)
disc_a2_a.last_heartbeat = AAZStrType(
serialized_name="lastHeartbeat",
)
disc_a2_a.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_a2_a.lifecycle_id = AAZStrType(
serialized_name="lifecycleId",
)
disc_a2_a.management_id = AAZStrType(
serialized_name="managementId",
)
disc_a2_a.monitoring_job_type = AAZStrType(
serialized_name="monitoringJobType",
)
disc_a2_a.monitoring_percentage_completion = AAZIntType(
serialized_name="monitoringPercentageCompletion",
)
disc_a2_a.multi_vm_group_create_option = AAZStrType(
serialized_name="multiVmGroupCreateOption",
)
disc_a2_a.multi_vm_group_id = AAZStrType(
serialized_name="multiVmGroupId",
)
disc_a2_a.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
)
disc_a2_a.os_type = AAZStrType(
serialized_name="osType",
)
disc_a2_a.primary_availability_zone = AAZStrType(
serialized_name="primaryAvailabilityZone",
)
disc_a2_a.primary_extended_location = AAZObjectType(
serialized_name="primaryExtendedLocation",
)
_UnplannedFailoverHelper._build_schema_extended_location_read(disc_a2_a.primary_extended_location)
disc_a2_a.primary_fabric_location = AAZStrType(
serialized_name="primaryFabricLocation",
)
disc_a2_a.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_a2_a.protected_managed_disks = AAZListType(
serialized_name="protectedManagedDisks",
)
disc_a2_a.recovery_availability_set = AAZStrType(
serialized_name="recoveryAvailabilitySet",
)
disc_a2_a.recovery_availability_zone = AAZStrType(
serialized_name="recoveryAvailabilityZone",
)
disc_a2_a.recovery_azure_generation = AAZStrType(
serialized_name="recoveryAzureGeneration",
flags={"read_only": True},
)
disc_a2_a.recovery_azure_resource_group_id = AAZStrType(
serialized_name="recoveryAzureResourceGroupId",
)
disc_a2_a.recovery_azure_vm_name = AAZStrType(
serialized_name="recoveryAzureVMName",
)
disc_a2_a.recovery_azure_vm_size = AAZStrType(
serialized_name="recoveryAzureVMSize",
)
disc_a2_a.recovery_boot_diag_storage_account_id = AAZStrType(
serialized_name="recoveryBootDiagStorageAccountId",
)
disc_a2_a.recovery_capacity_reservation_group_id = AAZStrType(
serialized_name="recoveryCapacityReservationGroupId",
)
disc_a2_a.recovery_cloud_service = AAZStrType(
serialized_name="recoveryCloudService",
)
disc_a2_a.recovery_extended_location = AAZObjectType(
serialized_name="recoveryExtendedLocation",
)
_UnplannedFailoverHelper._build_schema_extended_location_read(disc_a2_a.recovery_extended_location)
disc_a2_a.recovery_fabric_location = AAZStrType(
serialized_name="recoveryFabricLocation",
)
disc_a2_a.recovery_fabric_object_id = AAZStrType(
serialized_name="recoveryFabricObjectId",
)
disc_a2_a.recovery_proximity_placement_group_id = AAZStrType(
serialized_name="recoveryProximityPlacementGroupId",
)
disc_a2_a.recovery_virtual_machine_scale_set_id = AAZStrType(
serialized_name="recoveryVirtualMachineScaleSetId",
)
disc_a2_a.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_a2_a.selected_recovery_azure_network_id = AAZStrType(
serialized_name="selectedRecoveryAzureNetworkId",
)
disc_a2_a.selected_tfo_azure_network_id = AAZStrType(
serialized_name="selectedTfoAzureNetworkId",
)
disc_a2_a.test_failover_recovery_fabric_object_id = AAZStrType(
serialized_name="testFailoverRecoveryFabricObjectId",
)
disc_a2_a.tfo_azure_vm_name = AAZStrType(
serialized_name="tfoAzureVMName",
)
disc_a2_a.unprotected_disks = AAZListType(
serialized_name="unprotectedDisks",
)
disc_a2_a.vm_encryption_type = AAZStrType(
serialized_name="vmEncryptionType",
flags={"read_only": True},
)
disc_a2_a.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_a2_a.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_a2_a.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
disc_a2_a.vm_synced_config_details = AAZObjectType(
serialized_name="vmSyncedConfigDetails",
)
protected_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_disks
protected_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_disks.Element
_element.allowed_disk_level_operation = AAZListType(
serialized_name="allowedDiskLevelOperation",
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
)
_element.data_pending_in_staging_storage_account_in_mb = AAZFloatType(
serialized_name="dataPendingInStagingStorageAccountInMB",
)
_element.dek_key_vault_arm_id = AAZStrType(
serialized_name="dekKeyVaultArmId",
)
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_state = AAZStrType(
serialized_name="diskState",
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.disk_uri = AAZStrType(
serialized_name="diskUri",
)
_element.failover_disk_name = AAZStrType(
serialized_name="failoverDiskName",
)
_element.is_disk_encrypted = AAZBoolType(
serialized_name="isDiskEncrypted",
)
_element.is_disk_key_encrypted = AAZBoolType(
serialized_name="isDiskKeyEncrypted",
)
_element.kek_key_vault_arm_id = AAZStrType(
serialized_name="kekKeyVaultArmId",
)
_element.key_identifier = AAZStrType(
serialized_name="keyIdentifier",
)
_element.monitoring_job_type = AAZStrType(
serialized_name="monitoringJobType",
)
_element.monitoring_percentage_completion = AAZIntType(
serialized_name="monitoringPercentageCompletion",
)
_element.primary_disk_azure_storage_account_id = AAZStrType(
serialized_name="primaryDiskAzureStorageAccountId",
)
_element.primary_staging_azure_storage_account_id = AAZStrType(
serialized_name="primaryStagingAzureStorageAccountId",
)
_element.recovery_azure_storage_account_id = AAZStrType(
serialized_name="recoveryAzureStorageAccountId",
)
_element.recovery_disk_uri = AAZStrType(
serialized_name="recoveryDiskUri",
)
_element.resync_required = AAZBoolType(
serialized_name="resyncRequired",
)
_element.secret_identifier = AAZStrType(
serialized_name="secretIdentifier",
)
_element.tfo_disk_name = AAZStrType(
serialized_name="tfoDiskName",
)
allowed_disk_level_operation = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_disks.Element.allowed_disk_level_operation
allowed_disk_level_operation.Element = AAZStrType()
protected_managed_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_managed_disks
protected_managed_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_managed_disks.Element
_element.allowed_disk_level_operation = AAZListType(
serialized_name="allowedDiskLevelOperation",
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
)
_element.data_pending_in_staging_storage_account_in_mb = AAZFloatType(
serialized_name="dataPendingInStagingStorageAccountInMB",
)
_element.dek_key_vault_arm_id = AAZStrType(
serialized_name="dekKeyVaultArmId",
)
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_state = AAZStrType(
serialized_name="diskState",
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.failover_disk_name = AAZStrType(
serialized_name="failoverDiskName",
)
_element.is_disk_encrypted = AAZBoolType(
serialized_name="isDiskEncrypted",
)
_element.is_disk_key_encrypted = AAZBoolType(
serialized_name="isDiskKeyEncrypted",
)
_element.kek_key_vault_arm_id = AAZStrType(
serialized_name="kekKeyVaultArmId",
)
_element.key_identifier = AAZStrType(
serialized_name="keyIdentifier",
)
_element.monitoring_job_type = AAZStrType(
serialized_name="monitoringJobType",
)
_element.monitoring_percentage_completion = AAZIntType(
serialized_name="monitoringPercentageCompletion",
)
_element.primary_disk_encryption_set_id = AAZStrType(
serialized_name="primaryDiskEncryptionSetId",
)
_element.primary_staging_azure_storage_account_id = AAZStrType(
serialized_name="primaryStagingAzureStorageAccountId",
)
_element.recovery_disk_encryption_set_id = AAZStrType(
serialized_name="recoveryDiskEncryptionSetId",
)
_element.recovery_orignal_target_disk_id = AAZStrType(
serialized_name="recoveryOrignalTargetDiskId",
)
_element.recovery_replica_disk_account_type = AAZStrType(
serialized_name="recoveryReplicaDiskAccountType",
)
_element.recovery_replica_disk_id = AAZStrType(
serialized_name="recoveryReplicaDiskId",
)
_element.recovery_resource_group_id = AAZStrType(
serialized_name="recoveryResourceGroupId",
)
_element.recovery_target_disk_account_type = AAZStrType(
serialized_name="recoveryTargetDiskAccountType",
)
_element.recovery_target_disk_id = AAZStrType(
serialized_name="recoveryTargetDiskId",
)
_element.resync_required = AAZBoolType(
serialized_name="resyncRequired",
)
_element.secret_identifier = AAZStrType(
serialized_name="secretIdentifier",
)
_element.tfo_disk_name = AAZStrType(
serialized_name="tfoDiskName",
)
allowed_disk_level_operation = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").protected_managed_disks.Element.allowed_disk_level_operation
allowed_disk_level_operation.Element = AAZStrType()
unprotected_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").unprotected_disks
unprotected_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").unprotected_disks.Element
_element.disk_auto_protection_status = AAZStrType(
serialized_name="diskAutoProtectionStatus",
)
_element.disk_lun_id = AAZIntType(
serialized_name="diskLunId",
)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
vm_synced_config_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details
vm_synced_config_details.input_endpoints = AAZListType(
serialized_name="inputEndpoints",
)
vm_synced_config_details.tags = AAZDictType()
input_endpoints = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details.input_endpoints
input_endpoints.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details.input_endpoints.Element
_element.endpoint_name = AAZStrType(
serialized_name="endpointName",
)
_element.private_port = AAZIntType(
serialized_name="privatePort",
)
_element.protocol = AAZStrType()
_element.public_port = AAZIntType(
serialized_name="publicPort",
)
tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A").vm_synced_config_details.tags
tags.Element = AAZStrType()
disc_a2_a_cross_cluster_migration = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2ACrossClusterMigration")
disc_a2_a_cross_cluster_migration.fabric_object_id = AAZStrType(
serialized_name="fabricObjectId",
)
disc_a2_a_cross_cluster_migration.lifecycle_id = AAZStrType(
serialized_name="lifecycleId",
)
disc_a2_a_cross_cluster_migration.os_type = AAZStrType(
serialized_name="osType",
)
disc_a2_a_cross_cluster_migration.primary_fabric_location = AAZStrType(
serialized_name="primaryFabricLocation",
)
disc_a2_a_cross_cluster_migration.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_a2_a_cross_cluster_migration.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
disc_hyper_v_replica2012 = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012")
disc_hyper_v_replica2012.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
_UnplannedFailoverHelper._build_schema_initial_replication_details_read(disc_hyper_v_replica2012.initial_replication_details)
disc_hyper_v_replica2012.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica2012.v_m_disk_details = AAZListType(
serialized_name="vMDiskDetails",
)
disc_hyper_v_replica2012.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica2012.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica2012.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica2012.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
v_m_disk_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012").v_m_disk_details
v_m_disk_details.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_disk_details_read(v_m_disk_details.Element)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
disc_hyper_v_replica2012_r2 = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012R2")
disc_hyper_v_replica2012_r2.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
_UnplannedFailoverHelper._build_schema_initial_replication_details_read(disc_hyper_v_replica2012_r2.initial_replication_details)
disc_hyper_v_replica2012_r2.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica2012_r2.v_m_disk_details = AAZListType(
serialized_name="vMDiskDetails",
)
disc_hyper_v_replica2012_r2.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica2012_r2.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica2012_r2.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica2012_r2.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
v_m_disk_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012R2").v_m_disk_details
v_m_disk_details.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_disk_details_read(v_m_disk_details.Element)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplica2012R2").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
disc_hyper_v_replica_azure = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure")
disc_hyper_v_replica_azure.azure_vm_disk_details = AAZListType(
serialized_name="azureVmDiskDetails",
)
disc_hyper_v_replica_azure.enable_rdp_on_target_option = AAZStrType(
serialized_name="enableRdpOnTargetOption",
)
disc_hyper_v_replica_azure.encryption = AAZStrType()
disc_hyper_v_replica_azure.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
_UnplannedFailoverHelper._build_schema_initial_replication_details_read(disc_hyper_v_replica_azure.initial_replication_details)
disc_hyper_v_replica_azure.last_recovery_point_received = AAZStrType(
serialized_name="lastRecoveryPointReceived",
flags={"read_only": True},
)
disc_hyper_v_replica_azure.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica_azure.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_hyper_v_replica_azure.license_type = AAZStrType(
serialized_name="licenseType",
)
disc_hyper_v_replica_azure.o_s_details = AAZObjectType(
serialized_name="oSDetails",
)
disc_hyper_v_replica_azure.protected_managed_disks = AAZListType(
serialized_name="protectedManagedDisks",
)
disc_hyper_v_replica_azure.recovery_availability_set_id = AAZStrType(
serialized_name="recoveryAvailabilitySetId",
)
disc_hyper_v_replica_azure.recovery_azure_log_storage_account_id = AAZStrType(
serialized_name="recoveryAzureLogStorageAccountId",
)
disc_hyper_v_replica_azure.recovery_azure_resource_group_id = AAZStrType(
serialized_name="recoveryAzureResourceGroupId",
)
disc_hyper_v_replica_azure.recovery_azure_storage_account = AAZStrType(
serialized_name="recoveryAzureStorageAccount",
)
disc_hyper_v_replica_azure.recovery_azure_vm_size = AAZStrType(
serialized_name="recoveryAzureVMSize",
)
disc_hyper_v_replica_azure.recovery_azure_vm_name = AAZStrType(
serialized_name="recoveryAzureVmName",
)
disc_hyper_v_replica_azure.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_hyper_v_replica_azure.seed_managed_disk_tags = AAZDictType(
serialized_name="seedManagedDiskTags",
)
disc_hyper_v_replica_azure.selected_recovery_azure_network_id = AAZStrType(
serialized_name="selectedRecoveryAzureNetworkId",
)
disc_hyper_v_replica_azure.selected_source_nic_id = AAZStrType(
serialized_name="selectedSourceNicId",
)
disc_hyper_v_replica_azure.source_vm_cpu_count = AAZIntType(
serialized_name="sourceVmCpuCount",
)
disc_hyper_v_replica_azure.source_vm_ram_size_in_mb = AAZIntType(
serialized_name="sourceVmRamSizeInMB",
)
disc_hyper_v_replica_azure.sql_server_license_type = AAZStrType(
serialized_name="sqlServerLicenseType",
)
disc_hyper_v_replica_azure.target_availability_zone = AAZStrType(
serialized_name="targetAvailabilityZone",
)
disc_hyper_v_replica_azure.target_managed_disk_tags = AAZDictType(
serialized_name="targetManagedDiskTags",
)
disc_hyper_v_replica_azure.target_nic_tags = AAZDictType(
serialized_name="targetNicTags",
)
disc_hyper_v_replica_azure.target_proximity_placement_group_id = AAZStrType(
serialized_name="targetProximityPlacementGroupId",
)
disc_hyper_v_replica_azure.target_vm_tags = AAZDictType(
serialized_name="targetVmTags",
)
disc_hyper_v_replica_azure.use_managed_disks = AAZStrType(
serialized_name="useManagedDisks",
)
disc_hyper_v_replica_azure.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica_azure.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica_azure.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica_azure.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
azure_vm_disk_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").azure_vm_disk_details
azure_vm_disk_details.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_azure_vm_disk_details_read(azure_vm_disk_details.Element)
o_s_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").o_s_details
o_s_details.o_s_major_version = AAZStrType(
serialized_name="oSMajorVersion",
)
o_s_details.o_s_minor_version = AAZStrType(
serialized_name="oSMinorVersion",
)
o_s_details.o_s_version = AAZStrType(
serialized_name="oSVersion",
)
o_s_details.os_edition = AAZStrType(
serialized_name="osEdition",
)
o_s_details.os_type = AAZStrType(
serialized_name="osType",
)
o_s_details.product_type = AAZStrType(
serialized_name="productType",
)
protected_managed_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").protected_managed_disks
protected_managed_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").protected_managed_disks.Element
_element.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.replica_disk_type = AAZStrType(
serialized_name="replicaDiskType",
)
_element.seed_managed_disk_id = AAZStrType(
serialized_name="seedManagedDiskId",
)
seed_managed_disk_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").seed_managed_disk_tags
seed_managed_disk_tags.Element = AAZStrType()
target_managed_disk_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").target_managed_disk_tags
target_managed_disk_tags.Element = AAZStrType()
target_nic_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").target_nic_tags
target_nic_tags.Element = AAZStrType()
target_vm_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").target_vm_tags
target_vm_tags.Element = AAZStrType()
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaAzure").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
disc_hyper_v_replica_base_replication_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaBaseReplicationDetails")
disc_hyper_v_replica_base_replication_details.initial_replication_details = AAZObjectType(
serialized_name="initialReplicationDetails",
)
_UnplannedFailoverHelper._build_schema_initial_replication_details_read(disc_hyper_v_replica_base_replication_details.initial_replication_details)
disc_hyper_v_replica_base_replication_details.last_replicated_time = AAZStrType(
serialized_name="lastReplicatedTime",
)
disc_hyper_v_replica_base_replication_details.v_m_disk_details = AAZListType(
serialized_name="vMDiskDetails",
)
disc_hyper_v_replica_base_replication_details.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_hyper_v_replica_base_replication_details.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_hyper_v_replica_base_replication_details.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_hyper_v_replica_base_replication_details.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
v_m_disk_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaBaseReplicationDetails").v_m_disk_details
v_m_disk_details.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_disk_details_read(v_m_disk_details.Element)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "HyperVReplicaBaseReplicationDetails").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
disc_in_mage = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage")
disc_in_mage.active_site_type = AAZStrType(
serialized_name="activeSiteType",
)
disc_in_mage.agent_details = AAZObjectType(
serialized_name="agentDetails",
)
disc_in_mage.azure_storage_account_id = AAZStrType(
serialized_name="azureStorageAccountId",
)
disc_in_mage.compressed_data_rate_in_mb = AAZFloatType(
serialized_name="compressedDataRateInMB",
)
disc_in_mage.consistency_points = AAZDictType(
serialized_name="consistencyPoints",
)
disc_in_mage.datastores = AAZListType()
disc_in_mage.discovery_type = AAZStrType(
serialized_name="discoveryType",
)
disc_in_mage.disk_resized = AAZStrType(
serialized_name="diskResized",
)
disc_in_mage.infrastructure_vm_id = AAZStrType(
serialized_name="infrastructureVmId",
)
disc_in_mage.ip_address = AAZStrType(
serialized_name="ipAddress",
)
disc_in_mage.is_additional_stats_available = AAZBoolType(
serialized_name="isAdditionalStatsAvailable",
)
disc_in_mage.last_heartbeat = AAZStrType(
serialized_name="lastHeartbeat",
)
disc_in_mage.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_in_mage.last_update_received_time = AAZStrType(
serialized_name="lastUpdateReceivedTime",
)
disc_in_mage.master_target_id = AAZStrType(
serialized_name="masterTargetId",
)
disc_in_mage.multi_vm_group_id = AAZStrType(
serialized_name="multiVmGroupId",
)
disc_in_mage.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
)
disc_in_mage.multi_vm_sync_status = AAZStrType(
serialized_name="multiVmSyncStatus",
)
disc_in_mage.os_details = AAZObjectType(
serialized_name="osDetails",
)
disc_in_mage.os_version = AAZStrType(
serialized_name="osVersion",
)
disc_in_mage.process_server_id = AAZStrType(
serialized_name="processServerId",
)
disc_in_mage.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
disc_in_mage.reboot_after_update_status = AAZStrType(
serialized_name="rebootAfterUpdateStatus",
)
disc_in_mage.replica_id = AAZStrType(
serialized_name="replicaId",
)
disc_in_mage.resync_details = AAZObjectType(
serialized_name="resyncDetails",
)
_UnplannedFailoverHelper._build_schema_initial_replication_details_read(disc_in_mage.resync_details)
disc_in_mage.retention_window_end = AAZStrType(
serialized_name="retentionWindowEnd",
)
disc_in_mage.retention_window_start = AAZStrType(
serialized_name="retentionWindowStart",
)
disc_in_mage.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_in_mage.source_vm_cpu_count = AAZIntType(
serialized_name="sourceVmCpuCount",
)
disc_in_mage.source_vm_ram_size_in_mb = AAZIntType(
serialized_name="sourceVmRamSizeInMB",
)
disc_in_mage.total_data_transferred = AAZIntType(
serialized_name="totalDataTransferred",
)
disc_in_mage.total_progress_health = AAZStrType(
serialized_name="totalProgressHealth",
)
disc_in_mage.uncompressed_data_rate_in_mb = AAZFloatType(
serialized_name="uncompressedDataRateInMB",
)
disc_in_mage.v_center_infrastructure_id = AAZStrType(
serialized_name="vCenterInfrastructureId",
)
disc_in_mage.validation_errors = AAZListType(
serialized_name="validationErrors",
)
disc_in_mage.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_in_mage.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_in_mage.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_in_mage.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
agent_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").agent_details
agent_details.agent_expiry_date = AAZStrType(
serialized_name="agentExpiryDate",
)
agent_details.agent_update_status = AAZStrType(
serialized_name="agentUpdateStatus",
)
agent_details.agent_version = AAZStrType(
serialized_name="agentVersion",
)
agent_details.post_update_reboot_status = AAZStrType(
serialized_name="postUpdateRebootStatus",
)
consistency_points = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").consistency_points
consistency_points.Element = AAZStrType()
datastores = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").datastores
datastores.Element = AAZStrType()
os_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").os_details
os_details.os_type = AAZStrType(
serialized_name="osType",
)
os_details.os_vhd_id = AAZStrType(
serialized_name="osVhdId",
)
os_details.vhd_name = AAZStrType(
serialized_name="vhdName",
)
protected_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").protected_disks
protected_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").protected_disks.Element
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_resized = AAZStrType(
serialized_name="diskResized",
)
_element.file_system_capacity_in_bytes = AAZIntType(
serialized_name="fileSystemCapacityInBytes",
)
_element.health_error_code = AAZStrType(
serialized_name="healthErrorCode",
)
_element.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
_element.progress_health = AAZStrType(
serialized_name="progressHealth",
)
_element.progress_status = AAZStrType(
serialized_name="progressStatus",
)
_element.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
_element.ps_data_in_mb = AAZFloatType(
serialized_name="psDataInMB",
)
_element.resync_duration_in_seconds = AAZIntType(
serialized_name="resyncDurationInSeconds",
)
_element.resync_last15_minutes_transferred_bytes = AAZIntType(
serialized_name="resyncLast15MinutesTransferredBytes",
)
_element.resync_last_data_transfer_time_utc = AAZStrType(
serialized_name="resyncLastDataTransferTimeUTC",
)
_element.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
)
_element.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
)
_element.resync_required = AAZStrType(
serialized_name="resyncRequired",
)
_element.resync_start_time = AAZStrType(
serialized_name="resyncStartTime",
)
_element.resync_total_transferred_bytes = AAZIntType(
serialized_name="resyncTotalTransferredBytes",
)
_element.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
_element.source_data_in_mb = AAZFloatType(
serialized_name="sourceDataInMB",
)
_element.target_data_in_mb = AAZFloatType(
serialized_name="targetDataInMB",
)
validation_errors = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").validation_errors
validation_errors.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_health_error_read(validation_errors.Element)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMage").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
disc_in_mage_azure_v2 = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2")
disc_in_mage_azure_v2.agent_expiry_date = AAZStrType(
serialized_name="agentExpiryDate",
)
disc_in_mage_azure_v2.agent_version = AAZStrType(
serialized_name="agentVersion",
)
disc_in_mage_azure_v2.azure_vm_disk_details = AAZListType(
serialized_name="azureVMDiskDetails",
)
disc_in_mage_azure_v2.azure_vm_generation = AAZStrType(
serialized_name="azureVmGeneration",
)
disc_in_mage_azure_v2.compressed_data_rate_in_mb = AAZFloatType(
serialized_name="compressedDataRateInMB",
)
disc_in_mage_azure_v2.datastores = AAZListType()
disc_in_mage_azure_v2.discovery_type = AAZStrType(
serialized_name="discoveryType",
)
disc_in_mage_azure_v2.disk_resized = AAZStrType(
serialized_name="diskResized",
)
disc_in_mage_azure_v2.enable_rdp_on_target_option = AAZStrType(
serialized_name="enableRdpOnTargetOption",
)
disc_in_mage_azure_v2.firmware_type = AAZStrType(
serialized_name="firmwareType",
)
disc_in_mage_azure_v2.infrastructure_vm_id = AAZStrType(
serialized_name="infrastructureVmId",
)
disc_in_mage_azure_v2.ip_address = AAZStrType(
serialized_name="ipAddress",
)
disc_in_mage_azure_v2.is_additional_stats_available = AAZBoolType(
serialized_name="isAdditionalStatsAvailable",
)
disc_in_mage_azure_v2.is_agent_update_required = AAZStrType(
serialized_name="isAgentUpdateRequired",
)
disc_in_mage_azure_v2.is_reboot_after_update_required = AAZStrType(
serialized_name="isRebootAfterUpdateRequired",
)
disc_in_mage_azure_v2.last_heartbeat = AAZStrType(
serialized_name="lastHeartbeat",
)
disc_in_mage_azure_v2.last_recovery_point_received = AAZStrType(
serialized_name="lastRecoveryPointReceived",
flags={"read_only": True},
)
disc_in_mage_azure_v2.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
disc_in_mage_azure_v2.last_update_received_time = AAZStrType(
serialized_name="lastUpdateReceivedTime",
)
disc_in_mage_azure_v2.license_type = AAZStrType(
serialized_name="licenseType",
)
disc_in_mage_azure_v2.master_target_id = AAZStrType(
serialized_name="masterTargetId",
)
disc_in_mage_azure_v2.multi_vm_group_id = AAZStrType(
serialized_name="multiVmGroupId",
)
disc_in_mage_azure_v2.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
)
disc_in_mage_azure_v2.multi_vm_sync_status = AAZStrType(
serialized_name="multiVmSyncStatus",
)
disc_in_mage_azure_v2.os_disk_id = AAZStrType(
serialized_name="osDiskId",
)
disc_in_mage_azure_v2.os_type = AAZStrType(
serialized_name="osType",
)
disc_in_mage_azure_v2.os_version = AAZStrType(
serialized_name="osVersion",
)
disc_in_mage_azure_v2.process_server_id = AAZStrType(
serialized_name="processServerId",
)
disc_in_mage_azure_v2.process_server_name = AAZStrType(
serialized_name="processServerName",
)
disc_in_mage_azure_v2.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage_azure_v2.protected_managed_disks = AAZListType(
serialized_name="protectedManagedDisks",
)
disc_in_mage_azure_v2.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
disc_in_mage_azure_v2.recovery_availability_set_id = AAZStrType(
serialized_name="recoveryAvailabilitySetId",
)
disc_in_mage_azure_v2.recovery_azure_log_storage_account_id = AAZStrType(
serialized_name="recoveryAzureLogStorageAccountId",
)
disc_in_mage_azure_v2.recovery_azure_resource_group_id = AAZStrType(
serialized_name="recoveryAzureResourceGroupId",
)
disc_in_mage_azure_v2.recovery_azure_storage_account = AAZStrType(
serialized_name="recoveryAzureStorageAccount",
)
disc_in_mage_azure_v2.recovery_azure_vm_name = AAZStrType(
serialized_name="recoveryAzureVMName",
)
disc_in_mage_azure_v2.recovery_azure_vm_size = AAZStrType(
serialized_name="recoveryAzureVMSize",
)
disc_in_mage_azure_v2.replica_id = AAZStrType(
serialized_name="replicaId",
)
disc_in_mage_azure_v2.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
)
disc_in_mage_azure_v2.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
disc_in_mage_azure_v2.seed_managed_disk_tags = AAZDictType(
serialized_name="seedManagedDiskTags",
)
disc_in_mage_azure_v2.selected_recovery_azure_network_id = AAZStrType(
serialized_name="selectedRecoveryAzureNetworkId",
)
disc_in_mage_azure_v2.selected_source_nic_id = AAZStrType(
serialized_name="selectedSourceNicId",
)
disc_in_mage_azure_v2.selected_tfo_azure_network_id = AAZStrType(
serialized_name="selectedTfoAzureNetworkId",
)
disc_in_mage_azure_v2.source_vm_cpu_count = AAZIntType(
serialized_name="sourceVmCpuCount",
)
disc_in_mage_azure_v2.source_vm_ram_size_in_mb = AAZIntType(
serialized_name="sourceVmRamSizeInMB",
)
disc_in_mage_azure_v2.sql_server_license_type = AAZStrType(
serialized_name="sqlServerLicenseType",
)
disc_in_mage_azure_v2.switch_provider_blocking_error_details = AAZListType(
serialized_name="switchProviderBlockingErrorDetails",
)
disc_in_mage_azure_v2.switch_provider_details = AAZObjectType(
serialized_name="switchProviderDetails",
)
disc_in_mage_azure_v2.target_availability_zone = AAZStrType(
serialized_name="targetAvailabilityZone",
)
disc_in_mage_azure_v2.target_managed_disk_tags = AAZDictType(
serialized_name="targetManagedDiskTags",
)
disc_in_mage_azure_v2.target_nic_tags = AAZDictType(
serialized_name="targetNicTags",
)
disc_in_mage_azure_v2.target_proximity_placement_group_id = AAZStrType(
serialized_name="targetProximityPlacementGroupId",
)
disc_in_mage_azure_v2.target_vm_id = AAZStrType(
serialized_name="targetVmId",
)
disc_in_mage_azure_v2.target_vm_tags = AAZDictType(
serialized_name="targetVmTags",
)
disc_in_mage_azure_v2.total_data_transferred = AAZIntType(
serialized_name="totalDataTransferred",
)
disc_in_mage_azure_v2.total_progress_health = AAZStrType(
serialized_name="totalProgressHealth",
)
disc_in_mage_azure_v2.uncompressed_data_rate_in_mb = AAZFloatType(
serialized_name="uncompressedDataRateInMB",
)
disc_in_mage_azure_v2.use_managed_disks = AAZStrType(
serialized_name="useManagedDisks",
)
disc_in_mage_azure_v2.v_center_infrastructure_id = AAZStrType(
serialized_name="vCenterInfrastructureId",
)
disc_in_mage_azure_v2.validation_errors = AAZListType(
serialized_name="validationErrors",
)
disc_in_mage_azure_v2.vhd_name = AAZStrType(
serialized_name="vhdName",
)
disc_in_mage_azure_v2.vm_id = AAZStrType(
serialized_name="vmId",
)
disc_in_mage_azure_v2.vm_nics = AAZListType(
serialized_name="vmNics",
)
disc_in_mage_azure_v2.vm_protection_state = AAZStrType(
serialized_name="vmProtectionState",
)
disc_in_mage_azure_v2.vm_protection_state_description = AAZStrType(
serialized_name="vmProtectionStateDescription",
)
azure_vm_disk_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").azure_vm_disk_details
azure_vm_disk_details.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_azure_vm_disk_details_read(azure_vm_disk_details.Element)
datastores = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").datastores
datastores.Element = AAZStrType()
protected_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_disks
protected_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_disks.Element
_element.disk_capacity_in_bytes = AAZIntType(
serialized_name="diskCapacityInBytes",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
)
_element.disk_resized = AAZStrType(
serialized_name="diskResized",
)
_element.file_system_capacity_in_bytes = AAZIntType(
serialized_name="fileSystemCapacityInBytes",
)
_element.health_error_code = AAZStrType(
serialized_name="healthErrorCode",
)
_element.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
)
_element.progress_health = AAZStrType(
serialized_name="progressHealth",
)
_element.progress_status = AAZStrType(
serialized_name="progressStatus",
)
_element.protection_stage = AAZStrType(
serialized_name="protectionStage",
)
_element.ps_data_in_mega_bytes = AAZFloatType(
serialized_name="psDataInMegaBytes",
)
_element.resync_duration_in_seconds = AAZIntType(
serialized_name="resyncDurationInSeconds",
)
_element.resync_last15_minutes_transferred_bytes = AAZIntType(
serialized_name="resyncLast15MinutesTransferredBytes",
)
_element.resync_last_data_transfer_time_utc = AAZStrType(
serialized_name="resyncLastDataTransferTimeUTC",
)
_element.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
)
_element.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
)
_element.resync_required = AAZStrType(
serialized_name="resyncRequired",
)
_element.resync_start_time = AAZStrType(
serialized_name="resyncStartTime",
)
_element.resync_total_transferred_bytes = AAZIntType(
serialized_name="resyncTotalTransferredBytes",
)
_element.rpo_in_seconds = AAZIntType(
serialized_name="rpoInSeconds",
)
_element.seconds_to_take_switch_provider = AAZIntType(
serialized_name="secondsToTakeSwitchProvider",
)
_element.source_data_in_mega_bytes = AAZFloatType(
serialized_name="sourceDataInMegaBytes",
)
_element.target_data_in_mega_bytes = AAZFloatType(
serialized_name="targetDataInMegaBytes",
)
protected_managed_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_managed_disks
protected_managed_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").protected_managed_disks.Element
_element.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
)
_element.replica_disk_type = AAZStrType(
serialized_name="replicaDiskType",
)
_element.seed_managed_disk_id = AAZStrType(
serialized_name="seedManagedDiskId",
)
_element.target_disk_name = AAZStrType(
serialized_name="targetDiskName",
)
seed_managed_disk_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").seed_managed_disk_tags
seed_managed_disk_tags.Element = AAZStrType()
switch_provider_blocking_error_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details
switch_provider_blocking_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details.Element
_element.error_code = AAZStrType(
serialized_name="errorCode",
flags={"read_only": True},
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_element.error_message_parameters = AAZDictType(
serialized_name="errorMessageParameters",
flags={"read_only": True},
)
_element.error_tags = AAZDictType(
serialized_name="errorTags",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
error_message_parameters = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details.Element.error_message_parameters
error_message_parameters.Element = AAZStrType()
error_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_blocking_error_details.Element.error_tags
error_tags.Element = AAZStrType()
switch_provider_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").switch_provider_details
switch_provider_details.target_appliance_id = AAZStrType(
serialized_name="targetApplianceId",
flags={"read_only": True},
)
switch_provider_details.target_fabric_id = AAZStrType(
serialized_name="targetFabricId",
flags={"read_only": True},
)
switch_provider_details.target_resource_id = AAZStrType(
serialized_name="targetResourceId",
flags={"read_only": True},
)
switch_provider_details.target_vault_id = AAZStrType(
serialized_name="targetVaultId",
flags={"read_only": True},
)
target_managed_disk_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").target_managed_disk_tags
target_managed_disk_tags.Element = AAZStrType()
target_nic_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").target_nic_tags
target_nic_tags.Element = AAZStrType()
target_vm_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").target_vm_tags
target_vm_tags.Element = AAZStrType()
validation_errors = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").validation_errors
validation_errors.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_health_error_read(validation_errors.Element)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageAzureV2").vm_nics
vm_nics.Element = AAZObjectType()
_UnplannedFailoverHelper._build_schema_vm_nic_details_read(vm_nics.Element)
disc_in_mage_rcm = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm")
disc_in_mage_rcm.agent_upgrade_attempt_to_version = AAZStrType(
serialized_name="agentUpgradeAttemptToVersion",
flags={"read_only": True},
)
disc_in_mage_rcm.agent_upgrade_blocking_error_details = AAZListType(
serialized_name="agentUpgradeBlockingErrorDetails",
)
disc_in_mage_rcm.agent_upgrade_job_id = AAZStrType(
serialized_name="agentUpgradeJobId",
flags={"read_only": True},
)
disc_in_mage_rcm.agent_upgrade_state = AAZStrType(
serialized_name="agentUpgradeState",
flags={"read_only": True},
)
disc_in_mage_rcm.allocated_memory_in_mb = AAZFloatType(
serialized_name="allocatedMemoryInMB",
flags={"read_only": True},
)
disc_in_mage_rcm.discovered_vm_details = AAZObjectType(
serialized_name="discoveredVmDetails",
)
disc_in_mage_rcm.discovery_type = AAZStrType(
serialized_name="discoveryType",
flags={"read_only": True},
)
disc_in_mage_rcm.fabric_discovery_machine_id = AAZStrType(
serialized_name="fabricDiscoveryMachineId",
flags={"read_only": True},
)
disc_in_mage_rcm.failover_recovery_point_id = AAZStrType(
serialized_name="failoverRecoveryPointId",
flags={"read_only": True},
)
disc_in_mage_rcm.firmware_type = AAZStrType(
serialized_name="firmwareType",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_processed_bytes = AAZIntType(
serialized_name="initialReplicationProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_progress_health = AAZStrType(
serialized_name="initialReplicationProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_progress_percentage = AAZIntType(
serialized_name="initialReplicationProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm.initial_replication_transferred_bytes = AAZIntType(
serialized_name="initialReplicationTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.internal_identifier = AAZStrType(
serialized_name="internalIdentifier",
flags={"read_only": True},
)
disc_in_mage_rcm.is_agent_registration_successful_after_failover = AAZBoolType(
serialized_name="isAgentRegistrationSuccessfulAfterFailover",
flags={"read_only": True},
)
disc_in_mage_rcm.is_last_upgrade_successful = AAZStrType(
serialized_name="isLastUpgradeSuccessful",
flags={"read_only": True},
)
disc_in_mage_rcm.last_agent_upgrade_error_details = AAZListType(
serialized_name="lastAgentUpgradeErrorDetails",
)
disc_in_mage_rcm.last_agent_upgrade_type = AAZStrType(
serialized_name="lastAgentUpgradeType",
flags={"read_only": True},
)
disc_in_mage_rcm.last_recovery_point_id = AAZStrType(
serialized_name="lastRecoveryPointId",
flags={"read_only": True},
)
disc_in_mage_rcm.last_recovery_point_received = AAZStrType(
serialized_name="lastRecoveryPointReceived",
flags={"read_only": True},
)
disc_in_mage_rcm.last_rpo_calculated_time = AAZStrType(
serialized_name="lastRpoCalculatedTime",
flags={"read_only": True},
)
disc_in_mage_rcm.last_rpo_in_seconds = AAZIntType(
serialized_name="lastRpoInSeconds",
flags={"read_only": True},
)
disc_in_mage_rcm.license_type = AAZStrType(
serialized_name="licenseType",
)
disc_in_mage_rcm.mobility_agent_details = AAZObjectType(
serialized_name="mobilityAgentDetails",
)
disc_in_mage_rcm.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
flags={"read_only": True},
)
disc_in_mage_rcm.os_type = AAZStrType(
serialized_name="osType",
flags={"read_only": True},
)
disc_in_mage_rcm.primary_nic_ip_address = AAZStrType(
serialized_name="primaryNicIpAddress",
flags={"read_only": True},
)
disc_in_mage_rcm.process_server_id = AAZStrType(
serialized_name="processServerId",
flags={"read_only": True},
)
disc_in_mage_rcm.process_server_name = AAZStrType(
serialized_name="processServerName",
flags={"read_only": True},
)
disc_in_mage_rcm.processor_core_count = AAZIntType(
serialized_name="processorCoreCount",
flags={"read_only": True},
)
disc_in_mage_rcm.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage_rcm.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_progress_health = AAZStrType(
serialized_name="resyncProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_required = AAZStrType(
serialized_name="resyncRequired",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_state = AAZStrType(
serialized_name="resyncState",
flags={"read_only": True},
)
disc_in_mage_rcm.resync_transferred_bytes = AAZIntType(
serialized_name="resyncTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm.run_as_account_id = AAZStrType(
serialized_name="runAsAccountId",
flags={"read_only": True},
)
disc_in_mage_rcm.storage_account_id = AAZStrType(
serialized_name="storageAccountId",
flags={"read_only": True},
)
disc_in_mage_rcm.target_availability_set_id = AAZStrType(
serialized_name="targetAvailabilitySetId",
)
disc_in_mage_rcm.target_availability_zone = AAZStrType(
serialized_name="targetAvailabilityZone",
)
disc_in_mage_rcm.target_boot_diagnostics_storage_account_id = AAZStrType(
serialized_name="targetBootDiagnosticsStorageAccountId",
)
disc_in_mage_rcm.target_generation = AAZStrType(
serialized_name="targetGeneration",
flags={"read_only": True},
)
disc_in_mage_rcm.target_location = AAZStrType(
serialized_name="targetLocation",
)
disc_in_mage_rcm.target_network_id = AAZStrType(
serialized_name="targetNetworkId",
)
disc_in_mage_rcm.target_proximity_placement_group_id = AAZStrType(
serialized_name="targetProximityPlacementGroupId",
)
disc_in_mage_rcm.target_resource_group_id = AAZStrType(
serialized_name="targetResourceGroupId",
)
disc_in_mage_rcm.target_vm_name = AAZStrType(
serialized_name="targetVmName",
)
disc_in_mage_rcm.target_vm_size = AAZStrType(
serialized_name="targetVmSize",
)
disc_in_mage_rcm.test_network_id = AAZStrType(
serialized_name="testNetworkId",
)
disc_in_mage_rcm.vm_nics = AAZListType(
serialized_name="vmNics",
)
agent_upgrade_blocking_error_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details
agent_upgrade_blocking_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details.Element
_element.error_code = AAZStrType(
serialized_name="errorCode",
flags={"read_only": True},
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_element.error_message_parameters = AAZDictType(
serialized_name="errorMessageParameters",
flags={"read_only": True},
)
_element.error_tags = AAZDictType(
serialized_name="errorTags",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
error_message_parameters = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details.Element.error_message_parameters
error_message_parameters.Element = AAZStrType()
error_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").agent_upgrade_blocking_error_details.Element.error_tags
error_tags.Element = AAZStrType()
discovered_vm_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").discovered_vm_details
discovered_vm_details.created_timestamp = AAZStrType(
serialized_name="createdTimestamp",
flags={"read_only": True},
)
discovered_vm_details.datastores = AAZListType(
flags={"read_only": True},
)
discovered_vm_details.ip_addresses = AAZListType(
serialized_name="ipAddresses",
flags={"read_only": True},
)
discovered_vm_details.is_deleted = AAZBoolType(
serialized_name="isDeleted",
flags={"read_only": True},
)
discovered_vm_details.last_discovery_time_in_utc = AAZStrType(
serialized_name="lastDiscoveryTimeInUtc",
flags={"read_only": True},
)
discovered_vm_details.os_name = AAZStrType(
serialized_name="osName",
flags={"read_only": True},
)
discovered_vm_details.power_status = AAZStrType(
serialized_name="powerStatus",
flags={"read_only": True},
)
discovered_vm_details.updated_timestamp = AAZStrType(
serialized_name="updatedTimestamp",
flags={"read_only": True},
)
discovered_vm_details.v_center_fqdn = AAZStrType(
serialized_name="vCenterFqdn",
flags={"read_only": True},
)
discovered_vm_details.v_center_id = AAZStrType(
serialized_name="vCenterId",
flags={"read_only": True},
)
discovered_vm_details.vm_fqdn = AAZStrType(
serialized_name="vmFqdn",
flags={"read_only": True},
)
discovered_vm_details.vmware_tools_status = AAZStrType(
serialized_name="vmwareToolsStatus",
flags={"read_only": True},
)
datastores = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").discovered_vm_details.datastores
datastores.Element = AAZStrType()
ip_addresses = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").discovered_vm_details.ip_addresses
ip_addresses.Element = AAZStrType()
last_agent_upgrade_error_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details
last_agent_upgrade_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details.Element
_element.error_code = AAZStrType(
serialized_name="errorCode",
flags={"read_only": True},
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_element.error_message_parameters = AAZDictType(
serialized_name="errorMessageParameters",
flags={"read_only": True},
)
_element.error_tags = AAZDictType(
serialized_name="errorTags",
flags={"read_only": True},
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
flags={"read_only": True},
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
flags={"read_only": True},
)
error_message_parameters = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details.Element.error_message_parameters
error_message_parameters.Element = AAZStrType()
error_tags = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").last_agent_upgrade_error_details.Element.error_tags
error_tags.Element = AAZStrType()
mobility_agent_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").mobility_agent_details
mobility_agent_details.agent_version_expiry_date = AAZStrType(
serialized_name="agentVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.driver_version = AAZStrType(
serialized_name="driverVersion",
flags={"read_only": True},
)
mobility_agent_details.driver_version_expiry_date = AAZStrType(
serialized_name="driverVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.is_upgradeable = AAZStrType(
serialized_name="isUpgradeable",
flags={"read_only": True},
)
mobility_agent_details.last_heartbeat_utc = AAZStrType(
serialized_name="lastHeartbeatUtc",
flags={"read_only": True},
)
mobility_agent_details.latest_agent_release_date = AAZStrType(
serialized_name="latestAgentReleaseDate",
flags={"read_only": True},
)
mobility_agent_details.latest_upgradable_version_without_reboot = AAZStrType(
serialized_name="latestUpgradableVersionWithoutReboot",
flags={"read_only": True},
)
mobility_agent_details.latest_version = AAZStrType(
serialized_name="latestVersion",
flags={"read_only": True},
)
mobility_agent_details.reasons_blocking_upgrade = AAZListType(
serialized_name="reasonsBlockingUpgrade",
flags={"read_only": True},
)
mobility_agent_details.version = AAZStrType(
flags={"read_only": True},
)
reasons_blocking_upgrade = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").mobility_agent_details.reasons_blocking_upgrade
reasons_blocking_upgrade.Element = AAZStrType()
protected_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").protected_disks
protected_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").protected_disks.Element
_element.capacity_in_bytes = AAZIntType(
serialized_name="capacityInBytes",
flags={"read_only": True},
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
flags={"read_only": True},
)
_element.data_pending_in_log_data_store_in_mb = AAZFloatType(
serialized_name="dataPendingInLogDataStoreInMB",
flags={"read_only": True},
)
_element.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
flags={"read_only": True},
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
flags={"read_only": True},
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
flags={"read_only": True},
)
_element.disk_type = AAZStrType(
serialized_name="diskType",
)
_element.ir_details = AAZObjectType(
serialized_name="irDetails",
)
_UnplannedFailoverHelper._build_schema_in_mage_rcm_sync_details_read(_element.ir_details)
_element.is_initial_replication_complete = AAZStrType(
serialized_name="isInitialReplicationComplete",
flags={"read_only": True},
)
_element.is_os_disk = AAZStrType(
serialized_name="isOSDisk",
flags={"read_only": True},
)
_element.log_storage_account_id = AAZStrType(
serialized_name="logStorageAccountId",
flags={"read_only": True},
)
_element.resync_details = AAZObjectType(
serialized_name="resyncDetails",
)
_UnplannedFailoverHelper._build_schema_in_mage_rcm_sync_details_read(_element.resync_details)
_element.seed_blob_uri = AAZStrType(
serialized_name="seedBlobUri",
flags={"read_only": True},
)
_element.seed_managed_disk_id = AAZStrType(
serialized_name="seedManagedDiskId",
flags={"read_only": True},
)
_element.target_managed_disk_id = AAZStrType(
serialized_name="targetManagedDiskId",
flags={"read_only": True},
)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").vm_nics
vm_nics.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm").vm_nics.Element
_element.is_primary_nic = AAZStrType(
serialized_name="isPrimaryNic",
)
_element.is_selected_for_failover = AAZStrType(
serialized_name="isSelectedForFailover",
)
_element.nic_id = AAZStrType(
serialized_name="nicId",
flags={"read_only": True},
)
_element.source_ip_address = AAZStrType(
serialized_name="sourceIPAddress",
flags={"read_only": True},
)
_element.source_ip_address_type = AAZStrType(
serialized_name="sourceIPAddressType",
flags={"read_only": True},
)
_element.source_network_id = AAZStrType(
serialized_name="sourceNetworkId",
flags={"read_only": True},
)
_element.source_subnet_name = AAZStrType(
serialized_name="sourceSubnetName",
flags={"read_only": True},
)
_element.target_ip_address = AAZStrType(
serialized_name="targetIPAddress",
)
_element.target_ip_address_type = AAZStrType(
serialized_name="targetIPAddressType",
)
_element.target_subnet_name = AAZStrType(
serialized_name="targetSubnetName",
)
_element.test_ip_address = AAZStrType(
serialized_name="testIPAddress",
)
_element.test_ip_address_type = AAZStrType(
serialized_name="testIPAddressType",
)
_element.test_subnet_name = AAZStrType(
serialized_name="testSubnetName",
)
disc_in_mage_rcm_failback = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback")
disc_in_mage_rcm_failback.azure_virtual_machine_id = AAZStrType(
serialized_name="azureVirtualMachineId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.discovered_vm_details = AAZObjectType(
serialized_name="discoveredVmDetails",
)
disc_in_mage_rcm_failback.initial_replication_processed_bytes = AAZIntType(
serialized_name="initialReplicationProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.initial_replication_progress_health = AAZStrType(
serialized_name="initialReplicationProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.initial_replication_progress_percentage = AAZIntType(
serialized_name="initialReplicationProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.initial_replication_transferred_bytes = AAZIntType(
serialized_name="initialReplicationTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.internal_identifier = AAZStrType(
serialized_name="internalIdentifier",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.is_agent_registration_successful_after_failover = AAZBoolType(
serialized_name="isAgentRegistrationSuccessfulAfterFailover",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_planned_failover_start_time = AAZStrType(
serialized_name="lastPlannedFailoverStartTime",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_planned_failover_status = AAZStrType(
serialized_name="lastPlannedFailoverStatus",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_used_policy_friendly_name = AAZStrType(
serialized_name="lastUsedPolicyFriendlyName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.last_used_policy_id = AAZStrType(
serialized_name="lastUsedPolicyId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.log_storage_account_id = AAZStrType(
serialized_name="logStorageAccountId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.mobility_agent_details = AAZObjectType(
serialized_name="mobilityAgentDetails",
)
disc_in_mage_rcm_failback.multi_vm_group_name = AAZStrType(
serialized_name="multiVmGroupName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.os_type = AAZStrType(
serialized_name="osType",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.protected_disks = AAZListType(
serialized_name="protectedDisks",
)
disc_in_mage_rcm_failback.reprotect_agent_id = AAZStrType(
serialized_name="reprotectAgentId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.reprotect_agent_name = AAZStrType(
serialized_name="reprotectAgentName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_processed_bytes = AAZIntType(
serialized_name="resyncProcessedBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_progress_health = AAZStrType(
serialized_name="resyncProgressHealth",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_progress_percentage = AAZIntType(
serialized_name="resyncProgressPercentage",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_required = AAZStrType(
serialized_name="resyncRequired",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_state = AAZStrType(
serialized_name="resyncState",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.resync_transferred_bytes = AAZIntType(
serialized_name="resyncTransferredBytes",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.target_data_store_name = AAZStrType(
serialized_name="targetDataStoreName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.target_vm_name = AAZStrType(
serialized_name="targetVmName",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.targetv_center_id = AAZStrType(
serialized_name="targetvCenterId",
flags={"read_only": True},
)
disc_in_mage_rcm_failback.vm_nics = AAZListType(
serialized_name="vmNics",
)
discovered_vm_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").discovered_vm_details
discovered_vm_details.created_timestamp = AAZStrType(
serialized_name="createdTimestamp",
flags={"read_only": True},
)
discovered_vm_details.datastores = AAZListType(
flags={"read_only": True},
)
discovered_vm_details.ip_addresses = AAZListType(
serialized_name="ipAddresses",
flags={"read_only": True},
)
discovered_vm_details.is_deleted = AAZBoolType(
serialized_name="isDeleted",
flags={"read_only": True},
)
discovered_vm_details.last_discovery_time_in_utc = AAZStrType(
serialized_name="lastDiscoveryTimeInUtc",
flags={"read_only": True},
)
discovered_vm_details.os_name = AAZStrType(
serialized_name="osName",
flags={"read_only": True},
)
discovered_vm_details.power_status = AAZStrType(
serialized_name="powerStatus",
flags={"read_only": True},
)
discovered_vm_details.updated_timestamp = AAZStrType(
serialized_name="updatedTimestamp",
flags={"read_only": True},
)
discovered_vm_details.v_center_fqdn = AAZStrType(
serialized_name="vCenterFqdn",
flags={"read_only": True},
)
discovered_vm_details.v_center_id = AAZStrType(
serialized_name="vCenterId",
flags={"read_only": True},
)
discovered_vm_details.vm_fqdn = AAZStrType(
serialized_name="vmFqdn",
flags={"read_only": True},
)
discovered_vm_details.vmware_tools_status = AAZStrType(
serialized_name="vmwareToolsStatus",
flags={"read_only": True},
)
datastores = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").discovered_vm_details.datastores
datastores.Element = AAZStrType()
ip_addresses = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").discovered_vm_details.ip_addresses
ip_addresses.Element = AAZStrType()
mobility_agent_details = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").mobility_agent_details
mobility_agent_details.agent_version_expiry_date = AAZStrType(
serialized_name="agentVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.driver_version = AAZStrType(
serialized_name="driverVersion",
flags={"read_only": True},
)
mobility_agent_details.driver_version_expiry_date = AAZStrType(
serialized_name="driverVersionExpiryDate",
flags={"read_only": True},
)
mobility_agent_details.is_upgradeable = AAZStrType(
serialized_name="isUpgradeable",
flags={"read_only": True},
)
mobility_agent_details.last_heartbeat_utc = AAZStrType(
serialized_name="lastHeartbeatUtc",
flags={"read_only": True},
)
mobility_agent_details.latest_upgradable_version_without_reboot = AAZStrType(
serialized_name="latestUpgradableVersionWithoutReboot",
flags={"read_only": True},
)
mobility_agent_details.latest_version = AAZStrType(
serialized_name="latestVersion",
flags={"read_only": True},
)
mobility_agent_details.reasons_blocking_upgrade = AAZListType(
serialized_name="reasonsBlockingUpgrade",
flags={"read_only": True},
)
mobility_agent_details.version = AAZStrType(
flags={"read_only": True},
)
reasons_blocking_upgrade = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").mobility_agent_details.reasons_blocking_upgrade
reasons_blocking_upgrade.Element = AAZStrType()
protected_disks = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").protected_disks
protected_disks.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").protected_disks.Element
_element.capacity_in_bytes = AAZIntType(
serialized_name="capacityInBytes",
flags={"read_only": True},
)
_element.data_pending_at_source_agent_in_mb = AAZFloatType(
serialized_name="dataPendingAtSourceAgentInMB",
flags={"read_only": True},
)
_element.data_pending_in_log_data_store_in_mb = AAZFloatType(
serialized_name="dataPendingInLogDataStoreInMB",
flags={"read_only": True},
)
_element.disk_id = AAZStrType(
serialized_name="diskId",
flags={"read_only": True},
)
_element.disk_name = AAZStrType(
serialized_name="diskName",
flags={"read_only": True},
)
_element.disk_uuid = AAZStrType(
serialized_name="diskUuid",
flags={"read_only": True},
)
_element.ir_details = AAZObjectType(
serialized_name="irDetails",
)
_UnplannedFailoverHelper._build_schema_in_mage_rcm_failback_sync_details_read(_element.ir_details)
_element.is_initial_replication_complete = AAZStrType(
serialized_name="isInitialReplicationComplete",
flags={"read_only": True},
)
_element.is_os_disk = AAZStrType(
serialized_name="isOSDisk",
flags={"read_only": True},
)
_element.last_sync_time = AAZStrType(
serialized_name="lastSyncTime",
flags={"read_only": True},
)
_element.resync_details = AAZObjectType(
serialized_name="resyncDetails",
)
_UnplannedFailoverHelper._build_schema_in_mage_rcm_failback_sync_details_read(_element.resync_details)
vm_nics = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").vm_nics
vm_nics.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcmFailback").vm_nics.Element
_element.adapter_type = AAZStrType(
serialized_name="adapterType",
flags={"read_only": True},
)
_element.mac_address = AAZStrType(
serialized_name="macAddress",
flags={"read_only": True},
)
_element.network_name = AAZStrType(
serialized_name="networkName",
flags={"read_only": True},
)
_element.source_ip_address = AAZStrType(
serialized_name="sourceIpAddress",
flags={"read_only": True},
)
return cls._schema_on_200
|
class UnplannedFailover(AAZCommand):
'''Operation to initiate a failover of the replication protected item.
:example: protected-item unplanned-failover for A2A
az site-recovery protected-item unplanned-failover --fabric-name fabric1_name --protection-container container1_name -n protected_item_name -g rg --vault-name vault_name --failover-direction PrimaryToRecovery --provider-details '{a2a:{}}' --source-site-operations NotRequired
:example: protected-item failback for A2A
az site-recovery protected-item unplanned-failover --fabric-name fabric2_name --protection-container container2_name -n protected_item_name -g rg --vault-name vault_name --failover-direction PrimaryToRecovery --provider-details '{a2a:{}}' --source-site-operations NotRequired
:example: protected-item failover hyper-v-replica-azure
az site-recovery protected-item unplanned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction PrimaryToRecovery --provider-details '{hyper-v-replica-azure:""}' --source-site-operations NotRequired
:example: protected-item unplanned-failover for v2arcm
az site-recovery protected-item unplanned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction PrimaryToRecovery --provider-details '{in-mage-rcm:{perform-shutdown:true}}' --source-site-operations NotRequired
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectedItemsUnplannedFailover(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 29 | 1 | 152 | 7 | 144 | 0 | 2 | 0.01 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 2,486 | 141 | 2,333 | 104 | 2,304 | 12 | 883 | 92 | 865 | 8 | 1 | 1 | 27 |
9,149 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protected_item/_show.py
|
azext_site_recovery.aaz.latest.site_recovery.protected_item._show._ShowHelper
|
class _ShowHelper:
"""Helper class for Show"""
_schema_azure_vm_disk_details_read = None
@classmethod
def _build_schema_azure_vm_disk_details_read(cls, _schema):
if cls._schema_azure_vm_disk_details_read is not None:
_schema.custom_target_disk_name = cls._schema_azure_vm_disk_details_read.custom_target_disk_name
_schema.disk_encryption_set_id = cls._schema_azure_vm_disk_details_read.disk_encryption_set_id
_schema.disk_id = cls._schema_azure_vm_disk_details_read.disk_id
_schema.lun_id = cls._schema_azure_vm_disk_details_read.lun_id
_schema.max_size_mb = cls._schema_azure_vm_disk_details_read.max_size_mb
_schema.target_disk_location = cls._schema_azure_vm_disk_details_read.target_disk_location
_schema.target_disk_name = cls._schema_azure_vm_disk_details_read.target_disk_name
_schema.vhd_id = cls._schema_azure_vm_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_azure_vm_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_azure_vm_disk_details_read.vhd_type
return
cls._schema_azure_vm_disk_details_read = _schema_azure_vm_disk_details_read = AAZObjectType()
azure_vm_disk_details_read = _schema_azure_vm_disk_details_read
azure_vm_disk_details_read.custom_target_disk_name = AAZStrType(
serialized_name="customTargetDiskName",
)
azure_vm_disk_details_read.disk_encryption_set_id = AAZStrType(
serialized_name="diskEncryptionSetId",
)
azure_vm_disk_details_read.disk_id = AAZStrType(
serialized_name="diskId",
)
azure_vm_disk_details_read.lun_id = AAZStrType(
serialized_name="lunId",
)
azure_vm_disk_details_read.max_size_mb = AAZStrType(
serialized_name="maxSizeMB",
)
azure_vm_disk_details_read.target_disk_location = AAZStrType(
serialized_name="targetDiskLocation",
)
azure_vm_disk_details_read.target_disk_name = AAZStrType(
serialized_name="targetDiskName",
)
azure_vm_disk_details_read.vhd_id = AAZStrType(
serialized_name="vhdId",
)
azure_vm_disk_details_read.vhd_name = AAZStrType(
serialized_name="vhdName",
)
azure_vm_disk_details_read.vhd_type = AAZStrType(
serialized_name="vhdType",
)
_schema.custom_target_disk_name = cls._schema_azure_vm_disk_details_read.custom_target_disk_name
_schema.disk_encryption_set_id = cls._schema_azure_vm_disk_details_read.disk_encryption_set_id
_schema.disk_id = cls._schema_azure_vm_disk_details_read.disk_id
_schema.lun_id = cls._schema_azure_vm_disk_details_read.lun_id
_schema.max_size_mb = cls._schema_azure_vm_disk_details_read.max_size_mb
_schema.target_disk_location = cls._schema_azure_vm_disk_details_read.target_disk_location
_schema.target_disk_name = cls._schema_azure_vm_disk_details_read.target_disk_name
_schema.vhd_id = cls._schema_azure_vm_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_azure_vm_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_azure_vm_disk_details_read.vhd_type
_schema_disk_details_read = None
@classmethod
def _build_schema_disk_details_read(cls, _schema):
if cls._schema_disk_details_read is not None:
_schema.max_size_mb = cls._schema_disk_details_read.max_size_mb
_schema.vhd_id = cls._schema_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_disk_details_read.vhd_type
return
cls._schema_disk_details_read = _schema_disk_details_read = AAZObjectType()
disk_details_read = _schema_disk_details_read
disk_details_read.max_size_mb = AAZIntType(
serialized_name="maxSizeMB",
)
disk_details_read.vhd_id = AAZStrType(
serialized_name="vhdId",
)
disk_details_read.vhd_name = AAZStrType(
serialized_name="vhdName",
)
disk_details_read.vhd_type = AAZStrType(
serialized_name="vhdType",
)
_schema.max_size_mb = cls._schema_disk_details_read.max_size_mb
_schema.vhd_id = cls._schema_disk_details_read.vhd_id
_schema.vhd_name = cls._schema_disk_details_read.vhd_name
_schema.vhd_type = cls._schema_disk_details_read.vhd_type
_schema_extended_location_read = None
@classmethod
def _build_schema_extended_location_read(cls, _schema):
if cls._schema_extended_location_read is not None:
_schema.name = cls._schema_extended_location_read.name
_schema.type = cls._schema_extended_location_read.type
return
cls._schema_extended_location_read = _schema_extended_location_read = AAZObjectType()
extended_location_read = _schema_extended_location_read
extended_location_read.name = AAZStrType(
flags={"required": True},
)
extended_location_read.type = AAZStrType(
flags={"required": True},
)
_schema.name = cls._schema_extended_location_read.name
_schema.type = cls._schema_extended_location_read.type
_schema_health_error_read = None
@classmethod
def _build_schema_health_error_read(cls, _schema):
if cls._schema_health_error_read is not None:
_schema.creation_time_utc = cls._schema_health_error_read.creation_time_utc
_schema.customer_resolvability = cls._schema_health_error_read.customer_resolvability
_schema.entity_id = cls._schema_health_error_read.entity_id
_schema.error_category = cls._schema_health_error_read.error_category
_schema.error_code = cls._schema_health_error_read.error_code
_schema.error_id = cls._schema_health_error_read.error_id
_schema.error_level = cls._schema_health_error_read.error_level
_schema.error_message = cls._schema_health_error_read.error_message
_schema.error_source = cls._schema_health_error_read.error_source
_schema.error_type = cls._schema_health_error_read.error_type
_schema.inner_health_errors = cls._schema_health_error_read.inner_health_errors
_schema.possible_causes = cls._schema_health_error_read.possible_causes
_schema.recommended_action = cls._schema_health_error_read.recommended_action
_schema.recovery_provider_error_message = cls._schema_health_error_read.recovery_provider_error_message
_schema.summary_message = cls._schema_health_error_read.summary_message
return
cls._schema_health_error_read = _schema_health_error_read = AAZObjectType()
health_error_read = _schema_health_error_read
health_error_read.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
health_error_read.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
health_error_read.entity_id = AAZStrType(
serialized_name="entityId",
)
health_error_read.error_category = AAZStrType(
serialized_name="errorCategory",
)
health_error_read.error_code = AAZStrType(
serialized_name="errorCode",
)
health_error_read.error_id = AAZStrType(
serialized_name="errorId",
)
health_error_read.error_level = AAZStrType(
serialized_name="errorLevel",
)
health_error_read.error_message = AAZStrType(
serialized_name="errorMessage",
)
health_error_read.error_source = AAZStrType(
serialized_name="errorSource",
)
health_error_read.error_type = AAZStrType(
serialized_name="errorType",
)
health_error_read.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
health_error_read.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
health_error_read.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
health_error_read.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
health_error_read.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = _schema_health_error_read.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = _schema_health_error_read.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
_schema.creation_time_utc = cls._schema_health_error_read.creation_time_utc
_schema.customer_resolvability = cls._schema_health_error_read.customer_resolvability
_schema.entity_id = cls._schema_health_error_read.entity_id
_schema.error_category = cls._schema_health_error_read.error_category
_schema.error_code = cls._schema_health_error_read.error_code
_schema.error_id = cls._schema_health_error_read.error_id
_schema.error_level = cls._schema_health_error_read.error_level
_schema.error_message = cls._schema_health_error_read.error_message
_schema.error_source = cls._schema_health_error_read.error_source
_schema.error_type = cls._schema_health_error_read.error_type
_schema.inner_health_errors = cls._schema_health_error_read.inner_health_errors
_schema.possible_causes = cls._schema_health_error_read.possible_causes
_schema.recommended_action = cls._schema_health_error_read.recommended_action
_schema.recovery_provider_error_message = cls._schema_health_error_read.recovery_provider_error_message
_schema.summary_message = cls._schema_health_error_read.summary_message
_schema_in_mage_rcm_failback_sync_details_read = None
@classmethod
def _build_schema_in_mage_rcm_failback_sync_details_read(cls, _schema):
if cls._schema_in_mage_rcm_failback_sync_details_read is not None:
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_failback_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_failback_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_failback_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_failback_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.transferred_bytes
return
cls._schema_in_mage_rcm_failback_sync_details_read = _schema_in_mage_rcm_failback_sync_details_read = AAZObjectType()
in_mage_rcm_failback_sync_details_read = _schema_in_mage_rcm_failback_sync_details_read
in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes = AAZIntType(
serialized_name="last15MinutesTransferredBytes",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc = AAZStrType(
serialized_name="lastDataTransferTimeUtc",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.last_refresh_time = AAZStrType(
serialized_name="lastRefreshTime",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.processed_bytes = AAZIntType(
serialized_name="processedBytes",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.progress_health = AAZStrType(
serialized_name="progressHealth",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.progress_percentage = AAZIntType(
serialized_name="progressPercentage",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.start_time = AAZStrType(
serialized_name="startTime",
flags={"read_only": True},
)
in_mage_rcm_failback_sync_details_read.transferred_bytes = AAZIntType(
serialized_name="transferredBytes",
flags={"read_only": True},
)
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_failback_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_failback_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_failback_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_failback_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_failback_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_failback_sync_details_read.transferred_bytes
_schema_in_mage_rcm_sync_details_read = None
@classmethod
def _build_schema_in_mage_rcm_sync_details_read(cls, _schema):
if cls._schema_in_mage_rcm_sync_details_read is not None:
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.transferred_bytes
return
cls._schema_in_mage_rcm_sync_details_read = _schema_in_mage_rcm_sync_details_read = AAZObjectType()
in_mage_rcm_sync_details_read = _schema_in_mage_rcm_sync_details_read
in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes = AAZIntType(
serialized_name="last15MinutesTransferredBytes",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.last_data_transfer_time_utc = AAZStrType(
serialized_name="lastDataTransferTimeUtc",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.last_refresh_time = AAZStrType(
serialized_name="lastRefreshTime",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.processed_bytes = AAZIntType(
serialized_name="processedBytes",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.progress_health = AAZStrType(
serialized_name="progressHealth",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.progress_percentage = AAZIntType(
serialized_name="progressPercentage",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.start_time = AAZStrType(
serialized_name="startTime",
flags={"read_only": True},
)
in_mage_rcm_sync_details_read.transferred_bytes = AAZIntType(
serialized_name="transferredBytes",
flags={"read_only": True},
)
_schema.last15_minutes_transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.last15_minutes_transferred_bytes
_schema.last_data_transfer_time_utc = cls._schema_in_mage_rcm_sync_details_read.last_data_transfer_time_utc
_schema.last_refresh_time = cls._schema_in_mage_rcm_sync_details_read.last_refresh_time
_schema.processed_bytes = cls._schema_in_mage_rcm_sync_details_read.processed_bytes
_schema.progress_health = cls._schema_in_mage_rcm_sync_details_read.progress_health
_schema.progress_percentage = cls._schema_in_mage_rcm_sync_details_read.progress_percentage
_schema.start_time = cls._schema_in_mage_rcm_sync_details_read.start_time
_schema.transferred_bytes = cls._schema_in_mage_rcm_sync_details_read.transferred_bytes
_schema_initial_replication_details_read = None
@classmethod
def _build_schema_initial_replication_details_read(cls, _schema):
if cls._schema_initial_replication_details_read is not None:
_schema.initial_replication_progress_percentage = cls._schema_initial_replication_details_read.initial_replication_progress_percentage
_schema.initial_replication_type = cls._schema_initial_replication_details_read.initial_replication_type
return
cls._schema_initial_replication_details_read = _schema_initial_replication_details_read = AAZObjectType()
initial_replication_details_read = _schema_initial_replication_details_read
initial_replication_details_read.initial_replication_progress_percentage = AAZStrType(
serialized_name="initialReplicationProgressPercentage",
)
initial_replication_details_read.initial_replication_type = AAZStrType(
serialized_name="initialReplicationType",
)
_schema.initial_replication_progress_percentage = cls._schema_initial_replication_details_read.initial_replication_progress_percentage
_schema.initial_replication_type = cls._schema_initial_replication_details_read.initial_replication_type
_schema_vm_nic_details_read = None
@classmethod
def _build_schema_vm_nic_details_read(cls, _schema):
if cls._schema_vm_nic_details_read is not None:
_schema.enable_accelerated_networking_on_recovery = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_recovery
_schema.enable_accelerated_networking_on_tfo = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_tfo
_schema.ip_configs = cls._schema_vm_nic_details_read.ip_configs
_schema.nic_id = cls._schema_vm_nic_details_read.nic_id
_schema.recovery_network_security_group_id = cls._schema_vm_nic_details_read.recovery_network_security_group_id
_schema.recovery_nic_name = cls._schema_vm_nic_details_read.recovery_nic_name
_schema.recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.recovery_nic_resource_group_name
_schema.recovery_vm_network_id = cls._schema_vm_nic_details_read.recovery_vm_network_id
_schema.replica_nic_id = cls._schema_vm_nic_details_read.replica_nic_id
_schema.reuse_existing_nic = cls._schema_vm_nic_details_read.reuse_existing_nic
_schema.selection_type = cls._schema_vm_nic_details_read.selection_type
_schema.source_nic_arm_id = cls._schema_vm_nic_details_read.source_nic_arm_id
_schema.target_nic_name = cls._schema_vm_nic_details_read.target_nic_name
_schema.tfo_network_security_group_id = cls._schema_vm_nic_details_read.tfo_network_security_group_id
_schema.tfo_recovery_nic_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_name
_schema.tfo_recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_resource_group_name
_schema.tfo_reuse_existing_nic = cls._schema_vm_nic_details_read.tfo_reuse_existing_nic
_schema.tfo_vm_network_id = cls._schema_vm_nic_details_read.tfo_vm_network_id
_schema.v_m_network_name = cls._schema_vm_nic_details_read.v_m_network_name
return
cls._schema_vm_nic_details_read = _schema_vm_nic_details_read = AAZObjectType()
vm_nic_details_read = _schema_vm_nic_details_read
vm_nic_details_read.enable_accelerated_networking_on_recovery = AAZBoolType(
serialized_name="enableAcceleratedNetworkingOnRecovery",
)
vm_nic_details_read.enable_accelerated_networking_on_tfo = AAZBoolType(
serialized_name="enableAcceleratedNetworkingOnTfo",
)
vm_nic_details_read.ip_configs = AAZListType(
serialized_name="ipConfigs",
)
vm_nic_details_read.nic_id = AAZStrType(
serialized_name="nicId",
)
vm_nic_details_read.recovery_network_security_group_id = AAZStrType(
serialized_name="recoveryNetworkSecurityGroupId",
)
vm_nic_details_read.recovery_nic_name = AAZStrType(
serialized_name="recoveryNicName",
)
vm_nic_details_read.recovery_nic_resource_group_name = AAZStrType(
serialized_name="recoveryNicResourceGroupName",
)
vm_nic_details_read.recovery_vm_network_id = AAZStrType(
serialized_name="recoveryVMNetworkId",
)
vm_nic_details_read.replica_nic_id = AAZStrType(
serialized_name="replicaNicId",
)
vm_nic_details_read.reuse_existing_nic = AAZBoolType(
serialized_name="reuseExistingNic",
)
vm_nic_details_read.selection_type = AAZStrType(
serialized_name="selectionType",
)
vm_nic_details_read.source_nic_arm_id = AAZStrType(
serialized_name="sourceNicArmId",
)
vm_nic_details_read.target_nic_name = AAZStrType(
serialized_name="targetNicName",
)
vm_nic_details_read.tfo_network_security_group_id = AAZStrType(
serialized_name="tfoNetworkSecurityGroupId",
)
vm_nic_details_read.tfo_recovery_nic_name = AAZStrType(
serialized_name="tfoRecoveryNicName",
)
vm_nic_details_read.tfo_recovery_nic_resource_group_name = AAZStrType(
serialized_name="tfoRecoveryNicResourceGroupName",
)
vm_nic_details_read.tfo_reuse_existing_nic = AAZBoolType(
serialized_name="tfoReuseExistingNic",
)
vm_nic_details_read.tfo_vm_network_id = AAZStrType(
serialized_name="tfoVMNetworkId",
)
vm_nic_details_read.v_m_network_name = AAZStrType(
serialized_name="vMNetworkName",
)
ip_configs = _schema_vm_nic_details_read.ip_configs
ip_configs.Element = AAZObjectType()
_element = _schema_vm_nic_details_read.ip_configs.Element
_element.ip_address_type = AAZStrType(
serialized_name="ipAddressType",
)
_element.is_primary = AAZBoolType(
serialized_name="isPrimary",
)
_element.is_seleted_for_failover = AAZBoolType(
serialized_name="isSeletedForFailover",
)
_element.name = AAZStrType()
_element.recovery_ip_address_type = AAZStrType(
serialized_name="recoveryIPAddressType",
)
_element.recovery_lb_backend_address_pool_ids = AAZListType(
serialized_name="recoveryLBBackendAddressPoolIds",
)
_element.recovery_public_ip_address_id = AAZStrType(
serialized_name="recoveryPublicIPAddressId",
)
_element.recovery_static_ip_address = AAZStrType(
serialized_name="recoveryStaticIPAddress",
)
_element.recovery_subnet_name = AAZStrType(
serialized_name="recoverySubnetName",
)
_element.static_ip_address = AAZStrType(
serialized_name="staticIPAddress",
)
_element.subnet_name = AAZStrType(
serialized_name="subnetName",
)
_element.tfo_lb_backend_address_pool_ids = AAZListType(
serialized_name="tfoLBBackendAddressPoolIds",
)
_element.tfo_public_ip_address_id = AAZStrType(
serialized_name="tfoPublicIPAddressId",
)
_element.tfo_static_ip_address = AAZStrType(
serialized_name="tfoStaticIPAddress",
)
_element.tfo_subnet_name = AAZStrType(
serialized_name="tfoSubnetName",
)
recovery_lb_backend_address_pool_ids = _schema_vm_nic_details_read.ip_configs.Element.recovery_lb_backend_address_pool_ids
recovery_lb_backend_address_pool_ids.Element = AAZStrType()
tfo_lb_backend_address_pool_ids = _schema_vm_nic_details_read.ip_configs.Element.tfo_lb_backend_address_pool_ids
tfo_lb_backend_address_pool_ids.Element = AAZStrType()
_schema.enable_accelerated_networking_on_recovery = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_recovery
_schema.enable_accelerated_networking_on_tfo = cls._schema_vm_nic_details_read.enable_accelerated_networking_on_tfo
_schema.ip_configs = cls._schema_vm_nic_details_read.ip_configs
_schema.nic_id = cls._schema_vm_nic_details_read.nic_id
_schema.recovery_network_security_group_id = cls._schema_vm_nic_details_read.recovery_network_security_group_id
_schema.recovery_nic_name = cls._schema_vm_nic_details_read.recovery_nic_name
_schema.recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.recovery_nic_resource_group_name
_schema.recovery_vm_network_id = cls._schema_vm_nic_details_read.recovery_vm_network_id
_schema.replica_nic_id = cls._schema_vm_nic_details_read.replica_nic_id
_schema.reuse_existing_nic = cls._schema_vm_nic_details_read.reuse_existing_nic
_schema.selection_type = cls._schema_vm_nic_details_read.selection_type
_schema.source_nic_arm_id = cls._schema_vm_nic_details_read.source_nic_arm_id
_schema.target_nic_name = cls._schema_vm_nic_details_read.target_nic_name
_schema.tfo_network_security_group_id = cls._schema_vm_nic_details_read.tfo_network_security_group_id
_schema.tfo_recovery_nic_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_name
_schema.tfo_recovery_nic_resource_group_name = cls._schema_vm_nic_details_read.tfo_recovery_nic_resource_group_name
_schema.tfo_reuse_existing_nic = cls._schema_vm_nic_details_read.tfo_reuse_existing_nic
_schema.tfo_vm_network_id = cls._schema_vm_nic_details_read.tfo_vm_network_id
_schema.v_m_network_name = cls._schema_vm_nic_details_read.v_m_network_name
|
class _ShowHelper:
'''Helper class for Show'''
@classmethod
def _build_schema_azure_vm_disk_details_read(cls, _schema):
pass
@classmethod
def _build_schema_disk_details_read(cls, _schema):
pass
@classmethod
def _build_schema_extended_location_read(cls, _schema):
pass
@classmethod
def _build_schema_health_error_read(cls, _schema):
pass
@classmethod
def _build_schema_in_mage_rcm_failback_sync_details_read(cls, _schema):
pass
@classmethod
def _build_schema_in_mage_rcm_sync_details_read(cls, _schema):
pass
@classmethod
def _build_schema_initial_replication_details_read(cls, _schema):
pass
@classmethod
def _build_schema_vm_nic_details_read(cls, _schema):
pass
| 17 | 1 | 65 | 4 | 61 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 8 | 555 | 46 | 508 | 47 | 491 | 1 | 292 | 31 | 283 | 2 | 0 | 1 | 16 |
9,150 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/subscription/_create.py
|
azext_network_manager.aaz.latest.network.manager.connection.subscription._create.Create.SubscriptionNetworkManagerConnectionsCreateOrUpdate
|
class SubscriptionNetworkManagerConnectionsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("networkManagerId",
AAZStrType, ".network_manager_id")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.connection_state = AAZStrType(
serialized_name="connectionState",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.network_manager_id = AAZStrType(
serialized_name="networkManagerId",
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200_201
|
class SubscriptionNetworkManagerConnectionsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 13 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 147 | 19 | 128 | 32 | 109 | 0 | 58 | 24 | 47 | 2 | 1 | 1 | 13 |
9,151 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/management_group/_update.py
|
azext_network_manager.aaz.latest.network.manager.connection.management_group._update.Update.ManagementGroupNetworkManagerConnectionsGet
|
class ManagementGroupNetworkManagerConnectionsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"managementGroupId", self.ctx.args.management_group_id,
required=True,
),
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_network_manager_connection_read(
cls._schema_on_200)
return cls._schema_on_200
|
class ManagementGroupNetworkManagerConnectionsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 9 | 9 | 78 | 13 | 65 | 25 | 48 | 0 | 33 | 18 | 23 | 2 | 1 | 1 | 11 |
9,152 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_create.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._create.Create
|
class Create(AAZCommand):
"""Create operation to create a protection container mapping.
:example: protection-container mapping create for A2A
az site-recovery protection-container mapping create -g rg --fabric-name fabric1_name -n container_mapping1_name --protection-container container1_name --vault-name vault_name --policy-id policy_id --provider-input '{a2a:{agent-auto-update-status:Disabled}}' --target-container container2_id
:example: protection-container mapping create for H2A
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container "Microsoft Azure" --provider-input '{hyper-v-replica-azure:""}'
:example: protection-container mapping create for V2A RCM
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container "Microsoft Azure" --provider-input '{in-mage-rcm:{enable-agent-auto-upgrade:true}}'
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotectioncontainermappings/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
)
_args_schema.mapping_name = AAZStrArg(
options=["-n", "--name", "--mapping-name"],
help="Protection container mapping name.",
required=True,
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.policy_id = AAZStrArg(
options=["--policy-id"],
arg_group="Properties",
help="Applicable policy.",
)
_args_schema.provider_specific_input = AAZObjectArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="Provider specific input for pairing.",
)
_args_schema.target_protection_container_id = AAZStrArg(
options=["--target-container", "--target-protection-container-id"],
arg_group="Properties",
help="The target unique protection container name.",
)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.a2a = AAZObjectArg(
options=["a2a"],
help="A2A",
)
provider_specific_input.hyper_v_replica_azure = AAZObjectArg(
options=["hyper-v-replica-azure"],
)
provider_specific_input.in_mage_rcm = AAZObjectArg(
options=["in-mage-rcm"],
)
provider_specific_input.vmware_cbt = AAZObjectArg(
options=["vmware-cbt"],
help="vmware-cbt",
)
a2a = cls._args_schema.provider_specific_input.a2a
a2a.agent_auto_update_status = AAZStrArg(
options=["agent-auto-update-status"],
help="A value indicating whether the auto update is enabled.",
enum={"Disabled": "Disabled", "Enabled": "Enabled"},
)
a2a.automation_account_arm_id = AAZStrArg(
options=["automation-account-arm-id"],
help="The automation account arm id.",
)
a2a.automation_account_authentication_type = AAZStrArg(
options=["automation-account-authentication-type"],
help="A value indicating the type authentication to use for automation Account.",
default="RunAsAccount",
enum={"RunAsAccount": "RunAsAccount", "SystemAssignedIdentity": "SystemAssignedIdentity"},
)
hyper_v_replica_azure = cls._args_schema.provider_specific_input.hyper_v_replica_azure
hyper_v_replica_azure.location = AAZStrArg(
options=["location"],
help="The Location.",
)
in_mage_rcm = cls._args_schema.provider_specific_input.in_mage_rcm
in_mage_rcm.enable_agent_auto_upgrade = AAZStrArg(
options=["enable-agent-auto-upgrade"],
help="A value indicating whether agent auto upgrade has to be enabled.",
required=True,
)
vmware_cbt = cls._args_schema.provider_specific_input.vmware_cbt
vmware_cbt.key_vault_id = AAZStrArg(
options=["key-vault-id"],
help="The target key vault ARM Id.",
)
vmware_cbt.key_vault_uri = AAZStrArg(
options=["key-vault-uri"],
help="The target key vault URL.",
)
vmware_cbt.service_bus_connection_string_secret_name = AAZStrArg(
options=["service-bus-connection-string-secret-name"],
help="The secret name of the service bus connection string.",
)
vmware_cbt.storage_account_id = AAZStrArg(
options=["storage-account-id"],
help="The storage account ARM Id.",
required=True,
)
vmware_cbt.storage_account_sas_secret_name = AAZStrArg(
options=["storage-account-sas-secret-name"],
help="The secret name of the storage account.",
)
vmware_cbt.target_location = AAZStrArg(
options=["target-location"],
help="The target location.",
required=True,
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectionContainerMappingsCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainerMappingsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"mappingName", self.ctx.args.mapping_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("policyId", AAZStrType, ".policy_id")
properties.set_prop("providerSpecificInput", AAZObjectType, ".provider_specific_input")
properties.set_prop("targetProtectionContainerId", AAZStrType, ".target_protection_container_id")
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
provider_specific_input.set_const("instanceType", "HyperVReplicaAzure", AAZStrType, ".hyper_v_replica_azure", typ_kwargs={"flags": {"required": True}})
provider_specific_input.set_const("instanceType", "InMageRcm", AAZStrType, ".in_mage_rcm", typ_kwargs={"flags": {"required": True}})
provider_specific_input.set_const("instanceType", "VMwareCbt", AAZStrType, ".vmware_cbt", typ_kwargs={"flags": {"required": True}})
provider_specific_input.discriminate_by("instanceType", "A2A")
provider_specific_input.discriminate_by("instanceType", "HyperVReplicaAzure")
provider_specific_input.discriminate_by("instanceType", "InMageRcm")
provider_specific_input.discriminate_by("instanceType", "VMwareCbt")
disc_a2_a = _builder.get(".properties.providerSpecificInput{instanceType:A2A}")
if disc_a2_a is not None:
disc_a2_a.set_prop("agentAutoUpdateStatus", AAZStrType, ".a2a.agent_auto_update_status")
disc_a2_a.set_prop("automationAccountArmId", AAZStrType, ".a2a.automation_account_arm_id")
disc_a2_a.set_prop("automationAccountAuthenticationType", AAZStrType, ".a2a.automation_account_authentication_type")
disc_hyper_v_replica_azure = _builder.get(".properties.providerSpecificInput{instanceType:HyperVReplicaAzure}")
if disc_hyper_v_replica_azure is not None:
disc_hyper_v_replica_azure.set_prop("location", AAZStrType, ".hyper_v_replica_azure.location")
disc_in_mage_rcm = _builder.get(".properties.providerSpecificInput{instanceType:InMageRcm}")
if disc_in_mage_rcm is not None:
disc_in_mage_rcm.set_prop("enableAgentAutoUpgrade", AAZStrType, ".in_mage_rcm.enable_agent_auto_upgrade", typ_kwargs={"flags": {"required": True}})
disc_v_mware_cbt = _builder.get(".properties.providerSpecificInput{instanceType:VMwareCbt}")
if disc_v_mware_cbt is not None:
disc_v_mware_cbt.set_prop("keyVaultId", AAZStrType, ".vmware_cbt.key_vault_id")
disc_v_mware_cbt.set_prop("keyVaultUri", AAZStrType, ".vmware_cbt.key_vault_uri")
disc_v_mware_cbt.set_prop("serviceBusConnectionStringSecretName", AAZStrType, ".vmware_cbt.service_bus_connection_string_secret_name")
disc_v_mware_cbt.set_prop("storageAccountId", AAZStrType, ".vmware_cbt.storage_account_id", typ_kwargs={"flags": {"required": True}})
disc_v_mware_cbt.set_prop("storageAccountSasSecretName", AAZStrType, ".vmware_cbt.storage_account_sas_secret_name")
disc_v_mware_cbt.set_prop("targetLocation", AAZStrType, ".vmware_cbt.target_location", typ_kwargs={"flags": {"required": True}})
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.health = AAZStrType()
properties.health_error_details = AAZListType(
serialized_name="healthErrorDetails",
)
properties.policy_friendly_name = AAZStrType(
serialized_name="policyFriendlyName",
)
properties.policy_id = AAZStrType(
serialized_name="policyId",
)
properties.provider_specific_details = AAZObjectType(
serialized_name="providerSpecificDetails",
)
properties.source_fabric_friendly_name = AAZStrType(
serialized_name="sourceFabricFriendlyName",
)
properties.source_protection_container_friendly_name = AAZStrType(
serialized_name="sourceProtectionContainerFriendlyName",
)
properties.state = AAZStrType()
properties.target_fabric_friendly_name = AAZStrType(
serialized_name="targetFabricFriendlyName",
)
properties.target_protection_container_friendly_name = AAZStrType(
serialized_name="targetProtectionContainerFriendlyName",
)
properties.target_protection_container_id = AAZStrType(
serialized_name="targetProtectionContainerId",
)
health_error_details = cls._schema_on_200.properties.health_error_details
health_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.health_error_details.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = cls._schema_on_200.properties.health_error_details.Element.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = cls._schema_on_200.properties.health_error_details.Element.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
provider_specific_details = cls._schema_on_200.properties.provider_specific_details
provider_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A")
disc_a2_a.agent_auto_update_status = AAZStrType(
serialized_name="agentAutoUpdateStatus",
)
disc_a2_a.automation_account_arm_id = AAZStrType(
serialized_name="automationAccountArmId",
)
disc_a2_a.automation_account_authentication_type = AAZStrType(
serialized_name="automationAccountAuthenticationType",
)
disc_a2_a.job_schedule_name = AAZStrType(
serialized_name="jobScheduleName",
)
disc_a2_a.schedule_name = AAZStrType(
serialized_name="scheduleName",
)
disc_in_mage_rcm = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm")
disc_in_mage_rcm.enable_agent_auto_upgrade = AAZStrType(
serialized_name="enableAgentAutoUpgrade",
flags={"read_only": True},
)
disc_v_mware_cbt = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt")
disc_v_mware_cbt.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
disc_v_mware_cbt.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"read_only": True},
)
disc_v_mware_cbt.role_size_to_nic_count_map = AAZDictType(
serialized_name="roleSizeToNicCountMap",
flags={"read_only": True},
)
disc_v_mware_cbt.service_bus_connection_string_secret_name = AAZStrType(
serialized_name="serviceBusConnectionStringSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_id = AAZStrType(
serialized_name="storageAccountId",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_sas_secret_name = AAZStrType(
serialized_name="storageAccountSasSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.target_location = AAZStrType(
serialized_name="targetLocation",
flags={"read_only": True},
)
role_size_to_nic_count_map = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt").role_size_to_nic_count_map
role_size_to_nic_count_map.Element = AAZIntType()
return cls._schema_on_200
|
class Create(AAZCommand):
'''Create operation to create a protection container mapping.
:example: protection-container mapping create for A2A
az site-recovery protection-container mapping create -g rg --fabric-name fabric1_name -n container_mapping1_name --protection-container container1_name --vault-name vault_name --policy-id policy_id --provider-input '{a2a:{agent-auto-update-status:Disabled}}' --target-container container2_id
:example: protection-container mapping create for H2A
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container "Microsoft Azure" --provider-input '{hyper-v-replica-azure:""}'
:example: protection-container mapping create for V2A RCM
az site-recovery protection-container mapping create -g "rg" --fabric-name "fabric_name" -n "container_mapping_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --target-container "Microsoft Azure" --provider-input '{in-mage-rcm:{enable-agent-auto-upgrade:true}}'
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainerMappingsCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 29 | 1 | 30 | 2 | 28 | 0 | 2 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 538 | 54 | 474 | 65 | 445 | 10 | 198 | 53 | 180 | 7 | 1 | 1 | 26 |
9,153 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/management_group/_update.py
|
azext_network_manager.aaz.latest.network.manager.connection.management_group._update.Update.ManagementGroupNetworkManagerConnectionsCreateOrUpdate
|
class ManagementGroupNetworkManagerConnectionsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"managementGroupId", self.ctx.args.management_group_id,
required=True,
),
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_UpdateHelper._build_schema_network_manager_connection_read(
cls._schema_on_200_201)
return cls._schema_on_200_201
|
class ManagementGroupNetworkManagerConnectionsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 7 | 0 | 6 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 9 | 0 | 10 | 10 | 90 | 15 | 75 | 28 | 56 | 0 | 36 | 20 | 25 | 2 | 1 | 1 | 12 |
9,154 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_delete.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._delete.Delete
|
class Delete(AAZCommand):
"""Delete operation to purge(force delete) a protection container mapping.
:example: protection-container mapping delete
az site-recovery protection-container mapping delete -g rg --fabric-name fabric1_name -n container_mapping1_name --protection-container container1_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotectioncontainermappings/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, None)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.mapping_name = AAZStrArg(
options=["-n", "--name", "--mapping-name"],
help="Protection container mapping name.",
required=True,
id_part="child_name_3",
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectionContainerMappingsPurge(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationProtectionContainerMappingsPurge(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"mappingName", self.ctx.args.mapping_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class Delete(AAZCommand):
'''Delete operation to purge(force delete) a protection container mapping.
:example: protection-container mapping delete
az site-recovery protection-container mapping delete -g rg --fabric-name fabric1_name -n container_mapping1_name --protection-container container1_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationProtectionContainerMappingsPurge(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 23 | 1 | 10 | 0 | 10 | 0 | 1 | 0.03 | 1 | 2 | 1 | 0 | 4 | 0 | 5 | 5 | 169 | 21 | 143 | 33 | 120 | 5 | 54 | 24 | 39 | 4 | 1 | 1 | 17 |
9,155 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_remove.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._remove.Remove
|
class Remove(AAZCommand):
"""The operation to delete or remove a protection container mapping.
:example: protection-container mapping remove
az site-recovery protection-container mapping remove -g rg --fabric-name fabric_source_name -n container_mapping_source_name --protection-container container_source_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotectioncontainermappings/{}/remove", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, None)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.mapping_name = AAZStrArg(
options=["-n", "--name", "--mapping-name"],
help="Protection container mapping name.",
required=True,
id_part="child_name_3",
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.provider_specific_input = AAZObjectArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="Provider specific input for unpairing.",
)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.instance_type = AAZStrArg(
options=["instance-type"],
help="The class type.",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationProtectionContainerMappingsDelete(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationProtectionContainerMappingsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}/remove",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"mappingName", self.ctx.args.mapping_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("providerSpecificInput", AAZObjectType, ".provider_specific_input")
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_prop("instanceType", AAZStrType, ".instance_type")
return self.serialize_content(_content_value)
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class Remove(AAZCommand):
'''The operation to delete or remove a protection container mapping.
:example: protection-container mapping remove
az site-recovery protection-container mapping remove -g rg --fabric-name fabric_source_name -n container_mapping_source_name --protection-container container_source_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationProtectionContainerMappingsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 27 | 1 | 11 | 1 | 10 | 0 | 1 | 0.03 | 1 | 2 | 1 | 0 | 4 | 0 | 5 | 5 | 212 | 29 | 177 | 42 | 150 | 6 | 71 | 31 | 54 | 4 | 1 | 1 | 21 |
9,156 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_services_provider/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_services_provider._list._ListHelper
|
class _ListHelper:
"""Helper class for List"""
_schema_identity_provider_details_read = None
@classmethod
def _build_schema_identity_provider_details_read(cls, _schema):
if cls._schema_identity_provider_details_read is not None:
_schema.aad_authority = cls._schema_identity_provider_details_read.aad_authority
_schema.application_id = cls._schema_identity_provider_details_read.application_id
_schema.audience = cls._schema_identity_provider_details_read.audience
_schema.object_id = cls._schema_identity_provider_details_read.object_id
_schema.tenant_id = cls._schema_identity_provider_details_read.tenant_id
return
cls._schema_identity_provider_details_read = _schema_identity_provider_details_read = AAZObjectType()
identity_provider_details_read = _schema_identity_provider_details_read
identity_provider_details_read.aad_authority = AAZStrType(
serialized_name="aadAuthority",
)
identity_provider_details_read.application_id = AAZStrType(
serialized_name="applicationId",
)
identity_provider_details_read.audience = AAZStrType()
identity_provider_details_read.object_id = AAZStrType(
serialized_name="objectId",
)
identity_provider_details_read.tenant_id = AAZStrType(
serialized_name="tenantId",
)
_schema.aad_authority = cls._schema_identity_provider_details_read.aad_authority
_schema.application_id = cls._schema_identity_provider_details_read.application_id
_schema.audience = cls._schema_identity_provider_details_read.audience
_schema.object_id = cls._schema_identity_provider_details_read.object_id
_schema.tenant_id = cls._schema_identity_provider_details_read.tenant_id
|
class _ListHelper:
'''Helper class for List'''
@classmethod
def _build_schema_identity_provider_details_read(cls, _schema):
pass
| 3 | 1 | 31 | 3 | 28 | 0 | 2 | 0.03 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 37 | 5 | 31 | 6 | 28 | 1 | 22 | 4 | 20 | 2 | 0 | 1 | 2 |
9,157 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_services_provider/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_services_provider._list.List
|
class List(AAZCommand):
"""List the registered recovery services providers for the specified fabric.
:example: recovery-services-provider list for v2arcm
az site-recovery recovery-services-provider list --fabric-name "fabric_name" -g "rg" --vault-name "vault_name"
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationrecoveryservicesproviders", "2022-08-01"],
]
}
AZ_SUPPORT_PAGINATION = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationRecoveryServicesProvidersListByReplicationFabrics(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link
class ReplicationRecoveryServicesProvidersListByReplicationFabrics(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationRecoveryServicesProviders",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.allowed_scenarios = AAZListType(
serialized_name="allowedScenarios",
)
properties.authentication_identity_details = AAZObjectType(
serialized_name="authenticationIdentityDetails",
)
_ListHelper._build_schema_identity_provider_details_read(properties.authentication_identity_details)
properties.bios_id = AAZStrType(
serialized_name="biosId",
)
properties.connection_status = AAZStrType(
serialized_name="connectionStatus",
)
properties.data_plane_authentication_identity_details = AAZObjectType(
serialized_name="dataPlaneAuthenticationIdentityDetails",
)
_ListHelper._build_schema_identity_provider_details_read(properties.data_plane_authentication_identity_details)
properties.dra_identifier = AAZStrType(
serialized_name="draIdentifier",
)
properties.fabric_friendly_name = AAZStrType(
serialized_name="fabricFriendlyName",
)
properties.fabric_type = AAZStrType(
serialized_name="fabricType",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.health_error_details = AAZListType(
serialized_name="healthErrorDetails",
)
properties.last_heart_beat = AAZStrType(
serialized_name="lastHeartBeat",
)
properties.machine_id = AAZStrType(
serialized_name="machineId",
)
properties.machine_name = AAZStrType(
serialized_name="machineName",
)
properties.protected_item_count = AAZIntType(
serialized_name="protectedItemCount",
)
properties.provider_version = AAZStrType(
serialized_name="providerVersion",
)
properties.provider_version_details = AAZObjectType(
serialized_name="providerVersionDetails",
)
properties.provider_version_expiry_date = AAZStrType(
serialized_name="providerVersionExpiryDate",
)
properties.provider_version_state = AAZStrType(
serialized_name="providerVersionState",
)
properties.resource_access_identity_details = AAZObjectType(
serialized_name="resourceAccessIdentityDetails",
)
_ListHelper._build_schema_identity_provider_details_read(properties.resource_access_identity_details)
properties.server_version = AAZStrType(
serialized_name="serverVersion",
)
allowed_scenarios = cls._schema_on_200.value.Element.properties.allowed_scenarios
allowed_scenarios.Element = AAZStrType()
health_error_details = cls._schema_on_200.value.Element.properties.health_error_details
health_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.health_error_details.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = cls._schema_on_200.value.Element.properties.health_error_details.Element.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.health_error_details.Element.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
provider_version_details = cls._schema_on_200.value.Element.properties.provider_version_details
provider_version_details.expiry_date = AAZStrType(
serialized_name="expiryDate",
)
provider_version_details.status = AAZStrType()
provider_version_details.version = AAZStrType()
return cls._schema_on_200
|
class List(AAZCommand):
'''List the registered recovery services providers for the specified fabric.
:example: recovery-services-provider list for v2arcm
az site-recovery recovery-services-provider list --fabric-name "fabric_name" -g "rg" --vault-name "vault_name"
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationRecoveryServicesProvidersListByReplicationFabrics(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 20 | 1 | 19 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 343 | 36 | 302 | 49 | 275 | 5 | 136 | 39 | 119 | 2 | 1 | 1 | 18 |
9,158 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_services_provider/__cmd_group.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_services_provider.__cmd_group.__CMDGroup
|
class __CMDGroup(AAZCommandGroup):
"""Manage fabric recovery-services-provider
"""
pass
|
class __CMDGroup(AAZCommandGroup):
'''Manage fabric recovery-services-provider
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,159 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/subscription/_delete.py
|
azext_network_manager.aaz.latest.network.manager.connection.subscription._delete.Delete.SubscriptionNetworkManagerConnectionsDelete
|
class SubscriptionNetworkManagerConnectionsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class SubscriptionNetworkManagerConnectionsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 57 | 9 | 48 | 19 | 34 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
9,160 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._update._UpdateHelper
|
class _UpdateHelper:
"""Helper class for Update"""
@classmethod
def _build_schema_extended_location_update(cls, _builder):
if _builder is None:
return
_builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}})
@classmethod
def _build_schema_recovery_plan_action_update(cls, _builder):
if _builder is None:
return
_builder.set_prop("actionName", AAZStrType, ".action_name", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("customDetails", AAZObjectType, ".custom_details", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("failoverDirections", AAZListType, ".failover_directions", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("failoverTypes", AAZListType, ".failover_types", typ_kwargs={"flags": {"required": True}})
custom_details = _builder.get(".customDetails")
if custom_details is not None:
custom_details.set_const("instanceType", "AutomationRunbookActionDetails", AAZStrType, ".automation_runbook_action_details", typ_kwargs={"flags": {"required": True}})
custom_details.set_const("instanceType", "ManualActionDetails", AAZStrType, ".manual_action_details", typ_kwargs={"flags": {"required": True}})
custom_details.set_const("instanceType", "ScriptActionDetails", AAZStrType, ".script_action_details", typ_kwargs={"flags": {"required": True}})
custom_details.discriminate_by("instanceType", "AutomationRunbookActionDetails")
custom_details.discriminate_by("instanceType", "ManualActionDetails")
custom_details.discriminate_by("instanceType", "ScriptActionDetails")
disc_automation_runbook_action_details = _builder.get(".customDetails{instanceType:AutomationRunbookActionDetails}")
if disc_automation_runbook_action_details is not None:
disc_automation_runbook_action_details.set_prop("fabricLocation", AAZStrType, ".automation_runbook_action_details.fabric_location", typ_kwargs={"flags": {"required": True}})
disc_automation_runbook_action_details.set_prop("runbookId", AAZStrType, ".automation_runbook_action_details.runbook_id")
disc_automation_runbook_action_details.set_prop("timeout", AAZStrType, ".automation_runbook_action_details.timeout")
disc_manual_action_details = _builder.get(".customDetails{instanceType:ManualActionDetails}")
if disc_manual_action_details is not None:
disc_manual_action_details.set_prop("description", AAZStrType, ".manual_action_details.description")
disc_script_action_details = _builder.get(".customDetails{instanceType:ScriptActionDetails}")
if disc_script_action_details is not None:
disc_script_action_details.set_prop("fabricLocation", AAZStrType, ".script_action_details.fabric_location", typ_kwargs={"flags": {"required": True}})
disc_script_action_details.set_prop("path", AAZStrType, ".script_action_details.path", typ_kwargs={"flags": {"required": True}})
disc_script_action_details.set_prop("timeout", AAZStrType, ".script_action_details.timeout")
failover_directions = _builder.get(".failoverDirections")
if failover_directions is not None:
failover_directions.set_elements(AAZStrType, ".")
failover_types = _builder.get(".failoverTypes")
if failover_types is not None:
failover_types.set_elements(AAZStrType, ".")
_schema_recovery_plan_action_read = None
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
if cls._schema_recovery_plan_action_read is not None:
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
return
cls._schema_recovery_plan_action_read = _schema_recovery_plan_action_read = AAZObjectType()
recovery_plan_action_read = _schema_recovery_plan_action_read
recovery_plan_action_read.action_name = AAZStrType(
serialized_name="actionName",
flags={"required": True},
)
recovery_plan_action_read.custom_details = AAZObjectType(
serialized_name="customDetails",
flags={"required": True},
)
recovery_plan_action_read.failover_directions = AAZListType(
serialized_name="failoverDirections",
flags={"required": True},
)
recovery_plan_action_read.failover_types = AAZListType(
serialized_name="failoverTypes",
flags={"required": True},
)
custom_details = _schema_recovery_plan_action_read.custom_details
custom_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_automation_runbook_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "AutomationRunbookActionDetails")
disc_automation_runbook_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_automation_runbook_action_details.runbook_id = AAZStrType(
serialized_name="runbookId",
)
disc_automation_runbook_action_details.timeout = AAZStrType()
disc_manual_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ManualActionDetails")
disc_manual_action_details.description = AAZStrType()
disc_script_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ScriptActionDetails")
disc_script_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_script_action_details.path = AAZStrType(
flags={"required": True},
)
disc_script_action_details.timeout = AAZStrType()
failover_directions = _schema_recovery_plan_action_read.failover_directions
failover_directions.Element = AAZStrType()
failover_types = _schema_recovery_plan_action_read.failover_types
failover_types.Element = AAZStrType()
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
_schema_recovery_plan_read = None
@classmethod
def _build_schema_recovery_plan_read(cls, _schema):
if cls._schema_recovery_plan_read is not None:
_schema.id = cls._schema_recovery_plan_read.id
_schema.location = cls._schema_recovery_plan_read.location
_schema.name = cls._schema_recovery_plan_read.name
_schema.properties = cls._schema_recovery_plan_read.properties
_schema.type = cls._schema_recovery_plan_read.type
return
cls._schema_recovery_plan_read = _schema_recovery_plan_read = AAZObjectType()
recovery_plan_read = _schema_recovery_plan_read
recovery_plan_read.id = AAZStrType(
flags={"read_only": True},
)
recovery_plan_read.location = AAZStrType()
recovery_plan_read.name = AAZStrType(
flags={"read_only": True},
)
recovery_plan_read.properties = AAZObjectType()
recovery_plan_read.type = AAZStrType(
flags={"read_only": True},
)
properties = _schema_recovery_plan_read.properties
properties.allowed_operations = AAZListType(
serialized_name="allowedOperations",
)
properties.current_scenario = AAZObjectType(
serialized_name="currentScenario",
)
properties.current_scenario_status = AAZStrType(
serialized_name="currentScenarioStatus",
)
properties.current_scenario_status_description = AAZStrType(
serialized_name="currentScenarioStatusDescription",
)
properties.failover_deployment_model = AAZStrType(
serialized_name="failoverDeploymentModel",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.groups = AAZListType()
properties.last_planned_failover_time = AAZStrType(
serialized_name="lastPlannedFailoverTime",
)
properties.last_test_failover_time = AAZStrType(
serialized_name="lastTestFailoverTime",
)
properties.last_unplanned_failover_time = AAZStrType(
serialized_name="lastUnplannedFailoverTime",
)
properties.primary_fabric_friendly_name = AAZStrType(
serialized_name="primaryFabricFriendlyName",
)
properties.primary_fabric_id = AAZStrType(
serialized_name="primaryFabricId",
)
properties.provider_specific_details = AAZListType(
serialized_name="providerSpecificDetails",
)
properties.recovery_fabric_friendly_name = AAZStrType(
serialized_name="recoveryFabricFriendlyName",
)
properties.recovery_fabric_id = AAZStrType(
serialized_name="recoveryFabricId",
)
properties.replication_providers = AAZListType(
serialized_name="replicationProviders",
)
allowed_operations = _schema_recovery_plan_read.properties.allowed_operations
allowed_operations.Element = AAZStrType()
current_scenario = _schema_recovery_plan_read.properties.current_scenario
current_scenario.job_id = AAZStrType(
serialized_name="jobId",
)
current_scenario.scenario_name = AAZStrType(
serialized_name="scenarioName",
)
current_scenario.start_time = AAZStrType(
serialized_name="startTime",
)
groups = _schema_recovery_plan_read.properties.groups
groups.Element = AAZObjectType()
_element = _schema_recovery_plan_read.properties.groups.Element
_element.end_group_actions = AAZListType(
serialized_name="endGroupActions",
)
_element.group_type = AAZStrType(
serialized_name="groupType",
flags={"required": True},
)
_element.replication_protected_items = AAZListType(
serialized_name="replicationProtectedItems",
)
_element.start_group_actions = AAZListType(
serialized_name="startGroupActions",
)
end_group_actions = _schema_recovery_plan_read.properties.groups.Element.end_group_actions
end_group_actions.Element = AAZObjectType()
cls._build_schema_recovery_plan_action_read(end_group_actions.Element)
replication_protected_items = _schema_recovery_plan_read.properties.groups.Element.replication_protected_items
replication_protected_items.Element = AAZObjectType()
_element = _schema_recovery_plan_read.properties.groups.Element.replication_protected_items.Element
_element.id = AAZStrType()
_element.virtual_machine_id = AAZStrType(
serialized_name="virtualMachineId",
)
start_group_actions = _schema_recovery_plan_read.properties.groups.Element.start_group_actions
start_group_actions.Element = AAZObjectType()
cls._build_schema_recovery_plan_action_read(start_group_actions.Element)
provider_specific_details = _schema_recovery_plan_read.properties.provider_specific_details
provider_specific_details.Element = AAZObjectType()
_element = _schema_recovery_plan_read.properties.provider_specific_details.Element
_element.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = _schema_recovery_plan_read.properties.provider_specific_details.Element.discriminate_by("instance_type", "A2A")
disc_a2_a.primary_zone = AAZStrType(
serialized_name="primaryZone",
)
disc_a2_a.recovery_zone = AAZStrType(
serialized_name="recoveryZone",
)
replication_providers = _schema_recovery_plan_read.properties.replication_providers
replication_providers.Element = AAZStrType()
_schema.id = cls._schema_recovery_plan_read.id
_schema.location = cls._schema_recovery_plan_read.location
_schema.name = cls._schema_recovery_plan_read.name
_schema.properties = cls._schema_recovery_plan_read.properties
_schema.type = cls._schema_recovery_plan_read.type
|
class _UpdateHelper:
'''Helper class for Update'''
@classmethod
def _build_schema_extended_location_update(cls, _builder):
pass
@classmethod
def _build_schema_recovery_plan_action_update(cls, _builder):
pass
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
pass
@classmethod
def _build_schema_recovery_plan_read(cls, _schema):
pass
| 9 | 1 | 65 | 8 | 57 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 | 272 | 37 | 234 | 38 | 225 | 1 | 145 | 32 | 140 | 8 | 0 | 1 | 14 |
9,161 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._update.Update
|
class Update(AAZCommand):
"""Update operation to create a recovery plan.
:example: recovery-plan update
az site-recovery recovery-plan update -n recovery_plan_name -g rg --vault-name vault_name --groups '[{group-type:Boot,replication-protected-items:[{id:protected_item_id,virtual-machine-id:vm_id}]}]' --primary-fabric-id fabric1_id --recovery-fabric-id fabric2_id --failover-deployment-model ResourceManager
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationrecoveryplans/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
AZ_SUPPORT_GENERIC_UPDATE = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.recovery_plan_name = AAZStrArg(
options=["-n", "--name", "--recovery-plan-name"],
help="Name of the recovery plan.",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.failover_deployment_model = AAZStrArg(
options=["--failover-deploy-model", "--failover-deployment-model"],
arg_group="Properties",
help="The failover deployment model.",
nullable=True,
enum={"Classic": "Classic", "NotApplicable": "NotApplicable", "ResourceManager": "ResourceManager"},
)
_args_schema.groups = AAZListArg(
options=["--groups"],
arg_group="Properties",
help="The recovery plan groups.",
)
_args_schema.primary_fabric_id = AAZStrArg(
options=["--primary-fabric-id"],
arg_group="Properties",
help="The primary fabric Id.",
)
_args_schema.provider_specific_input = AAZListArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="The provider specific input.",
nullable=True,
)
_args_schema.recovery_fabric_id = AAZStrArg(
options=["--recovery-fabric-id"],
arg_group="Properties",
help="The recovery fabric Id.",
)
groups = cls._args_schema.groups
groups.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.groups.Element
_element.end_group_actions = AAZListArg(
options=["end-group-actions"],
help="The end group actions.",
nullable=True,
)
_element.group_type = AAZStrArg(
options=["group-type"],
help="The group type.",
enum={"Boot": "Boot", "Failover": "Failover", "Shutdown": "Shutdown"},
)
_element.replication_protected_items = AAZListArg(
options=["replication-protected-items"],
help="The list of protected items.",
nullable=True,
)
_element.start_group_actions = AAZListArg(
options=["start-group-actions"],
help="The start group actions.",
nullable=True,
)
end_group_actions = cls._args_schema.groups.Element.end_group_actions
end_group_actions.Element = AAZObjectArg(
nullable=True,
)
cls._build_args_recovery_plan_action_update(end_group_actions.Element)
replication_protected_items = cls._args_schema.groups.Element.replication_protected_items
replication_protected_items.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.groups.Element.replication_protected_items.Element
_element.id = AAZStrArg(
options=["id"],
help="The ARM Id of the recovery plan protected item.",
nullable=True,
)
_element.virtual_machine_id = AAZStrArg(
options=["virtual-machine-id"],
help="The virtual machine Id.",
nullable=True,
)
start_group_actions = cls._args_schema.groups.Element.start_group_actions
start_group_actions.Element = AAZObjectArg(
nullable=True,
)
cls._build_args_recovery_plan_action_update(start_group_actions.Element)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.Element = AAZObjectArg(
nullable=True,
)
_element = cls._args_schema.provider_specific_input.Element
_element.a2a = AAZObjectArg(
options=["a2a"],
help="a2a",
)
a2a = cls._args_schema.provider_specific_input.Element.a2a
a2a.primary_extended_location = AAZObjectArg(
options=["primary-extended-location"],
help="The primary extended location.",
nullable=True,
)
cls._build_args_extended_location_update(a2a.primary_extended_location)
a2a.primary_zone = AAZStrArg(
options=["primary-zone"],
help="The primary zone.",
nullable=True,
)
a2a.recovery_extended_location = AAZObjectArg(
options=["recovery-extended-location"],
help="The recovery extended location.",
nullable=True,
)
cls._build_args_extended_location_update(a2a.recovery_extended_location)
a2a.recovery_zone = AAZStrArg(
options=["recovery-zone"],
help="The recovery zone.",
nullable=True,
)
return cls._args_schema
_args_extended_location_update = None
@classmethod
def _build_args_extended_location_update(cls, _schema):
if cls._args_extended_location_update is not None:
_schema.name = cls._args_extended_location_update.name
_schema.type = cls._args_extended_location_update.type
return
cls._args_extended_location_update = AAZObjectArg(
nullable=True,
)
extended_location_update = cls._args_extended_location_update
extended_location_update.name = AAZStrArg(
options=["name"],
help="The name of the extended location.",
)
extended_location_update.type = AAZStrArg(
options=["type"],
help="The extended location type.",
enum={"EdgeZone": "EdgeZone"},
)
_schema.name = cls._args_extended_location_update.name
_schema.type = cls._args_extended_location_update.type
_args_recovery_plan_action_update = None
@classmethod
def _build_args_recovery_plan_action_update(cls, _schema):
if cls._args_recovery_plan_action_update is not None:
_schema.action_name = cls._args_recovery_plan_action_update.action_name
_schema.custom_details = cls._args_recovery_plan_action_update.custom_details
_schema.failover_directions = cls._args_recovery_plan_action_update.failover_directions
_schema.failover_types = cls._args_recovery_plan_action_update.failover_types
return
cls._args_recovery_plan_action_update = AAZObjectArg(
nullable=True,
)
recovery_plan_action_update = cls._args_recovery_plan_action_update
recovery_plan_action_update.action_name = AAZStrArg(
options=["action-name"],
help="The action name.",
)
recovery_plan_action_update.custom_details = AAZObjectArg(
options=["custom-details"],
help="The custom details.",
)
recovery_plan_action_update.failover_directions = AAZListArg(
options=["failover-directions"],
help="The list of failover directions.",
)
recovery_plan_action_update.failover_types = AAZListArg(
options=["failover-types"],
help="The list of failover types.",
)
custom_details = cls._args_recovery_plan_action_update.custom_details
custom_details.automation_runbook_action_details = AAZObjectArg(
options=["automation-runbook-action-details"],
)
custom_details.manual_action_details = AAZObjectArg(
options=["manual-action-details"],
)
custom_details.script_action_details = AAZObjectArg(
options=["script-action-details"],
)
automation_runbook_action_details = cls._args_recovery_plan_action_update.custom_details.automation_runbook_action_details
automation_runbook_action_details.fabric_location = AAZStrArg(
options=["fabric-location"],
help="The fabric location.",
enum={"Primary": "Primary", "Recovery": "Recovery"},
)
automation_runbook_action_details.runbook_id = AAZStrArg(
options=["runbook-id"],
help="The runbook ARM Id.",
nullable=True,
)
automation_runbook_action_details.timeout = AAZStrArg(
options=["timeout"],
help="The runbook timeout.",
nullable=True,
)
manual_action_details = cls._args_recovery_plan_action_update.custom_details.manual_action_details
manual_action_details.description = AAZStrArg(
options=["description"],
help="The manual action description.",
nullable=True,
)
script_action_details = cls._args_recovery_plan_action_update.custom_details.script_action_details
script_action_details.fabric_location = AAZStrArg(
options=["fabric-location"],
help="The fabric location.",
enum={"Primary": "Primary", "Recovery": "Recovery"},
)
script_action_details.path = AAZStrArg(
options=["path"],
help="The script path.",
)
script_action_details.timeout = AAZStrArg(
options=["timeout"],
help="The script timeout.",
nullable=True,
)
failover_directions = cls._args_recovery_plan_action_update.failover_directions
failover_directions.Element = AAZStrArg(
nullable=True,
enum={"PrimaryToRecovery": "PrimaryToRecovery", "RecoveryToPrimary": "RecoveryToPrimary"},
)
failover_types = cls._args_recovery_plan_action_update.failover_types
failover_types.Element = AAZStrArg(
nullable=True,
enum={"CancelFailover": "CancelFailover", "ChangePit": "ChangePit", "Commit": "Commit", "CompleteMigration": "CompleteMigration", "DisableProtection": "DisableProtection", "Failback": "Failback", "FinalizeFailback": "FinalizeFailback", "PlannedFailover": "PlannedFailover", "RepairReplication": "RepairReplication", "ReverseReplicate": "ReverseReplicate", "SwitchProtection": "SwitchProtection", "TestFailover": "TestFailover", "TestFailoverCleanup": "TestFailoverCleanup", "UnplannedFailover": "UnplannedFailover"},
)
_schema.action_name = cls._args_recovery_plan_action_update.action_name
_schema.custom_details = cls._args_recovery_plan_action_update.custom_details
_schema.failover_directions = cls._args_recovery_plan_action_update.failover_directions
_schema.failover_types = cls._args_recovery_plan_action_update.failover_types
def _execute_operations(self):
self.pre_operations()
self.ReplicationRecoveryPlansGet(ctx=self.ctx)()
self.pre_instance_update(self.ctx.vars.instance)
self.InstanceUpdateByJson(ctx=self.ctx)()
self.InstanceUpdateByGeneric(ctx=self.ctx)()
self.post_instance_update(self.ctx.vars.instance)
yield self.ReplicationRecoveryPlansCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationRecoveryPlansGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"recoveryPlanName", self.ctx.args.recovery_plan_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_recovery_plan_read(cls._schema_on_200)
return cls._schema_on_200
class ReplicationRecoveryPlansCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"recoveryPlanName", self.ctx.args.recovery_plan_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_recovery_plan_read(cls._schema_on_200)
return cls._schema_on_200
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("failoverDeploymentModel", AAZStrType, ".failover_deployment_model")
properties.set_prop("groups", AAZListType, ".groups", typ_kwargs={"flags": {"required": True}})
properties.set_prop("primaryFabricId", AAZStrType, ".primary_fabric_id", typ_kwargs={"flags": {"required": True}})
properties.set_prop("providerSpecificInput", AAZListType, ".provider_specific_input")
properties.set_prop("recoveryFabricId", AAZStrType, ".recovery_fabric_id", typ_kwargs={"flags": {"required": True}})
groups = _builder.get(".properties.groups")
if groups is not None:
groups.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.groups[]")
if _elements is not None:
_elements.set_prop("endGroupActions", AAZListType, ".end_group_actions")
_elements.set_prop("groupType", AAZStrType, ".group_type", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("replicationProtectedItems", AAZListType, ".replication_protected_items")
_elements.set_prop("startGroupActions", AAZListType, ".start_group_actions")
end_group_actions = _builder.get(".properties.groups[].endGroupActions")
if end_group_actions is not None:
_UpdateHelper._build_schema_recovery_plan_action_update(end_group_actions.set_elements(AAZObjectType, "."))
replication_protected_items = _builder.get(".properties.groups[].replicationProtectedItems")
if replication_protected_items is not None:
replication_protected_items.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.groups[].replicationProtectedItems[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("virtualMachineId", AAZStrType, ".virtual_machine_id")
start_group_actions = _builder.get(".properties.groups[].startGroupActions")
if start_group_actions is not None:
_UpdateHelper._build_schema_recovery_plan_action_update(start_group_actions.set_elements(AAZObjectType, "."))
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificInput[]")
if _elements is not None:
_elements.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
_elements.discriminate_by("instanceType", "A2A")
disc_a2_a = _builder.get(".properties.providerSpecificInput[]{instanceType:A2A}")
if disc_a2_a is not None:
_UpdateHelper._build_schema_extended_location_update(disc_a2_a.set_prop("primaryExtendedLocation", AAZObjectType, ".a2a.primary_extended_location"))
disc_a2_a.set_prop("primaryZone", AAZStrType, ".a2a.primary_zone")
_UpdateHelper._build_schema_extended_location_update(disc_a2_a.set_prop("recoveryExtendedLocation", AAZObjectType, ".a2a.recovery_extended_location"))
disc_a2_a.set_prop("recoveryZone", AAZStrType, ".a2a.recovery_zone")
return _instance_value
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance_by_generic(
self.ctx.vars.instance,
self.ctx.generic_update_args
)
|
class Update(AAZCommand):
'''Update operation to create a recovery plan.
:example: recovery-plan update
az site-recovery recovery-plan update -n recovery_plan_name -g rg --vault-name vault_name --groups '[{group-type:Boot,replication-protected-items:[{id:protected_item_id,virtual-machine-id:vm_id}]}]' --primary-fabric-id fabric1_id --recovery-fabric-id fabric2_id --failover-deployment-model ResourceManager
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
@classmethod
def _build_args_extended_location_update(cls, _schema):
pass
@classmethod
def _build_args_recovery_plan_action_update(cls, _schema):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationRecoveryPlansGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class ReplicationRecoveryPlansCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
| 59 | 1 | 16 | 1 | 15 | 0 | 2 | 0.01 | 1 | 5 | 4 | 0 | 7 | 0 | 10 | 10 | 607 | 88 | 513 | 109 | 454 | 6 | 243 | 86 | 206 | 11 | 1 | 1 | 50 |
9,162 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_show.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._show._ShowHelper
|
class _ShowHelper:
"""Helper class for Show"""
_schema_recovery_plan_action_read = None
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
if cls._schema_recovery_plan_action_read is not None:
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
return
cls._schema_recovery_plan_action_read = _schema_recovery_plan_action_read = AAZObjectType()
recovery_plan_action_read = _schema_recovery_plan_action_read
recovery_plan_action_read.action_name = AAZStrType(
serialized_name="actionName",
flags={"required": True},
)
recovery_plan_action_read.custom_details = AAZObjectType(
serialized_name="customDetails",
flags={"required": True},
)
recovery_plan_action_read.failover_directions = AAZListType(
serialized_name="failoverDirections",
flags={"required": True},
)
recovery_plan_action_read.failover_types = AAZListType(
serialized_name="failoverTypes",
flags={"required": True},
)
custom_details = _schema_recovery_plan_action_read.custom_details
custom_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_automation_runbook_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "AutomationRunbookActionDetails")
disc_automation_runbook_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_automation_runbook_action_details.runbook_id = AAZStrType(
serialized_name="runbookId",
)
disc_automation_runbook_action_details.timeout = AAZStrType()
disc_manual_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ManualActionDetails")
disc_manual_action_details.description = AAZStrType()
disc_script_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ScriptActionDetails")
disc_script_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_script_action_details.path = AAZStrType(
flags={"required": True},
)
disc_script_action_details.timeout = AAZStrType()
failover_directions = _schema_recovery_plan_action_read.failover_directions
failover_directions.Element = AAZStrType()
failover_types = _schema_recovery_plan_action_read.failover_types
failover_types.Element = AAZStrType()
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
|
class _ShowHelper:
'''Helper class for Show'''
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
pass
| 3 | 1 | 67 | 9 | 58 | 0 | 2 | 0.02 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 73 | 11 | 61 | 12 | 58 | 1 | 35 | 10 | 33 | 2 | 0 | 1 | 2 |
9,163 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_show.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._show.Show
|
class Show(AAZCommand):
"""Get the details of the recovery plan.
:example: recovery-plan show
az site-recovery recovery-plan show -n recovery_plan_name -g rg --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationrecoveryplans/{}", "2022-08-01"],
]
}
def _handler(self, command_args):
super()._handler(command_args)
self._execute_operations()
return self._output()
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.recovery_plan_name = AAZStrArg(
options=["-n", "--name", "--recovery-plan-name"],
help="Name of the recovery plan.",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationRecoveryPlansGet(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationRecoveryPlansGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"recoveryPlanName", self.ctx.args.recovery_plan_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.allowed_operations = AAZListType(
serialized_name="allowedOperations",
)
properties.current_scenario = AAZObjectType(
serialized_name="currentScenario",
)
properties.current_scenario_status = AAZStrType(
serialized_name="currentScenarioStatus",
)
properties.current_scenario_status_description = AAZStrType(
serialized_name="currentScenarioStatusDescription",
)
properties.failover_deployment_model = AAZStrType(
serialized_name="failoverDeploymentModel",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.groups = AAZListType()
properties.last_planned_failover_time = AAZStrType(
serialized_name="lastPlannedFailoverTime",
)
properties.last_test_failover_time = AAZStrType(
serialized_name="lastTestFailoverTime",
)
properties.last_unplanned_failover_time = AAZStrType(
serialized_name="lastUnplannedFailoverTime",
)
properties.primary_fabric_friendly_name = AAZStrType(
serialized_name="primaryFabricFriendlyName",
)
properties.primary_fabric_id = AAZStrType(
serialized_name="primaryFabricId",
)
properties.provider_specific_details = AAZListType(
serialized_name="providerSpecificDetails",
)
properties.recovery_fabric_friendly_name = AAZStrType(
serialized_name="recoveryFabricFriendlyName",
)
properties.recovery_fabric_id = AAZStrType(
serialized_name="recoveryFabricId",
)
properties.replication_providers = AAZListType(
serialized_name="replicationProviders",
)
allowed_operations = cls._schema_on_200.properties.allowed_operations
allowed_operations.Element = AAZStrType()
current_scenario = cls._schema_on_200.properties.current_scenario
current_scenario.job_id = AAZStrType(
serialized_name="jobId",
)
current_scenario.scenario_name = AAZStrType(
serialized_name="scenarioName",
)
current_scenario.start_time = AAZStrType(
serialized_name="startTime",
)
groups = cls._schema_on_200.properties.groups
groups.Element = AAZObjectType()
_element = cls._schema_on_200.properties.groups.Element
_element.end_group_actions = AAZListType(
serialized_name="endGroupActions",
)
_element.group_type = AAZStrType(
serialized_name="groupType",
flags={"required": True},
)
_element.replication_protected_items = AAZListType(
serialized_name="replicationProtectedItems",
)
_element.start_group_actions = AAZListType(
serialized_name="startGroupActions",
)
end_group_actions = cls._schema_on_200.properties.groups.Element.end_group_actions
end_group_actions.Element = AAZObjectType()
_ShowHelper._build_schema_recovery_plan_action_read(end_group_actions.Element)
replication_protected_items = cls._schema_on_200.properties.groups.Element.replication_protected_items
replication_protected_items.Element = AAZObjectType()
_element = cls._schema_on_200.properties.groups.Element.replication_protected_items.Element
_element.id = AAZStrType()
_element.virtual_machine_id = AAZStrType(
serialized_name="virtualMachineId",
)
start_group_actions = cls._schema_on_200.properties.groups.Element.start_group_actions
start_group_actions.Element = AAZObjectType()
_ShowHelper._build_schema_recovery_plan_action_read(start_group_actions.Element)
provider_specific_details = cls._schema_on_200.properties.provider_specific_details
provider_specific_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.Element
_element.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.properties.provider_specific_details.Element.discriminate_by("instance_type", "A2A")
disc_a2_a.primary_zone = AAZStrType(
serialized_name="primaryZone",
)
disc_a2_a.recovery_zone = AAZStrType(
serialized_name="recoveryZone",
)
replication_providers = cls._schema_on_200.properties.replication_providers
replication_providers.Element = AAZStrType()
return cls._schema_on_200
|
class Show(AAZCommand):
'''Get the details of the recovery plan.
:example: recovery-plan show
az site-recovery recovery-plan show -n recovery_plan_name -g rg --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationRecoveryPlansGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 16 | 1 | 14 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 279 | 39 | 235 | 51 | 208 | 5 | 115 | 41 | 98 | 2 | 1 | 1 | 18 |
9,164 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._list._ListHelper
|
class _ListHelper:
"""Helper class for List"""
_schema_recovery_plan_action_read = None
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
if cls._schema_recovery_plan_action_read is not None:
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
return
cls._schema_recovery_plan_action_read = _schema_recovery_plan_action_read = AAZObjectType()
recovery_plan_action_read = _schema_recovery_plan_action_read
recovery_plan_action_read.action_name = AAZStrType(
serialized_name="actionName",
flags={"required": True},
)
recovery_plan_action_read.custom_details = AAZObjectType(
serialized_name="customDetails",
flags={"required": True},
)
recovery_plan_action_read.failover_directions = AAZListType(
serialized_name="failoverDirections",
flags={"required": True},
)
recovery_plan_action_read.failover_types = AAZListType(
serialized_name="failoverTypes",
flags={"required": True},
)
custom_details = _schema_recovery_plan_action_read.custom_details
custom_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_automation_runbook_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "AutomationRunbookActionDetails")
disc_automation_runbook_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_automation_runbook_action_details.runbook_id = AAZStrType(
serialized_name="runbookId",
)
disc_automation_runbook_action_details.timeout = AAZStrType()
disc_manual_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ManualActionDetails")
disc_manual_action_details.description = AAZStrType()
disc_script_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ScriptActionDetails")
disc_script_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_script_action_details.path = AAZStrType(
flags={"required": True},
)
disc_script_action_details.timeout = AAZStrType()
failover_directions = _schema_recovery_plan_action_read.failover_directions
failover_directions.Element = AAZStrType()
failover_types = _schema_recovery_plan_action_read.failover_types
failover_types.Element = AAZStrType()
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
|
class _ListHelper:
'''Helper class for List'''
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
pass
| 3 | 1 | 67 | 9 | 58 | 0 | 2 | 0.02 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 73 | 11 | 61 | 12 | 58 | 1 | 35 | 10 | 33 | 2 | 0 | 1 | 2 |
9,165 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._list.List
|
class List(AAZCommand):
"""List the recovery plans in the vault.
:example: recovery-plan list
az site-recovery recovery-plan list -g rg --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationrecoveryplans", "2022-08-01"],
]
}
AZ_SUPPORT_PAGINATION = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationRecoveryPlansList(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link
class ReplicationRecoveryPlansList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.allowed_operations = AAZListType(
serialized_name="allowedOperations",
)
properties.current_scenario = AAZObjectType(
serialized_name="currentScenario",
)
properties.current_scenario_status = AAZStrType(
serialized_name="currentScenarioStatus",
)
properties.current_scenario_status_description = AAZStrType(
serialized_name="currentScenarioStatusDescription",
)
properties.failover_deployment_model = AAZStrType(
serialized_name="failoverDeploymentModel",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.groups = AAZListType()
properties.last_planned_failover_time = AAZStrType(
serialized_name="lastPlannedFailoverTime",
)
properties.last_test_failover_time = AAZStrType(
serialized_name="lastTestFailoverTime",
)
properties.last_unplanned_failover_time = AAZStrType(
serialized_name="lastUnplannedFailoverTime",
)
properties.primary_fabric_friendly_name = AAZStrType(
serialized_name="primaryFabricFriendlyName",
)
properties.primary_fabric_id = AAZStrType(
serialized_name="primaryFabricId",
)
properties.provider_specific_details = AAZListType(
serialized_name="providerSpecificDetails",
)
properties.recovery_fabric_friendly_name = AAZStrType(
serialized_name="recoveryFabricFriendlyName",
)
properties.recovery_fabric_id = AAZStrType(
serialized_name="recoveryFabricId",
)
properties.replication_providers = AAZListType(
serialized_name="replicationProviders",
)
allowed_operations = cls._schema_on_200.value.Element.properties.allowed_operations
allowed_operations.Element = AAZStrType()
current_scenario = cls._schema_on_200.value.Element.properties.current_scenario
current_scenario.job_id = AAZStrType(
serialized_name="jobId",
)
current_scenario.scenario_name = AAZStrType(
serialized_name="scenarioName",
)
current_scenario.start_time = AAZStrType(
serialized_name="startTime",
)
groups = cls._schema_on_200.value.Element.properties.groups
groups.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.groups.Element
_element.end_group_actions = AAZListType(
serialized_name="endGroupActions",
)
_element.group_type = AAZStrType(
serialized_name="groupType",
flags={"required": True},
)
_element.replication_protected_items = AAZListType(
serialized_name="replicationProtectedItems",
)
_element.start_group_actions = AAZListType(
serialized_name="startGroupActions",
)
end_group_actions = cls._schema_on_200.value.Element.properties.groups.Element.end_group_actions
end_group_actions.Element = AAZObjectType()
_ListHelper._build_schema_recovery_plan_action_read(end_group_actions.Element)
replication_protected_items = cls._schema_on_200.value.Element.properties.groups.Element.replication_protected_items
replication_protected_items.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.groups.Element.replication_protected_items.Element
_element.id = AAZStrType()
_element.virtual_machine_id = AAZStrType(
serialized_name="virtualMachineId",
)
start_group_actions = cls._schema_on_200.value.Element.properties.groups.Element.start_group_actions
start_group_actions.Element = AAZObjectType()
_ListHelper._build_schema_recovery_plan_action_read(start_group_actions.Element)
provider_specific_details = cls._schema_on_200.value.Element.properties.provider_specific_details
provider_specific_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.provider_specific_details.Element
_element.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.value.Element.properties.provider_specific_details.Element.discriminate_by("instance_type", "A2A")
disc_a2_a.primary_zone = AAZStrType(
serialized_name="primaryZone",
)
disc_a2_a.recovery_zone = AAZStrType(
serialized_name="recoveryZone",
)
replication_providers = cls._schema_on_200.value.Element.properties.replication_providers
replication_providers.Element = AAZStrType()
return cls._schema_on_200
|
class List(AAZCommand):
'''List the recovery plans in the vault.
:example: recovery-plan list
az site-recovery recovery-plan list -g rg --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationRecoveryPlansList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 15 | 1 | 14 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 279 | 42 | 232 | 54 | 205 | 5 | 120 | 44 | 103 | 2 | 1 | 1 | 18 |
9,166 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_delete.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._delete.Delete
|
class Delete(AAZCommand):
"""Delete a recovery plan.
:example: recovery-plan delete
az site-recovery recovery-plan delete -n recovery_plan_name -g rg --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationrecoveryplans/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, None)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.recovery_plan_name = AAZStrArg(
options=["-n", "--name", "--recovery-plan-name"],
help="Recovery plan name.",
required=True,
id_part="child_name_1",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationRecoveryPlansDelete(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationRecoveryPlansDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"recoveryPlanName", self.ctx.args.recovery_plan_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class Delete(AAZCommand):
'''Delete a recovery plan.
:example: recovery-plan delete
az site-recovery recovery-plan delete -n recovery_plan_name -g rg --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
class ReplicationRecoveryPlansDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 23 | 1 | 8 | 0 | 8 | 0 | 1 | 0.04 | 1 | 2 | 1 | 0 | 4 | 0 | 5 | 5 | 149 | 21 | 123 | 33 | 100 | 5 | 52 | 24 | 37 | 4 | 1 | 1 | 17 |
9,167 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_create.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._create._CreateHelper
|
class _CreateHelper:
"""Helper class for Create"""
@classmethod
def _build_schema_extended_location_create(cls, _builder):
if _builder is None:
return
_builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}})
@classmethod
def _build_schema_recovery_plan_action_create(cls, _builder):
if _builder is None:
return
_builder.set_prop("actionName", AAZStrType, ".action_name", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("customDetails", AAZObjectType, ".custom_details", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("failoverDirections", AAZListType, ".failover_directions", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("failoverTypes", AAZListType, ".failover_types", typ_kwargs={"flags": {"required": True}})
custom_details = _builder.get(".customDetails")
if custom_details is not None:
custom_details.set_const("instanceType", "AutomationRunbookActionDetails", AAZStrType, ".automation_runbook_action_details", typ_kwargs={"flags": {"required": True}})
custom_details.set_const("instanceType", "ManualActionDetails", AAZStrType, ".manual_action_details", typ_kwargs={"flags": {"required": True}})
custom_details.set_const("instanceType", "ScriptActionDetails", AAZStrType, ".script_action_details", typ_kwargs={"flags": {"required": True}})
custom_details.discriminate_by("instanceType", "AutomationRunbookActionDetails")
custom_details.discriminate_by("instanceType", "ManualActionDetails")
custom_details.discriminate_by("instanceType", "ScriptActionDetails")
disc_automation_runbook_action_details = _builder.get(".customDetails{instanceType:AutomationRunbookActionDetails}")
if disc_automation_runbook_action_details is not None:
disc_automation_runbook_action_details.set_prop("fabricLocation", AAZStrType, ".automation_runbook_action_details.fabric_location", typ_kwargs={"flags": {"required": True}})
disc_automation_runbook_action_details.set_prop("runbookId", AAZStrType, ".automation_runbook_action_details.runbook_id")
disc_automation_runbook_action_details.set_prop("timeout", AAZStrType, ".automation_runbook_action_details.timeout")
disc_manual_action_details = _builder.get(".customDetails{instanceType:ManualActionDetails}")
if disc_manual_action_details is not None:
disc_manual_action_details.set_prop("description", AAZStrType, ".manual_action_details.description")
disc_script_action_details = _builder.get(".customDetails{instanceType:ScriptActionDetails}")
if disc_script_action_details is not None:
disc_script_action_details.set_prop("fabricLocation", AAZStrType, ".script_action_details.fabric_location", typ_kwargs={"flags": {"required": True}})
disc_script_action_details.set_prop("path", AAZStrType, ".script_action_details.path", typ_kwargs={"flags": {"required": True}})
disc_script_action_details.set_prop("timeout", AAZStrType, ".script_action_details.timeout")
failover_directions = _builder.get(".failoverDirections")
if failover_directions is not None:
failover_directions.set_elements(AAZStrType, ".")
failover_types = _builder.get(".failoverTypes")
if failover_types is not None:
failover_types.set_elements(AAZStrType, ".")
_schema_recovery_plan_action_read = None
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
if cls._schema_recovery_plan_action_read is not None:
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
return
cls._schema_recovery_plan_action_read = _schema_recovery_plan_action_read = AAZObjectType()
recovery_plan_action_read = _schema_recovery_plan_action_read
recovery_plan_action_read.action_name = AAZStrType(
serialized_name="actionName",
flags={"required": True},
)
recovery_plan_action_read.custom_details = AAZObjectType(
serialized_name="customDetails",
flags={"required": True},
)
recovery_plan_action_read.failover_directions = AAZListType(
serialized_name="failoverDirections",
flags={"required": True},
)
recovery_plan_action_read.failover_types = AAZListType(
serialized_name="failoverTypes",
flags={"required": True},
)
custom_details = _schema_recovery_plan_action_read.custom_details
custom_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_automation_runbook_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "AutomationRunbookActionDetails")
disc_automation_runbook_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_automation_runbook_action_details.runbook_id = AAZStrType(
serialized_name="runbookId",
)
disc_automation_runbook_action_details.timeout = AAZStrType()
disc_manual_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ManualActionDetails")
disc_manual_action_details.description = AAZStrType()
disc_script_action_details = _schema_recovery_plan_action_read.custom_details.discriminate_by("instance_type", "ScriptActionDetails")
disc_script_action_details.fabric_location = AAZStrType(
serialized_name="fabricLocation",
flags={"required": True},
)
disc_script_action_details.path = AAZStrType(
flags={"required": True},
)
disc_script_action_details.timeout = AAZStrType()
failover_directions = _schema_recovery_plan_action_read.failover_directions
failover_directions.Element = AAZStrType()
failover_types = _schema_recovery_plan_action_read.failover_types
failover_types.Element = AAZStrType()
_schema.action_name = cls._schema_recovery_plan_action_read.action_name
_schema.custom_details = cls._schema_recovery_plan_action_read.custom_details
_schema.failover_directions = cls._schema_recovery_plan_action_read.failover_directions
_schema.failover_types = cls._schema_recovery_plan_action_read.failover_types
|
class _CreateHelper:
'''Helper class for Create'''
@classmethod
def _build_schema_extended_location_create(cls, _builder):
pass
@classmethod
def _build_schema_recovery_plan_action_create(cls, _builder):
pass
@classmethod
def _build_schema_recovery_plan_action_read(cls, _schema):
pass
| 7 | 1 | 37 | 5 | 32 | 0 | 4 | 0.01 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 3 | 122 | 19 | 102 | 22 | 95 | 1 | 74 | 18 | 70 | 8 | 0 | 1 | 12 |
9,168 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/_create.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan._create.Create
|
class Create(AAZCommand):
"""Create operation to create a recovery plan.
:example: recovery-plan create A2A
az site-recovery recovery-plan create -n recovery_plan_name -g rg --vault-name vault_name --groups '[{group-type:Boot,replication-protected-items:[{id:protected_item_id,virtual-machine-id:vm_id}]}]' --primary-fabric-id fabric1_id --recovery-fabric-id fabric2_id --failover-deployment-model ResourceManager
:example: recovery-plan create hyper-v-replica-azure
az site-recovery recovery-plan create -n "recovery_plan_name" -g "rg" --vault-name "vault_name" --groups '[{group-type:Boot,replication-protected-items:[{id:"protected_item_id",virtual-machine-id:"protectable_item_id"}]}]' --primary-fabric-id "fabric_id" --recovery-fabric-id \"Microsoft Azure\" --failover-deployment-model ResourceManager
:example: recovery-plan create for v2arcm
az site-recovery recovery-plan create -n "recovery_plan_name" -g "rg" --vault-name "vault_name" --groups '[{group-type:Boot,replication-protected-items:[{id:"protected_item_id",virtual-machine-id:"vm_id"}]}]' --primary-fabric-id "fabric_id" --recovery-fabric-id "Microsoft Azure" --failover-deployment-model ResourceManager
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationrecoveryplans/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.recovery_plan_name = AAZStrArg(
options=["-n", "--name", "--recovery-plan-name"],
help="Recovery plan name.",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.failover_deployment_model = AAZStrArg(
options=["--failover-deploy-model", "--failover-deployment-model"],
arg_group="Properties",
help="The failover deployment model.",
enum={"Classic": "Classic", "NotApplicable": "NotApplicable", "ResourceManager": "ResourceManager"},
)
_args_schema.groups = AAZListArg(
options=["--groups"],
arg_group="Properties",
help="The recovery plan groups.",
required=True,
)
_args_schema.primary_fabric_id = AAZStrArg(
options=["--primary-fabric-id"],
arg_group="Properties",
help="The primary fabric Id.",
required=True,
)
_args_schema.provider_specific_input = AAZListArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="The provider specific input.",
)
_args_schema.recovery_fabric_id = AAZStrArg(
options=["--recovery-fabric-id"],
arg_group="Properties",
help="The recovery fabric Id.",
required=True,
)
groups = cls._args_schema.groups
groups.Element = AAZObjectArg()
_element = cls._args_schema.groups.Element
_element.end_group_actions = AAZListArg(
options=["end-group-actions"],
help="The end group actions.",
)
_element.group_type = AAZStrArg(
options=["group-type"],
help="The group type.",
required=True,
enum={"Boot": "Boot", "Failover": "Failover", "Shutdown": "Shutdown"},
)
_element.replication_protected_items = AAZListArg(
options=["replication-protected-items"],
help="The list of protected items.",
)
_element.start_group_actions = AAZListArg(
options=["start-group-actions"],
help="The start group actions.",
)
end_group_actions = cls._args_schema.groups.Element.end_group_actions
end_group_actions.Element = AAZObjectArg()
cls._build_args_recovery_plan_action_create(end_group_actions.Element)
replication_protected_items = cls._args_schema.groups.Element.replication_protected_items
replication_protected_items.Element = AAZObjectArg()
_element = cls._args_schema.groups.Element.replication_protected_items.Element
_element.id = AAZStrArg(
options=["id"],
help="The ARM Id of the recovery plan protected item.",
)
_element.virtual_machine_id = AAZStrArg(
options=["virtual-machine-id"],
help="The virtual machine Id.",
)
start_group_actions = cls._args_schema.groups.Element.start_group_actions
start_group_actions.Element = AAZObjectArg()
cls._build_args_recovery_plan_action_create(start_group_actions.Element)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.Element = AAZObjectArg()
_element = cls._args_schema.provider_specific_input.Element
_element.a2a = AAZObjectArg(
options=["a2a"],
help="a2a",
)
a2a = cls._args_schema.provider_specific_input.Element.a2a
a2a.primary_extended_location = AAZObjectArg(
options=["primary-extended-location"],
help="The primary extended location.",
)
cls._build_args_extended_location_create(a2a.primary_extended_location)
a2a.primary_zone = AAZStrArg(
options=["primary-zone"],
help="The primary zone.",
)
a2a.recovery_extended_location = AAZObjectArg(
options=["recovery-extended-location"],
help="The recovery extended location.",
)
cls._build_args_extended_location_create(a2a.recovery_extended_location)
a2a.recovery_zone = AAZStrArg(
options=["recovery-zone"],
help="The recovery zone.",
)
return cls._args_schema
_args_extended_location_create = None
@classmethod
def _build_args_extended_location_create(cls, _schema):
if cls._args_extended_location_create is not None:
_schema.name = cls._args_extended_location_create.name
_schema.type = cls._args_extended_location_create.type
return
cls._args_extended_location_create = AAZObjectArg()
extended_location_create = cls._args_extended_location_create
extended_location_create.name = AAZStrArg(
options=["name"],
help="The name of the extended location.",
required=True,
)
extended_location_create.type = AAZStrArg(
options=["type"],
help="The extended location type.",
required=True,
enum={"EdgeZone": "EdgeZone"},
)
_schema.name = cls._args_extended_location_create.name
_schema.type = cls._args_extended_location_create.type
_args_recovery_plan_action_create = None
@classmethod
def _build_args_recovery_plan_action_create(cls, _schema):
if cls._args_recovery_plan_action_create is not None:
_schema.action_name = cls._args_recovery_plan_action_create.action_name
_schema.custom_details = cls._args_recovery_plan_action_create.custom_details
_schema.failover_directions = cls._args_recovery_plan_action_create.failover_directions
_schema.failover_types = cls._args_recovery_plan_action_create.failover_types
return
cls._args_recovery_plan_action_create = AAZObjectArg()
recovery_plan_action_create = cls._args_recovery_plan_action_create
recovery_plan_action_create.action_name = AAZStrArg(
options=["action-name"],
help="The action name.",
required=True,
)
recovery_plan_action_create.custom_details = AAZObjectArg(
options=["custom-details"],
help="The custom details.",
required=True,
)
recovery_plan_action_create.failover_directions = AAZListArg(
options=["failover-directions"],
help="The list of failover directions.",
required=True,
)
recovery_plan_action_create.failover_types = AAZListArg(
options=["failover-types"],
help="The list of failover types.",
required=True,
)
custom_details = cls._args_recovery_plan_action_create.custom_details
custom_details.automation_runbook_action_details = AAZObjectArg(
options=["automation-runbook-action-details"],
)
custom_details.manual_action_details = AAZObjectArg(
options=["manual-action-details"],
)
custom_details.script_action_details = AAZObjectArg(
options=["script-action-details"],
)
automation_runbook_action_details = cls._args_recovery_plan_action_create.custom_details.automation_runbook_action_details
automation_runbook_action_details.fabric_location = AAZStrArg(
options=["fabric-location"],
help="The fabric location.",
required=True,
enum={"Primary": "Primary", "Recovery": "Recovery"},
)
automation_runbook_action_details.runbook_id = AAZStrArg(
options=["runbook-id"],
help="The runbook ARM Id.",
)
automation_runbook_action_details.timeout = AAZStrArg(
options=["timeout"],
help="The runbook timeout.",
)
manual_action_details = cls._args_recovery_plan_action_create.custom_details.manual_action_details
manual_action_details.description = AAZStrArg(
options=["description"],
help="The manual action description.",
)
script_action_details = cls._args_recovery_plan_action_create.custom_details.script_action_details
script_action_details.fabric_location = AAZStrArg(
options=["fabric-location"],
help="The fabric location.",
required=True,
enum={"Primary": "Primary", "Recovery": "Recovery"},
)
script_action_details.path = AAZStrArg(
options=["path"],
help="The script path.",
required=True,
)
script_action_details.timeout = AAZStrArg(
options=["timeout"],
help="The script timeout.",
)
failover_directions = cls._args_recovery_plan_action_create.failover_directions
failover_directions.Element = AAZStrArg(
enum={"PrimaryToRecovery": "PrimaryToRecovery", "RecoveryToPrimary": "RecoveryToPrimary"},
)
failover_types = cls._args_recovery_plan_action_create.failover_types
failover_types.Element = AAZStrArg(
enum={"CancelFailover": "CancelFailover", "ChangePit": "ChangePit", "Commit": "Commit", "CompleteMigration": "CompleteMigration", "DisableProtection": "DisableProtection", "Failback": "Failback", "FinalizeFailback": "FinalizeFailback", "PlannedFailover": "PlannedFailover", "RepairReplication": "RepairReplication", "ReverseReplicate": "ReverseReplicate", "SwitchProtection": "SwitchProtection", "TestFailover": "TestFailover", "TestFailoverCleanup": "TestFailoverCleanup", "UnplannedFailover": "UnplannedFailover"},
)
_schema.action_name = cls._args_recovery_plan_action_create.action_name
_schema.custom_details = cls._args_recovery_plan_action_create.custom_details
_schema.failover_directions = cls._args_recovery_plan_action_create.failover_directions
_schema.failover_types = cls._args_recovery_plan_action_create.failover_types
def _execute_operations(self):
self.pre_operations()
yield self.ReplicationRecoveryPlansCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationRecoveryPlansCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationRecoveryPlans/{recoveryPlanName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"recoveryPlanName", self.ctx.args.recovery_plan_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("failoverDeploymentModel", AAZStrType, ".failover_deployment_model")
properties.set_prop("groups", AAZListType, ".groups", typ_kwargs={"flags": {"required": True}})
properties.set_prop("primaryFabricId", AAZStrType, ".primary_fabric_id", typ_kwargs={"flags": {"required": True}})
properties.set_prop("providerSpecificInput", AAZListType, ".provider_specific_input")
properties.set_prop("recoveryFabricId", AAZStrType, ".recovery_fabric_id", typ_kwargs={"flags": {"required": True}})
groups = _builder.get(".properties.groups")
if groups is not None:
groups.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.groups[]")
if _elements is not None:
_elements.set_prop("endGroupActions", AAZListType, ".end_group_actions")
_elements.set_prop("groupType", AAZStrType, ".group_type", typ_kwargs={"flags": {"required": True}})
_elements.set_prop("replicationProtectedItems", AAZListType, ".replication_protected_items")
_elements.set_prop("startGroupActions", AAZListType, ".start_group_actions")
end_group_actions = _builder.get(".properties.groups[].endGroupActions")
if end_group_actions is not None:
_CreateHelper._build_schema_recovery_plan_action_create(end_group_actions.set_elements(AAZObjectType, "."))
replication_protected_items = _builder.get(".properties.groups[].replicationProtectedItems")
if replication_protected_items is not None:
replication_protected_items.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.groups[].replicationProtectedItems[]")
if _elements is not None:
_elements.set_prop("id", AAZStrType, ".id")
_elements.set_prop("virtualMachineId", AAZStrType, ".virtual_machine_id")
start_group_actions = _builder.get(".properties.groups[].startGroupActions")
if start_group_actions is not None:
_CreateHelper._build_schema_recovery_plan_action_create(start_group_actions.set_elements(AAZObjectType, "."))
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.providerSpecificInput[]")
if _elements is not None:
_elements.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
_elements.discriminate_by("instanceType", "A2A")
disc_a2_a = _builder.get(".properties.providerSpecificInput[]{instanceType:A2A}")
if disc_a2_a is not None:
_CreateHelper._build_schema_extended_location_create(disc_a2_a.set_prop("primaryExtendedLocation", AAZObjectType, ".a2a.primary_extended_location"))
disc_a2_a.set_prop("primaryZone", AAZStrType, ".a2a.primary_zone")
_CreateHelper._build_schema_extended_location_create(disc_a2_a.set_prop("recoveryExtendedLocation", AAZObjectType, ".a2a.recovery_extended_location"))
disc_a2_a.set_prop("recoveryZone", AAZStrType, ".a2a.recovery_zone")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.allowed_operations = AAZListType(
serialized_name="allowedOperations",
)
properties.current_scenario = AAZObjectType(
serialized_name="currentScenario",
)
properties.current_scenario_status = AAZStrType(
serialized_name="currentScenarioStatus",
)
properties.current_scenario_status_description = AAZStrType(
serialized_name="currentScenarioStatusDescription",
)
properties.failover_deployment_model = AAZStrType(
serialized_name="failoverDeploymentModel",
)
properties.friendly_name = AAZStrType(
serialized_name="friendlyName",
)
properties.groups = AAZListType()
properties.last_planned_failover_time = AAZStrType(
serialized_name="lastPlannedFailoverTime",
)
properties.last_test_failover_time = AAZStrType(
serialized_name="lastTestFailoverTime",
)
properties.last_unplanned_failover_time = AAZStrType(
serialized_name="lastUnplannedFailoverTime",
)
properties.primary_fabric_friendly_name = AAZStrType(
serialized_name="primaryFabricFriendlyName",
)
properties.primary_fabric_id = AAZStrType(
serialized_name="primaryFabricId",
)
properties.provider_specific_details = AAZListType(
serialized_name="providerSpecificDetails",
)
properties.recovery_fabric_friendly_name = AAZStrType(
serialized_name="recoveryFabricFriendlyName",
)
properties.recovery_fabric_id = AAZStrType(
serialized_name="recoveryFabricId",
)
properties.replication_providers = AAZListType(
serialized_name="replicationProviders",
)
allowed_operations = cls._schema_on_200.properties.allowed_operations
allowed_operations.Element = AAZStrType()
current_scenario = cls._schema_on_200.properties.current_scenario
current_scenario.job_id = AAZStrType(
serialized_name="jobId",
)
current_scenario.scenario_name = AAZStrType(
serialized_name="scenarioName",
)
current_scenario.start_time = AAZStrType(
serialized_name="startTime",
)
groups = cls._schema_on_200.properties.groups
groups.Element = AAZObjectType()
_element = cls._schema_on_200.properties.groups.Element
_element.end_group_actions = AAZListType(
serialized_name="endGroupActions",
)
_element.group_type = AAZStrType(
serialized_name="groupType",
flags={"required": True},
)
_element.replication_protected_items = AAZListType(
serialized_name="replicationProtectedItems",
)
_element.start_group_actions = AAZListType(
serialized_name="startGroupActions",
)
end_group_actions = cls._schema_on_200.properties.groups.Element.end_group_actions
end_group_actions.Element = AAZObjectType()
_CreateHelper._build_schema_recovery_plan_action_read(end_group_actions.Element)
replication_protected_items = cls._schema_on_200.properties.groups.Element.replication_protected_items
replication_protected_items.Element = AAZObjectType()
_element = cls._schema_on_200.properties.groups.Element.replication_protected_items.Element
_element.id = AAZStrType()
_element.virtual_machine_id = AAZStrType(
serialized_name="virtualMachineId",
)
start_group_actions = cls._schema_on_200.properties.groups.Element.start_group_actions
start_group_actions.Element = AAZObjectType()
_CreateHelper._build_schema_recovery_plan_action_read(start_group_actions.Element)
provider_specific_details = cls._schema_on_200.properties.provider_specific_details
provider_specific_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.provider_specific_details.Element
_element.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.properties.provider_specific_details.Element.discriminate_by("instance_type", "A2A")
disc_a2_a.primary_zone = AAZStrType(
serialized_name="primaryZone",
)
disc_a2_a.recovery_zone = AAZStrType(
serialized_name="recoveryZone",
)
replication_providers = cls._schema_on_200.properties.replication_providers
replication_providers.Element = AAZStrType()
return cls._schema_on_200
|
class Create(AAZCommand):
'''Create operation to create a recovery plan.
:example: recovery-plan create A2A
az site-recovery recovery-plan create -n recovery_plan_name -g rg --vault-name vault_name --groups '[{group-type:Boot,replication-protected-items:[{id:protected_item_id,virtual-machine-id:vm_id}]}]' --primary-fabric-id fabric1_id --recovery-fabric-id fabric2_id --failover-deployment-model ResourceManager
:example: recovery-plan create hyper-v-replica-azure
az site-recovery recovery-plan create -n "recovery_plan_name" -g "rg" --vault-name "vault_name" --groups '[{group-type:Boot,replication-protected-items:[{id:"protected_item_id",virtual-machine-id:"protectable_item_id"}]}]' --primary-fabric-id "fabric_id" --recovery-fabric-id "Microsoft Azure" --failover-deployment-model ResourceManager
:example: recovery-plan create for v2arcm
az site-recovery recovery-plan create -n "recovery_plan_name" -g "rg" --vault-name "vault_name" --groups '[{group-type:Boot,replication-protected-items:[{id:"protected_item_id",virtual-machine-id:"vm_id"}]}]' --primary-fabric-id "fabric_id" --recovery-fabric-id "Microsoft Azure" --failover-deployment-model ResourceManager
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
@classmethod
def _build_args_extended_location_create(cls, _schema):
pass
@classmethod
def _build_args_recovery_plan_action_create(cls, _schema):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationRecoveryPlansCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 33 | 1 | 30 | 3 | 27 | 0 | 2 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 8 | 8 | 599 | 81 | 508 | 85 | 475 | 10 | 246 | 71 | 226 | 11 | 1 | 1 | 34 |
9,169 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/recovery_plan/__cmd_group.py
|
azext_site_recovery.aaz.latest.site_recovery.recovery_plan.__cmd_group.__CMDGroup
|
class __CMDGroup(AAZCommandGroup):
"""Manage the recovery plans in the vault.
"""
pass
|
class __CMDGroup(AAZCommandGroup):
'''Manage the recovery plans in the vault.
'''
pass
| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 2 | 1 | 1 | 2 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
9,170 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._update._UpdateHelper
|
class _UpdateHelper:
"""Helper class for Update"""
_schema_protection_container_mapping_read = None
@classmethod
def _build_schema_protection_container_mapping_read(cls, _schema):
if cls._schema_protection_container_mapping_read is not None:
_schema.id = cls._schema_protection_container_mapping_read.id
_schema.location = cls._schema_protection_container_mapping_read.location
_schema.name = cls._schema_protection_container_mapping_read.name
_schema.properties = cls._schema_protection_container_mapping_read.properties
_schema.type = cls._schema_protection_container_mapping_read.type
return
cls._schema_protection_container_mapping_read = _schema_protection_container_mapping_read = AAZObjectType()
protection_container_mapping_read = _schema_protection_container_mapping_read
protection_container_mapping_read.id = AAZStrType(
flags={"read_only": True},
)
protection_container_mapping_read.location = AAZStrType()
protection_container_mapping_read.name = AAZStrType(
flags={"read_only": True},
)
protection_container_mapping_read.properties = AAZObjectType()
protection_container_mapping_read.type = AAZStrType(
flags={"read_only": True},
)
properties = _schema_protection_container_mapping_read.properties
properties.health = AAZStrType()
properties.health_error_details = AAZListType(
serialized_name="healthErrorDetails",
)
properties.policy_friendly_name = AAZStrType(
serialized_name="policyFriendlyName",
)
properties.policy_id = AAZStrType(
serialized_name="policyId",
)
properties.provider_specific_details = AAZObjectType(
serialized_name="providerSpecificDetails",
)
properties.source_fabric_friendly_name = AAZStrType(
serialized_name="sourceFabricFriendlyName",
)
properties.source_protection_container_friendly_name = AAZStrType(
serialized_name="sourceProtectionContainerFriendlyName",
)
properties.state = AAZStrType()
properties.target_fabric_friendly_name = AAZStrType(
serialized_name="targetFabricFriendlyName",
)
properties.target_protection_container_friendly_name = AAZStrType(
serialized_name="targetProtectionContainerFriendlyName",
)
properties.target_protection_container_id = AAZStrType(
serialized_name="targetProtectionContainerId",
)
health_error_details = _schema_protection_container_mapping_read.properties.health_error_details
health_error_details.Element = AAZObjectType()
_element = _schema_protection_container_mapping_read.properties.health_error_details.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = _schema_protection_container_mapping_read.properties.health_error_details.Element.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = _schema_protection_container_mapping_read.properties.health_error_details.Element.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
provider_specific_details = _schema_protection_container_mapping_read.properties.provider_specific_details
provider_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = _schema_protection_container_mapping_read.properties.provider_specific_details.discriminate_by("instance_type", "A2A")
disc_a2_a.agent_auto_update_status = AAZStrType(
serialized_name="agentAutoUpdateStatus",
)
disc_a2_a.automation_account_arm_id = AAZStrType(
serialized_name="automationAccountArmId",
)
disc_a2_a.automation_account_authentication_type = AAZStrType(
serialized_name="automationAccountAuthenticationType",
)
disc_a2_a.job_schedule_name = AAZStrType(
serialized_name="jobScheduleName",
)
disc_a2_a.schedule_name = AAZStrType(
serialized_name="scheduleName",
)
disc_in_mage_rcm = _schema_protection_container_mapping_read.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm")
disc_in_mage_rcm.enable_agent_auto_upgrade = AAZStrType(
serialized_name="enableAgentAutoUpgrade",
flags={"read_only": True},
)
disc_v_mware_cbt = _schema_protection_container_mapping_read.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt")
disc_v_mware_cbt.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
disc_v_mware_cbt.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"read_only": True},
)
disc_v_mware_cbt.role_size_to_nic_count_map = AAZDictType(
serialized_name="roleSizeToNicCountMap",
flags={"read_only": True},
)
disc_v_mware_cbt.service_bus_connection_string_secret_name = AAZStrType(
serialized_name="serviceBusConnectionStringSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_id = AAZStrType(
serialized_name="storageAccountId",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_sas_secret_name = AAZStrType(
serialized_name="storageAccountSasSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.target_location = AAZStrType(
serialized_name="targetLocation",
flags={"read_only": True},
)
role_size_to_nic_count_map = _schema_protection_container_mapping_read.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt").role_size_to_nic_count_map
role_size_to_nic_count_map.Element = AAZIntType()
_schema.id = cls._schema_protection_container_mapping_read.id
_schema.location = cls._schema_protection_container_mapping_read.location
_schema.name = cls._schema_protection_container_mapping_read.name
_schema.properties = cls._schema_protection_container_mapping_read.properties
_schema.type = cls._schema_protection_container_mapping_read.type
|
class _UpdateHelper:
'''Helper class for Update'''
@classmethod
def _build_schema_protection_container_mapping_read(cls, _schema):
pass
| 3 | 1 | 219 | 13 | 206 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 225 | 15 | 209 | 15 | 206 | 1 | 89 | 13 | 87 | 2 | 0 | 1 | 2 |
9,171 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_update.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._update.Update
|
class Update(AAZCommand):
"""Update operation to create a protection container mapping.
:example: protection-container mapping update
az site-recovery protection-container mapping update -g rg --fabric-name fabric_source_name -n container_mapping_source_name --protection-container container_source_name --vault-name vault_name --policy-id policy_id --provider-input '{a2a:{agent-auto-update-status:Enabled}}' --target-container container_recovery_id
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotectioncontainermappings/{}", "2022-08-01"],
]
}
AZ_SUPPORT_NO_WAIT = True
AZ_SUPPORT_GENERIC_UPDATE = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_lro_poller(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.mapping_name = AAZStrArg(
options=["-n", "--name", "--mapping-name"],
help="Protection Container mapping name.",
required=True,
id_part="child_name_3",
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
# define Arg Group "Properties"
_args_schema = cls._args_schema
_args_schema.policy_id = AAZStrArg(
options=["--policy-id"],
arg_group="Properties",
help="Applicable policy.",
nullable=True,
)
_args_schema.provider_specific_input = AAZObjectArg(
options=["--provider-input", "--provider-specific-input"],
arg_group="Properties",
help="Provider specific input for pairing.",
nullable=True,
)
_args_schema.target_protection_container_id = AAZStrArg(
options=["--target-container", "--target-protection-container-id"],
arg_group="Properties",
help="The target unique protection container name.",
nullable=True,
)
provider_specific_input = cls._args_schema.provider_specific_input
provider_specific_input.a2a = AAZObjectArg(
options=["a2a"],
help="A2A",
)
provider_specific_input.hyper_v_replica_azure = AAZObjectArg(
options=["hyper-v-replica-azure"],
)
provider_specific_input.in_mage_rcm = AAZObjectArg(
options=["in-mage-rcm"],
)
provider_specific_input.vmware_cbt = AAZObjectArg(
options=["vmware-cbt"],
help="vmware-cbt",
)
a2a = cls._args_schema.provider_specific_input.a2a
a2a.agent_auto_update_status = AAZStrArg(
options=["agent-auto-update-status"],
help="A value indicating whether the auto update is enabled.",
nullable=True,
enum={"Disabled": "Disabled", "Enabled": "Enabled"},
)
a2a.automation_account_arm_id = AAZStrArg(
options=["automation-account-arm-id"],
help="The automation account arm id.",
nullable=True,
)
a2a.automation_account_authentication_type = AAZStrArg(
options=["automation-account-authentication-type"],
help="A value indicating the type authentication to use for automation Account.",
nullable=True,
enum={"RunAsAccount": "RunAsAccount", "SystemAssignedIdentity": "SystemAssignedIdentity"},
)
hyper_v_replica_azure = cls._args_schema.provider_specific_input.hyper_v_replica_azure
hyper_v_replica_azure.location = AAZStrArg(
options=["location"],
help="The Location.",
nullable=True,
)
in_mage_rcm = cls._args_schema.provider_specific_input.in_mage_rcm
in_mage_rcm.enable_agent_auto_upgrade = AAZStrArg(
options=["enable-agent-auto-upgrade"],
help="A value indicating whether agent auto upgrade has to be enabled.",
)
vmware_cbt = cls._args_schema.provider_specific_input.vmware_cbt
vmware_cbt.key_vault_id = AAZStrArg(
options=["key-vault-id"],
help="The target key vault ARM Id.",
nullable=True,
)
vmware_cbt.key_vault_uri = AAZStrArg(
options=["key-vault-uri"],
help="The target key vault URL.",
nullable=True,
)
vmware_cbt.service_bus_connection_string_secret_name = AAZStrArg(
options=["service-bus-connection-string-secret-name"],
help="The secret name of the service bus connection string.",
nullable=True,
)
vmware_cbt.storage_account_id = AAZStrArg(
options=["storage-account-id"],
help="The storage account ARM Id.",
)
vmware_cbt.storage_account_sas_secret_name = AAZStrArg(
options=["storage-account-sas-secret-name"],
help="The secret name of the storage account.",
nullable=True,
)
vmware_cbt.target_location = AAZStrArg(
options=["target-location"],
help="The target location.",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectionContainerMappingsGet(ctx=self.ctx)()
self.pre_instance_update(self.ctx.vars.instance)
self.InstanceUpdateByJson(ctx=self.ctx)()
self.InstanceUpdateByGeneric(ctx=self.ctx)()
self.post_instance_update(self.ctx.vars.instance)
yield self.ReplicationProtectionContainerMappingsCreate(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainerMappingsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"mappingName", self.ctx.args.mapping_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_protection_container_mapping_read(cls._schema_on_200)
return cls._schema_on_200
class ReplicationProtectionContainerMappingsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"mappingName", self.ctx.args.mapping_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
value=self.ctx.vars.instance,
)
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_UpdateHelper._build_schema_protection_container_mapping_read(cls._schema_on_200)
return cls._schema_on_200
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance(self.ctx.vars.instance)
def _update_instance(self, instance):
_instance_value, _builder = self.new_content_builder(
self.ctx.args,
value=instance,
typ=AAZObjectType
)
_builder.set_prop("properties", AAZObjectType)
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("policyId", AAZStrType, ".policy_id")
properties.set_prop("providerSpecificInput", AAZObjectType, ".provider_specific_input")
properties.set_prop("targetProtectionContainerId", AAZStrType, ".target_protection_container_id")
provider_specific_input = _builder.get(".properties.providerSpecificInput")
if provider_specific_input is not None:
provider_specific_input.set_const("instanceType", "A2A", AAZStrType, ".a2a", typ_kwargs={"flags": {"required": True}})
provider_specific_input.set_const("instanceType", "HyperVReplicaAzure", AAZStrType, ".hyper_v_replica_azure", typ_kwargs={"flags": {"required": True}})
provider_specific_input.set_const("instanceType", "InMageRcm", AAZStrType, ".in_mage_rcm", typ_kwargs={"flags": {"required": True}})
provider_specific_input.set_const("instanceType", "VMwareCbt", AAZStrType, ".vmware_cbt", typ_kwargs={"flags": {"required": True}})
provider_specific_input.discriminate_by("instanceType", "A2A")
provider_specific_input.discriminate_by("instanceType", "HyperVReplicaAzure")
provider_specific_input.discriminate_by("instanceType", "InMageRcm")
provider_specific_input.discriminate_by("instanceType", "VMwareCbt")
disc_a2_a = _builder.get(".properties.providerSpecificInput{instanceType:A2A}")
if disc_a2_a is not None:
disc_a2_a.set_prop("agentAutoUpdateStatus", AAZStrType, ".a2a.agent_auto_update_status")
disc_a2_a.set_prop("automationAccountArmId", AAZStrType, ".a2a.automation_account_arm_id")
disc_a2_a.set_prop("automationAccountAuthenticationType", AAZStrType, ".a2a.automation_account_authentication_type")
disc_hyper_v_replica_azure = _builder.get(".properties.providerSpecificInput{instanceType:HyperVReplicaAzure}")
if disc_hyper_v_replica_azure is not None:
disc_hyper_v_replica_azure.set_prop("location", AAZStrType, ".hyper_v_replica_azure.location")
disc_in_mage_rcm = _builder.get(".properties.providerSpecificInput{instanceType:InMageRcm}")
if disc_in_mage_rcm is not None:
disc_in_mage_rcm.set_prop("enableAgentAutoUpgrade", AAZStrType, ".in_mage_rcm.enable_agent_auto_upgrade", typ_kwargs={"flags": {"required": True}})
disc_v_mware_cbt = _builder.get(".properties.providerSpecificInput{instanceType:VMwareCbt}")
if disc_v_mware_cbt is not None:
disc_v_mware_cbt.set_prop("keyVaultId", AAZStrType, ".vmware_cbt.key_vault_id")
disc_v_mware_cbt.set_prop("keyVaultUri", AAZStrType, ".vmware_cbt.key_vault_uri")
disc_v_mware_cbt.set_prop("serviceBusConnectionStringSecretName", AAZStrType, ".vmware_cbt.service_bus_connection_string_secret_name")
disc_v_mware_cbt.set_prop("storageAccountId", AAZStrType, ".vmware_cbt.storage_account_id", typ_kwargs={"flags": {"required": True}})
disc_v_mware_cbt.set_prop("storageAccountSasSecretName", AAZStrType, ".vmware_cbt.storage_account_sas_secret_name")
disc_v_mware_cbt.set_prop("targetLocation", AAZStrType, ".vmware_cbt.target_location", typ_kwargs={"flags": {"required": True}})
return _instance_value
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
self._update_instance_by_generic(
self.ctx.vars.instance,
self.ctx.generic_update_args
)
|
class Update(AAZCommand):
'''Update operation to create a protection container mapping.
:example: protection-container mapping update
az site-recovery protection-container mapping update -g rg --fabric-name fabric_source_name -n container_mapping_source_name --protection-container container_source_name --vault-name vault_name --policy-id policy_id --provider-input '{a2a:{agent-auto-update-status:Enabled}}' --target-container container_recovery_id
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
@register_callback
def pre_instance_update(self, instance):
pass
@register_callback
def post_instance_update(self, instance):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainerMappingsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class ReplicationProtectionContainerMappingsCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
def _update_instance(self, instance):
pass
class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation):
def __call__(self, *args, **kwargs):
pass
| 55 | 1 | 13 | 1 | 12 | 0 | 1 | 0.01 | 1 | 5 | 4 | 0 | 7 | 0 | 8 | 8 | 472 | 64 | 402 | 91 | 347 | 6 | 178 | 70 | 143 | 7 | 1 | 1 | 42 |
9,172 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_show.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._show.Show
|
class Show(AAZCommand):
"""Get the details of a protection container mapping.
:example: protection-container mapping show
az site-recovery protection-container mapping show -g rg --fabric-name fabric_source_name -n container_mapping_source_name --protection-container container_source_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotectioncontainermappings/{}", "2022-08-01"],
]
}
def _handler(self, command_args):
super()._handler(command_args)
self._execute_operations()
return self._output()
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
id_part="child_name_1",
)
_args_schema.mapping_name = AAZStrArg(
options=["-n", "--name", "--mapping-name"],
help="Protection Container mapping name.",
required=True,
id_part="child_name_3",
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
id_part="child_name_2",
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
id_part="name",
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectionContainerMappingsGet(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True)
return result
class ReplicationProtectionContainerMappingsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings/{mappingName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"mappingName", self.ctx.args.mapping_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType()
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.health = AAZStrType()
properties.health_error_details = AAZListType(
serialized_name="healthErrorDetails",
)
properties.policy_friendly_name = AAZStrType(
serialized_name="policyFriendlyName",
)
properties.policy_id = AAZStrType(
serialized_name="policyId",
)
properties.provider_specific_details = AAZObjectType(
serialized_name="providerSpecificDetails",
)
properties.source_fabric_friendly_name = AAZStrType(
serialized_name="sourceFabricFriendlyName",
)
properties.source_protection_container_friendly_name = AAZStrType(
serialized_name="sourceProtectionContainerFriendlyName",
)
properties.state = AAZStrType()
properties.target_fabric_friendly_name = AAZStrType(
serialized_name="targetFabricFriendlyName",
)
properties.target_protection_container_friendly_name = AAZStrType(
serialized_name="targetProtectionContainerFriendlyName",
)
properties.target_protection_container_id = AAZStrType(
serialized_name="targetProtectionContainerId",
)
health_error_details = cls._schema_on_200.properties.health_error_details
health_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.properties.health_error_details.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = cls._schema_on_200.properties.health_error_details.Element.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = cls._schema_on_200.properties.health_error_details.Element.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
provider_specific_details = cls._schema_on_200.properties.provider_specific_details
provider_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "A2A")
disc_a2_a.agent_auto_update_status = AAZStrType(
serialized_name="agentAutoUpdateStatus",
)
disc_a2_a.automation_account_arm_id = AAZStrType(
serialized_name="automationAccountArmId",
)
disc_a2_a.automation_account_authentication_type = AAZStrType(
serialized_name="automationAccountAuthenticationType",
)
disc_a2_a.job_schedule_name = AAZStrType(
serialized_name="jobScheduleName",
)
disc_a2_a.schedule_name = AAZStrType(
serialized_name="scheduleName",
)
disc_in_mage_rcm = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm")
disc_in_mage_rcm.enable_agent_auto_upgrade = AAZStrType(
serialized_name="enableAgentAutoUpgrade",
flags={"read_only": True},
)
disc_v_mware_cbt = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt")
disc_v_mware_cbt.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
disc_v_mware_cbt.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"read_only": True},
)
disc_v_mware_cbt.role_size_to_nic_count_map = AAZDictType(
serialized_name="roleSizeToNicCountMap",
flags={"read_only": True},
)
disc_v_mware_cbt.service_bus_connection_string_secret_name = AAZStrType(
serialized_name="serviceBusConnectionStringSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_id = AAZStrType(
serialized_name="storageAccountId",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_sas_secret_name = AAZStrType(
serialized_name="storageAccountSasSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.target_location = AAZStrType(
serialized_name="targetLocation",
flags={"read_only": True},
)
role_size_to_nic_count_map = cls._schema_on_200.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt").role_size_to_nic_count_map
role_size_to_nic_count_map.Element = AAZIntType()
return cls._schema_on_200
|
class Show(AAZCommand):
'''Get the details of a protection container mapping.
:example: protection-container mapping show
az site-recovery protection-container mapping show -g rg --fabric-name fabric_source_name -n container_mapping_source_name --protection-container container_source_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainerMappingsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 22 | 1 | 21 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 372 | 36 | 331 | 49 | 304 | 5 | 134 | 39 | 117 | 2 | 1 | 1 | 18 |
9,173 |
Azure/azure-cli-extensions
|
src/site-recovery/azext_site_recovery/aaz/latest/site_recovery/protection_container/mapping/_list.py
|
azext_site_recovery.aaz.latest.site_recovery.protection_container.mapping._list.List
|
class List(AAZCommand):
"""List the protection container mappings for a protection container.
:example: protection-container mapping list
az site-recovery protection-container mapping list -g rg --fabric-name fabric_source_name --protection-container container_source_name --vault-name vault_name
"""
_aaz_info = {
"version": "2022-08-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.recoveryservices/vaults/{}/replicationfabrics/{}/replicationprotectioncontainers/{}/replicationprotectioncontainermappings", "2022-08-01"],
]
}
AZ_SUPPORT_PAGINATION = True
def _handler(self, command_args):
super()._handler(command_args)
return self.build_paging(self._execute_operations, self._output)
_args_schema = None
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
if cls._args_schema is not None:
return cls._args_schema
cls._args_schema = super()._build_arguments_schema(*args, **kwargs)
# define Arg Group ""
_args_schema = cls._args_schema
_args_schema.fabric_name = AAZStrArg(
options=["--fabric-name"],
help="Fabric name.",
required=True,
)
_args_schema.protection_container_name = AAZStrArg(
options=["--protection-container", "--protection-container-name"],
help="Protection container name.",
required=True,
)
_args_schema.resource_group = AAZResourceGroupNameArg(
required=True,
)
_args_schema.vault_name = AAZStrArg(
options=["--vault-name"],
help="The name of the recovery services vault.",
required=True,
)
return cls._args_schema
def _execute_operations(self):
self.pre_operations()
self.ReplicationProtectionContainerMappingsListByReplicationProtectionContainers(ctx=self.ctx)()
self.post_operations()
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True)
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link
class ReplicationProtectionContainerMappingsListByReplicationProtectionContainers(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationProtectionContainerMappings",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"fabricName", self.ctx.args.fabric_name,
required=True,
),
**self.serialize_url_param(
"protectionContainerName", self.ctx.args.protection_container_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"resourceName", self.ctx.args.vault_name,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-08-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.health = AAZStrType()
properties.health_error_details = AAZListType(
serialized_name="healthErrorDetails",
)
properties.policy_friendly_name = AAZStrType(
serialized_name="policyFriendlyName",
)
properties.policy_id = AAZStrType(
serialized_name="policyId",
)
properties.provider_specific_details = AAZObjectType(
serialized_name="providerSpecificDetails",
)
properties.source_fabric_friendly_name = AAZStrType(
serialized_name="sourceFabricFriendlyName",
)
properties.source_protection_container_friendly_name = AAZStrType(
serialized_name="sourceProtectionContainerFriendlyName",
)
properties.state = AAZStrType()
properties.target_fabric_friendly_name = AAZStrType(
serialized_name="targetFabricFriendlyName",
)
properties.target_protection_container_friendly_name = AAZStrType(
serialized_name="targetProtectionContainerFriendlyName",
)
properties.target_protection_container_id = AAZStrType(
serialized_name="targetProtectionContainerId",
)
health_error_details = cls._schema_on_200.value.Element.properties.health_error_details
health_error_details.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.health_error_details.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.inner_health_errors = AAZListType(
serialized_name="innerHealthErrors",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
inner_health_errors = cls._schema_on_200.value.Element.properties.health_error_details.Element.inner_health_errors
inner_health_errors.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.health_error_details.Element.inner_health_errors.Element
_element.creation_time_utc = AAZStrType(
serialized_name="creationTimeUtc",
)
_element.customer_resolvability = AAZStrType(
serialized_name="customerResolvability",
)
_element.entity_id = AAZStrType(
serialized_name="entityId",
)
_element.error_category = AAZStrType(
serialized_name="errorCategory",
)
_element.error_code = AAZStrType(
serialized_name="errorCode",
)
_element.error_id = AAZStrType(
serialized_name="errorId",
)
_element.error_level = AAZStrType(
serialized_name="errorLevel",
)
_element.error_message = AAZStrType(
serialized_name="errorMessage",
)
_element.error_source = AAZStrType(
serialized_name="errorSource",
)
_element.error_type = AAZStrType(
serialized_name="errorType",
)
_element.possible_causes = AAZStrType(
serialized_name="possibleCauses",
)
_element.recommended_action = AAZStrType(
serialized_name="recommendedAction",
)
_element.recovery_provider_error_message = AAZStrType(
serialized_name="recoveryProviderErrorMessage",
)
_element.summary_message = AAZStrType(
serialized_name="summaryMessage",
)
provider_specific_details = cls._schema_on_200.value.Element.properties.provider_specific_details
provider_specific_details.instance_type = AAZStrType(
serialized_name="instanceType",
flags={"required": True},
)
disc_a2_a = cls._schema_on_200.value.Element.properties.provider_specific_details.discriminate_by("instance_type", "A2A")
disc_a2_a.agent_auto_update_status = AAZStrType(
serialized_name="agentAutoUpdateStatus",
)
disc_a2_a.automation_account_arm_id = AAZStrType(
serialized_name="automationAccountArmId",
)
disc_a2_a.automation_account_authentication_type = AAZStrType(
serialized_name="automationAccountAuthenticationType",
)
disc_a2_a.job_schedule_name = AAZStrType(
serialized_name="jobScheduleName",
)
disc_a2_a.schedule_name = AAZStrType(
serialized_name="scheduleName",
)
disc_in_mage_rcm = cls._schema_on_200.value.Element.properties.provider_specific_details.discriminate_by("instance_type", "InMageRcm")
disc_in_mage_rcm.enable_agent_auto_upgrade = AAZStrType(
serialized_name="enableAgentAutoUpgrade",
flags={"read_only": True},
)
disc_v_mware_cbt = cls._schema_on_200.value.Element.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt")
disc_v_mware_cbt.key_vault_id = AAZStrType(
serialized_name="keyVaultId",
flags={"read_only": True},
)
disc_v_mware_cbt.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"read_only": True},
)
disc_v_mware_cbt.role_size_to_nic_count_map = AAZDictType(
serialized_name="roleSizeToNicCountMap",
flags={"read_only": True},
)
disc_v_mware_cbt.service_bus_connection_string_secret_name = AAZStrType(
serialized_name="serviceBusConnectionStringSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_id = AAZStrType(
serialized_name="storageAccountId",
flags={"read_only": True},
)
disc_v_mware_cbt.storage_account_sas_secret_name = AAZStrType(
serialized_name="storageAccountSasSecretName",
flags={"read_only": True},
)
disc_v_mware_cbt.target_location = AAZStrType(
serialized_name="targetLocation",
flags={"read_only": True},
)
role_size_to_nic_count_map = cls._schema_on_200.value.Element.properties.provider_specific_details.discriminate_by("instance_type", "VMwareCbt").role_size_to_nic_count_map
role_size_to_nic_count_map.Element = AAZIntType()
return cls._schema_on_200
|
class List(AAZCommand):
'''List the protection container mappings for a protection container.
:example: protection-container mapping list
az site-recovery protection-container mapping list -g rg --fabric-name fabric_source_name --protection-container container_source_name --vault-name vault_name
'''
def _handler(self, command_args):
pass
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
pass
def _execute_operations(self):
pass
@register_callback
def pre_operations(self):
pass
@register_callback
def post_operations(self):
pass
def _output(self, *args, **kwargs):
pass
class ReplicationProtectionContainerMappingsListByReplicationProtectionContainers(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 27 | 1 | 22 | 1 | 20 | 0 | 1 | 0.02 | 1 | 2 | 1 | 0 | 5 | 0 | 6 | 6 | 370 | 39 | 326 | 52 | 299 | 5 | 139 | 42 | 122 | 2 | 1 | 1 | 18 |
9,174 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/management_group/_show.py
|
azext_network_manager.aaz.latest.network.manager.connection.management_group._show.Show.ManagementGroupNetworkManagerConnectionsGet
|
class ManagementGroupNetworkManagerConnectionsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"managementGroupId", self.ctx.args.management_group_id,
required=True,
),
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.connection_state = AAZStrType(
serialized_name="connectionState",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.network_manager_id = AAZStrType(
serialized_name="networkManagerId",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ManagementGroupNetworkManagerConnectionsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 12 | 1 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 128 | 16 | 112 | 28 | 95 | 0 | 50 | 21 | 40 | 2 | 1 | 1 | 11 |
9,175 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/management_group/_list.py
|
azext_network_manager.aaz.latest.network.manager.connection.management_group._list.List.ManagementGroupNetworkManagerConnectionsList
|
class ManagementGroupNetworkManagerConnectionsList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"managementGroupId", self.ctx.args.management_group_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.connection_state = AAZStrType(
serialized_name="connectionState",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.network_manager_id = AAZStrType(
serialized_name="networkManagerId",
)
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ManagementGroupNetworkManagerConnectionsList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 13 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 139 | 18 | 121 | 30 | 104 | 0 | 55 | 23 | 45 | 2 | 1 | 1 | 11 |
9,176 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/management_group/_delete.py
|
azext_network_manager.aaz.latest.network.manager.connection.management_group._delete.Delete.ManagementGroupNetworkManagerConnectionsDelete
|
class ManagementGroupNetworkManagerConnectionsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"managementGroupId", self.ctx.args.management_group_id,
required=True,
),
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class ManagementGroupNetworkManagerConnectionsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 8 | 8 | 57 | 9 | 48 | 19 | 34 | 0 | 26 | 14 | 17 | 3 | 1 | 1 | 10 |
9,177 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/tests/latest/test_network_analytics.py
|
azext_network_analytics.tests.latest.test_network_analytics.NetworkAnalyticsScenario
|
class NetworkAnalyticsScenario(ScenarioTest):
@ResourceGroupPreparer(parameter_name_for_location='location')
def test_data_product_e2e(self, resource_group, location, user_id="test@microsoft.com"):
self.kwargs.update({
'name': self.create_random_name(prefix='cli', length=8),
'group': resource_group,
'loc': location,
'id': user_id,
})
# create DP
self.cmd('az network-analytics data-product create --name {name} --resource-group {group} --location {loc} --publisher Microsoft --product MCC --major-version 1.0.0 --owners {id} --key-encryption-enable Enabled --encryption-key key-vault-uri=https://testkv.vault.azure.net key-name=testadx key-version=6adfebea181a443b90cc89362d5888b5 --networkacls virtual-network-rule[0].id=/subscriptions/susbcription/resourceGroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/checkVnet/subnets/default virtual-network-rule[0].action=Allow virtual-network-rule[0].state=Provisioning ip-rules[0].value=1.1.1.1 ip-rules[0].action=Allow allowed-query-ip-range-list=["1.1.1.1-2.2.2.2"] default-action=Allow --private-links-enabled Enabled --public-network-access Enabled --purview-account "/subscriptions/9a021c4c-ddcd-4e80-9155-a5b0e872f4c2/resourceGroups/aw8-compute-resgrp/providers/Microsoft.Purview/accounts/AOI-Test-Instance" --purview-collection cy5ne2 --redundancy Disabled --identity {{"type":"UserAssigned","userAssignedIdentities":{{"/subscriptions/9a021c4c-ddcd-4e80-9155-a5b0e872f4c2/resourceGroups/a40rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testiden":{{}}}}}} --tags envType=prod region=us', checks=[
self.check('name', '{name}'),
self.check('provisioningState', 'Succeeded')
])
# wait for 20 second
time.sleep(20)
# List All DP
dplist = self.cmd(
'az network-analytics data-product list').get_output_in_json()
self.assertTrue((len(dplist) > 0), msg="Data product list is empty")
# List DP
dplistinrg = self.cmd(
'az network-analytics data-product list --resource-group {group}').get_output_in_json()
self.assertEqual(
len(dplistinrg), 1, msg="Data product list should have exactly one element")
# Get DP
self.cmd('az network-analytics data-product show --name {name} --resource-group {group}', checks=[
self.check('name', '{name}'),
self.check('type', 'microsoft.networkanalytics/dataproducts')
])
# Add User Role
self.cmd(
'az network-analytics data-product add-user-role --data-product-name {name} --resource-group {group} --data-type-scope " " --principal-id {id} --principal-type user --role reader --role-id " " --user-name " "')
# wait for 20 second
time.sleep(20)
# List User Role
rolelist = self.cmd(
'az network-analytics data-product list-roles-assignment --data-product-name {name} --resource-group {group}').get_output_in_json()
self.assertEqual(rolelist['count'], 1, msg="Expected role count is 1")
self.assertEqual(rolelist['roleAssignmentResponse'][0]['principalId'],
user_id, msg="Principal ID is not matching with the user ID")
# Remove User Role
self.cmd(
'az network-analytics data-product remove-user-role --data-product-name {name} --resource-group {group} --data-type-scope " " --principal-id {id} --principal-type user --role reader --role-id " " --user-name " " --role-assignment-id " "')
# wait for 20 second
time.sleep(20)
# List User Role
emptyrolelist = self.cmd(
'az network-analytics data-product list-roles-assignment --data-product-name {name} --resource-group {group}').get_output_in_json()
self.assertEqual(
emptyrolelist['count'], 0, msg="role list ia not empty after role is deleted")
# Delete DP
self.cmd(
'az network-analytics data-product delete --name {name} --resource-group {group} --yes')
# wait for 20 second
time.sleep(20)
# List DP
dplistinrg = self.cmd(
'az network-analytics data-product list --resource-group {group}').get_output_in_json()
self.assertEqual(len(dplistinrg), 0,
msg="Data product list is not empty after deletion")
pass
|
class NetworkAnalyticsScenario(ScenarioTest):
@ResourceGroupPreparer(parameter_name_for_location='location')
def test_data_product_e2e(self, resource_group, location, user_id="test@microsoft.com"):
pass
| 3 | 0 | 61 | 14 | 33 | 14 | 1 | 0.39 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 65 | 15 | 36 | 7 | 33 | 14 | 24 | 6 | 22 | 1 | 1 | 0 | 1 |
9,178 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_wait.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._wait.Wait.DataProductsGet
|
class DataProductsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataProductName", self.ctx.args.data_product_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.identity = AAZObjectType()
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.available_minor_versions = AAZListType(
serialized_name="availableMinorVersions",
flags={"read_only": True},
)
properties.consumption_endpoints = AAZObjectType(
serialized_name="consumptionEndpoints",
)
properties.current_minor_version = AAZStrType(
serialized_name="currentMinorVersion",
)
properties.customer_encryption_key = AAZObjectType(
serialized_name="customerEncryptionKey",
)
properties.customer_managed_key_encryption_enabled = AAZStrType(
serialized_name="customerManagedKeyEncryptionEnabled",
)
properties.documentation = AAZStrType(
flags={"read_only": True},
)
properties.key_vault_url = AAZStrType(
serialized_name="keyVaultUrl",
flags={"read_only": True},
)
properties.major_version = AAZStrType(
serialized_name="majorVersion",
flags={"required": True},
)
properties.networkacls = AAZObjectType()
properties.owners = AAZListType()
properties.private_links_enabled = AAZStrType(
serialized_name="privateLinksEnabled",
)
properties.product = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
)
properties.publisher = AAZStrType(
flags={"required": True},
)
properties.purview_account = AAZStrType(
serialized_name="purviewAccount",
)
properties.purview_collection = AAZStrType(
serialized_name="purviewCollection",
)
properties.redundancy = AAZStrType()
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
available_minor_versions = cls._schema_on_200.properties.available_minor_versions
available_minor_versions.Element = AAZStrType()
consumption_endpoints = cls._schema_on_200.properties.consumption_endpoints
consumption_endpoints.file_access_resource_id = AAZStrType(
serialized_name="fileAccessResourceId",
flags={"read_only": True},
)
consumption_endpoints.file_access_url = AAZStrType(
serialized_name="fileAccessUrl",
flags={"read_only": True},
)
consumption_endpoints.ingestion_resource_id = AAZStrType(
serialized_name="ingestionResourceId",
flags={"read_only": True},
)
consumption_endpoints.ingestion_url = AAZStrType(
serialized_name="ingestionUrl",
flags={"read_only": True},
)
consumption_endpoints.query_resource_id = AAZStrType(
serialized_name="queryResourceId",
flags={"read_only": True},
)
consumption_endpoints.query_url = AAZStrType(
serialized_name="queryUrl",
flags={"read_only": True},
)
customer_encryption_key = cls._schema_on_200.properties.customer_encryption_key
customer_encryption_key.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
customer_encryption_key.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
customer_encryption_key.key_version = AAZStrType(
serialized_name="keyVersion",
flags={"required": True},
)
networkacls = cls._schema_on_200.properties.networkacls
networkacls.allowed_query_ip_range_list = AAZListType(
serialized_name="allowedQueryIpRangeList",
flags={"required": True},
)
networkacls.default_action = AAZStrType(
serialized_name="defaultAction",
flags={"required": True},
)
networkacls.ip_rules = AAZListType(
serialized_name="ipRules",
flags={"required": True},
)
networkacls.virtual_network_rule = AAZListType(
serialized_name="virtualNetworkRule",
flags={"required": True},
)
allowed_query_ip_range_list = cls._schema_on_200.properties.networkacls.allowed_query_ip_range_list
allowed_query_ip_range_list.Element = AAZStrType()
ip_rules = cls._schema_on_200.properties.networkacls.ip_rules
ip_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.networkacls.ip_rules.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType()
virtual_network_rule = cls._schema_on_200.properties.networkacls.virtual_network_rule
virtual_network_rule.Element = AAZObjectType()
_element = cls._schema_on_200.properties.networkacls.virtual_network_rule.Element
_element.action = AAZStrType()
_element.id = AAZStrType(
flags={"required": True},
)
_element.state = AAZStrType()
owners = cls._schema_on_200.properties.owners
owners.Element = AAZStrType()
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DataProductsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 31 | 2 | 29 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 299 | 30 | 269 | 40 | 252 | 0 | 113 | 33 | 103 | 2 | 1 | 1 | 11 |
9,179 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_remove_user_role.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._remove_user_role.RemoveUserRole.DataProductsRemoveUserRole
|
class DataProductsRemoveUserRole(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [204]:
return self.on_204(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/removeUserRole",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataProductName", self.ctx.args.data_product_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("dataTypeScope", AAZListType, ".data_type_scope", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("principalId", AAZStrType, ".principal_id", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("principalType", AAZStrType, ".principal_type", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("role", AAZStrType, ".role", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("roleAssignmentId", AAZStrType, ".role_assignment_id", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("roleId", AAZStrType, ".role_id",
typ_kwargs={"flags": {"required": True}})
_builder.set_prop("userName", AAZStrType, ".user_name", typ_kwargs={
"flags": {"required": True}})
data_type_scope = _builder.get(".dataTypeScope")
if data_type_scope is not None:
data_type_scope.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_204(self, session):
pass
|
class DataProductsRemoveUserRole(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_204(self, session):
pass
| 17 | 0 | 8 | 0 | 7 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 9 | 9 | 86 | 12 | 74 | 25 | 57 | 0 | 38 | 18 | 28 | 2 | 1 | 1 | 11 |
9,180 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_list_roles_assignment.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._list_roles_assignment.ListRolesAssignment.DataProductsListRolesAssignments
|
class DataProductsListRolesAssignments(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/listRolesAssignments",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataProductName", self.ctx.args.data_product_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.count = AAZIntType(
flags={"required": True},
)
_schema_on_200.role_assignment_response = AAZListType(
serialized_name="roleAssignmentResponse",
flags={"required": True},
)
role_assignment_response = cls._schema_on_200.role_assignment_response
role_assignment_response.Element = AAZObjectType()
_element = cls._schema_on_200.role_assignment_response.Element
_element.data_type_scope = AAZListType(
serialized_name="dataTypeScope",
flags={"required": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"required": True},
)
_element.principal_type = AAZStrType(
serialized_name="principalType",
flags={"required": True},
)
_element.role = AAZStrType(
flags={"required": True},
)
_element.role_assignment_id = AAZStrType(
serialized_name="roleAssignmentId",
flags={"required": True},
)
_element.role_id = AAZStrType(
serialized_name="roleId",
flags={"required": True},
)
_element.user_name = AAZStrType(
serialized_name="userName",
flags={"required": True},
)
data_type_scope = cls._schema_on_200.role_assignment_response.Element.data_type_scope
data_type_scope.Element = AAZStrType()
return cls._schema_on_200
|
class DataProductsListRolesAssignments(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 12 | 1 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 138 | 19 | 119 | 32 | 100 | 0 | 50 | 24 | 39 | 2 | 1 | 1 | 12 |
9,181 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_list.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._list.List.DataProductsListBySubscription
|
class DataProductsListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.NetworkAnalytics/dataProducts",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.available_minor_versions = AAZListType(
serialized_name="availableMinorVersions",
flags={"read_only": True},
)
properties.consumption_endpoints = AAZObjectType(
serialized_name="consumptionEndpoints",
)
properties.current_minor_version = AAZStrType(
serialized_name="currentMinorVersion",
)
properties.customer_encryption_key = AAZObjectType(
serialized_name="customerEncryptionKey",
)
properties.customer_managed_key_encryption_enabled = AAZStrType(
serialized_name="customerManagedKeyEncryptionEnabled",
)
properties.documentation = AAZStrType(
flags={"read_only": True},
)
properties.key_vault_url = AAZStrType(
serialized_name="keyVaultUrl",
flags={"read_only": True},
)
properties.major_version = AAZStrType(
serialized_name="majorVersion",
flags={"required": True},
)
properties.networkacls = AAZObjectType()
properties.owners = AAZListType()
properties.private_links_enabled = AAZStrType(
serialized_name="privateLinksEnabled",
)
properties.product = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
)
properties.publisher = AAZStrType(
flags={"required": True},
)
properties.purview_account = AAZStrType(
serialized_name="purviewAccount",
)
properties.purview_collection = AAZStrType(
serialized_name="purviewCollection",
)
properties.redundancy = AAZStrType()
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
available_minor_versions = cls._schema_on_200.value.Element.properties.available_minor_versions
available_minor_versions.Element = AAZStrType()
consumption_endpoints = cls._schema_on_200.value.Element.properties.consumption_endpoints
consumption_endpoints.file_access_resource_id = AAZStrType(
serialized_name="fileAccessResourceId",
flags={"read_only": True},
)
consumption_endpoints.file_access_url = AAZStrType(
serialized_name="fileAccessUrl",
flags={"read_only": True},
)
consumption_endpoints.ingestion_resource_id = AAZStrType(
serialized_name="ingestionResourceId",
flags={"read_only": True},
)
consumption_endpoints.ingestion_url = AAZStrType(
serialized_name="ingestionUrl",
flags={"read_only": True},
)
consumption_endpoints.query_resource_id = AAZStrType(
serialized_name="queryResourceId",
flags={"read_only": True},
)
consumption_endpoints.query_url = AAZStrType(
serialized_name="queryUrl",
flags={"read_only": True},
)
customer_encryption_key = cls._schema_on_200.value.Element.properties.customer_encryption_key
customer_encryption_key.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
customer_encryption_key.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
customer_encryption_key.key_version = AAZStrType(
serialized_name="keyVersion",
flags={"required": True},
)
networkacls = cls._schema_on_200.value.Element.properties.networkacls
networkacls.allowed_query_ip_range_list = AAZListType(
serialized_name="allowedQueryIpRangeList",
flags={"required": True},
)
networkacls.default_action = AAZStrType(
serialized_name="defaultAction",
flags={"required": True},
)
networkacls.ip_rules = AAZListType(
serialized_name="ipRules",
flags={"required": True},
)
networkacls.virtual_network_rule = AAZListType(
serialized_name="virtualNetworkRule",
flags={"required": True},
)
allowed_query_ip_range_list = cls._schema_on_200.value.Element.properties.networkacls.allowed_query_ip_range_list
allowed_query_ip_range_list.Element = AAZStrType()
ip_rules = cls._schema_on_200.value.Element.properties.networkacls.ip_rules
ip_rules.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networkacls.ip_rules.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType()
virtual_network_rule = cls._schema_on_200.value.Element.properties.networkacls.virtual_network_rule
virtual_network_rule.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networkacls.virtual_network_rule.Element
_element.action = AAZStrType()
_element.id = AAZStrType(
flags={"required": True},
)
_element.state = AAZStrType()
owners = cls._schema_on_200.value.Element.properties.owners
owners.Element = AAZStrType()
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DataProductsListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 31 | 2 | 29 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 302 | 32 | 270 | 41 | 253 | 0 | 118 | 34 | 108 | 2 | 1 | 1 | 11 |
9,182 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_list.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._list.List.DataProductsListByResourceGroup
|
class DataProductsListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType(
flags={"required": True},
)
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.id = AAZStrType(
flags={"read_only": True},
)
_element.identity = AAZObjectType()
_element.location = AAZStrType(
flags={"required": True},
)
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200.value.Element.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.available_minor_versions = AAZListType(
serialized_name="availableMinorVersions",
flags={"read_only": True},
)
properties.consumption_endpoints = AAZObjectType(
serialized_name="consumptionEndpoints",
)
properties.current_minor_version = AAZStrType(
serialized_name="currentMinorVersion",
)
properties.customer_encryption_key = AAZObjectType(
serialized_name="customerEncryptionKey",
)
properties.customer_managed_key_encryption_enabled = AAZStrType(
serialized_name="customerManagedKeyEncryptionEnabled",
)
properties.documentation = AAZStrType(
flags={"read_only": True},
)
properties.key_vault_url = AAZStrType(
serialized_name="keyVaultUrl",
flags={"read_only": True},
)
properties.major_version = AAZStrType(
serialized_name="majorVersion",
flags={"required": True},
)
properties.networkacls = AAZObjectType()
properties.owners = AAZListType()
properties.private_links_enabled = AAZStrType(
serialized_name="privateLinksEnabled",
)
properties.product = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
)
properties.publisher = AAZStrType(
flags={"required": True},
)
properties.purview_account = AAZStrType(
serialized_name="purviewAccount",
)
properties.purview_collection = AAZStrType(
serialized_name="purviewCollection",
)
properties.redundancy = AAZStrType()
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
available_minor_versions = cls._schema_on_200.value.Element.properties.available_minor_versions
available_minor_versions.Element = AAZStrType()
consumption_endpoints = cls._schema_on_200.value.Element.properties.consumption_endpoints
consumption_endpoints.file_access_resource_id = AAZStrType(
serialized_name="fileAccessResourceId",
flags={"read_only": True},
)
consumption_endpoints.file_access_url = AAZStrType(
serialized_name="fileAccessUrl",
flags={"read_only": True},
)
consumption_endpoints.ingestion_resource_id = AAZStrType(
serialized_name="ingestionResourceId",
flags={"read_only": True},
)
consumption_endpoints.ingestion_url = AAZStrType(
serialized_name="ingestionUrl",
flags={"read_only": True},
)
consumption_endpoints.query_resource_id = AAZStrType(
serialized_name="queryResourceId",
flags={"read_only": True},
)
consumption_endpoints.query_url = AAZStrType(
serialized_name="queryUrl",
flags={"read_only": True},
)
customer_encryption_key = cls._schema_on_200.value.Element.properties.customer_encryption_key
customer_encryption_key.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
customer_encryption_key.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
customer_encryption_key.key_version = AAZStrType(
serialized_name="keyVersion",
flags={"required": True},
)
networkacls = cls._schema_on_200.value.Element.properties.networkacls
networkacls.allowed_query_ip_range_list = AAZListType(
serialized_name="allowedQueryIpRangeList",
flags={"required": True},
)
networkacls.default_action = AAZStrType(
serialized_name="defaultAction",
flags={"required": True},
)
networkacls.ip_rules = AAZListType(
serialized_name="ipRules",
flags={"required": True},
)
networkacls.virtual_network_rule = AAZListType(
serialized_name="virtualNetworkRule",
flags={"required": True},
)
allowed_query_ip_range_list = cls._schema_on_200.value.Element.properties.networkacls.allowed_query_ip_range_list
allowed_query_ip_range_list.Element = AAZStrType()
ip_rules = cls._schema_on_200.value.Element.properties.networkacls.ip_rules
ip_rules.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networkacls.ip_rules.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType()
virtual_network_rule = cls._schema_on_200.value.Element.properties.networkacls.virtual_network_rule
virtual_network_rule.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.networkacls.virtual_network_rule.Element
_element.action = AAZStrType()
_element.id = AAZStrType(
flags={"required": True},
)
_element.state = AAZStrType()
owners = cls._schema_on_200.value.Element.properties.owners
owners.Element = AAZStrType()
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class DataProductsListByResourceGroup(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 32 | 2 | 29 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 306 | 32 | 274 | 41 | 257 | 0 | 118 | 34 | 108 | 2 | 1 | 1 | 11 |
9,183 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_delete.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._delete.Delete.DataProductsDelete
|
class DataProductsDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataProductName", self.ctx.args.data_product_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class DataProductsDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 84 | 9 | 75 | 20 | 61 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
9,184 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_create.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._create.Create.DataProductsCreate
|
class DataProductsCreate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200, 201]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200_201,
self.on_error,
lro_options={"final-state-via": "azure-async-operation"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataProductName", self.ctx.args.data_product_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("identity", AAZObjectType, ".identity")
_builder.set_prop("location", AAZStrType, ".location", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
identity = _builder.get(".identity")
if identity is not None:
identity.set_prop("type", AAZStrType, ".type", typ_kwargs={
"flags": {"required": True}})
identity.set_prop("userAssignedIdentities",
AAZDictType, ".user_assigned_identities")
user_assigned_identities = _builder.get(
".identity.userAssignedIdentities")
if user_assigned_identities is not None:
user_assigned_identities.set_elements(AAZObjectType, ".")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("customerEncryptionKey",
AAZObjectType, ".encryption_key")
properties.set_prop(
"customerManagedKeyEncryptionEnabled", AAZStrType, ".key_encryption_enable")
properties.set_prop("majorVersion", AAZStrType, ".major_version", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"managedResourceGroupConfiguration", AAZObjectType, ".managed_rg")
properties.set_prop(
"networkacls", AAZObjectType, ".networkacls")
properties.set_prop("owners", AAZListType, ".owners")
properties.set_prop("privateLinksEnabled",
AAZStrType, ".private_links_enabled")
properties.set_prop("product", AAZStrType, ".product", typ_kwargs={
"flags": {"required": True}})
properties.set_prop("publicNetworkAccess",
AAZStrType, ".public_network_access")
properties.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={
"flags": {"required": True}})
properties.set_prop(
"purviewAccount", AAZStrType, ".purview_account")
properties.set_prop("purviewCollection",
AAZStrType, ".purview_collection")
properties.set_prop("redundancy", AAZStrType, ".redundancy")
customer_encryption_key = _builder.get(
".properties.customerEncryptionKey")
if customer_encryption_key is not None:
customer_encryption_key.set_prop("keyName", AAZStrType, ".key_name", typ_kwargs={
"flags": {"required": True}})
customer_encryption_key.set_prop(
"keyVaultUri", AAZStrType, ".key_vault_uri", typ_kwargs={"flags": {"required": True}})
customer_encryption_key.set_prop(
"keyVersion", AAZStrType, ".key_version", typ_kwargs={"flags": {"required": True}})
managed_resource_group_configuration = _builder.get(
".properties.managedResourceGroupConfiguration")
if managed_resource_group_configuration is not None:
managed_resource_group_configuration.set_prop(
"location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}})
managed_resource_group_configuration.set_prop(
"name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}})
networkacls = _builder.get(".properties.networkacls")
if networkacls is not None:
networkacls.set_prop("allowedQueryIpRangeList", AAZListType,
".allowed_query_ip_range_list", typ_kwargs={"flags": {"required": True}})
networkacls.set_prop("defaultAction", AAZStrType, ".default_action", typ_kwargs={
"flags": {"required": True}})
networkacls.set_prop("ipRules", AAZListType, ".ip_rules", typ_kwargs={
"flags": {"required": True}})
networkacls.set_prop("virtualNetworkRule", AAZListType, ".virtual_network_rule", typ_kwargs={
"flags": {"required": True}})
allowed_query_ip_range_list = _builder.get(
".properties.networkacls.allowedQueryIpRangeList")
if allowed_query_ip_range_list is not None:
allowed_query_ip_range_list.set_elements(AAZStrType, ".")
ip_rules = _builder.get(".properties.networkacls.ipRules")
if ip_rules is not None:
ip_rules.set_elements(AAZObjectType, ".")
_elements = _builder.get(".properties.networkacls.ipRules[]")
if _elements is not None:
_elements.set_prop("action", AAZStrType, ".action", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("value", AAZStrType, ".value")
virtual_network_rule = _builder.get(
".properties.networkacls.virtualNetworkRule")
if virtual_network_rule is not None:
virtual_network_rule.set_elements(AAZObjectType, ".")
_elements = _builder.get(
".properties.networkacls.virtualNetworkRule[]")
if _elements is not None:
_elements.set_prop("action", AAZStrType, ".action")
_elements.set_prop("id", AAZStrType, ".id", typ_kwargs={
"flags": {"required": True}})
_elements.set_prop("state", AAZStrType, ".state")
owners = _builder.get(".properties.owners")
if owners is not None:
owners.set_elements(AAZStrType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.identity = AAZObjectType()
_schema_on_200_201.location = AAZStrType(
flags={"required": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
identity = cls._schema_on_200_201.identity
identity.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
identity.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
identity.type = AAZStrType(
flags={"required": True},
)
identity.user_assigned_identities = AAZDictType(
serialized_name="userAssignedIdentities",
)
user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities
user_assigned_identities.Element = AAZObjectType()
_element = cls._schema_on_200_201.identity.user_assigned_identities.Element
_element.client_id = AAZStrType(
serialized_name="clientId",
flags={"read_only": True},
)
_element.principal_id = AAZStrType(
serialized_name="principalId",
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.available_minor_versions = AAZListType(
serialized_name="availableMinorVersions",
flags={"read_only": True},
)
properties.consumption_endpoints = AAZObjectType(
serialized_name="consumptionEndpoints",
)
properties.current_minor_version = AAZStrType(
serialized_name="currentMinorVersion",
)
properties.customer_encryption_key = AAZObjectType(
serialized_name="customerEncryptionKey",
)
properties.customer_managed_key_encryption_enabled = AAZStrType(
serialized_name="customerManagedKeyEncryptionEnabled",
)
properties.documentation = AAZStrType(
flags={"read_only": True},
)
properties.key_vault_url = AAZStrType(
serialized_name="keyVaultUrl",
flags={"read_only": True},
)
properties.major_version = AAZStrType(
serialized_name="majorVersion",
flags={"required": True},
)
properties.networkacls = AAZObjectType()
properties.owners = AAZListType()
properties.private_links_enabled = AAZStrType(
serialized_name="privateLinksEnabled",
)
properties.product = AAZStrType(
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
)
properties.public_network_access = AAZStrType(
serialized_name="publicNetworkAccess",
)
properties.publisher = AAZStrType(
flags={"required": True},
)
properties.purview_account = AAZStrType(
serialized_name="purviewAccount",
)
properties.purview_collection = AAZStrType(
serialized_name="purviewCollection",
)
properties.redundancy = AAZStrType()
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
available_minor_versions = cls._schema_on_200_201.properties.available_minor_versions
available_minor_versions.Element = AAZStrType()
consumption_endpoints = cls._schema_on_200_201.properties.consumption_endpoints
consumption_endpoints.file_access_resource_id = AAZStrType(
serialized_name="fileAccessResourceId",
flags={"read_only": True},
)
consumption_endpoints.file_access_url = AAZStrType(
serialized_name="fileAccessUrl",
flags={"read_only": True},
)
consumption_endpoints.ingestion_resource_id = AAZStrType(
serialized_name="ingestionResourceId",
flags={"read_only": True},
)
consumption_endpoints.ingestion_url = AAZStrType(
serialized_name="ingestionUrl",
flags={"read_only": True},
)
consumption_endpoints.query_resource_id = AAZStrType(
serialized_name="queryResourceId",
flags={"read_only": True},
)
consumption_endpoints.query_url = AAZStrType(
serialized_name="queryUrl",
flags={"read_only": True},
)
customer_encryption_key = cls._schema_on_200_201.properties.customer_encryption_key
customer_encryption_key.key_name = AAZStrType(
serialized_name="keyName",
flags={"required": True},
)
customer_encryption_key.key_vault_uri = AAZStrType(
serialized_name="keyVaultUri",
flags={"required": True},
)
customer_encryption_key.key_version = AAZStrType(
serialized_name="keyVersion",
flags={"required": True},
)
networkacls = cls._schema_on_200_201.properties.networkacls
networkacls.allowed_query_ip_range_list = AAZListType(
serialized_name="allowedQueryIpRangeList",
flags={"required": True},
)
networkacls.default_action = AAZStrType(
serialized_name="defaultAction",
flags={"required": True},
)
networkacls.ip_rules = AAZListType(
serialized_name="ipRules",
flags={"required": True},
)
networkacls.virtual_network_rule = AAZListType(
serialized_name="virtualNetworkRule",
flags={"required": True},
)
allowed_query_ip_range_list = cls._schema_on_200_201.properties.networkacls.allowed_query_ip_range_list
allowed_query_ip_range_list.Element = AAZStrType()
ip_rules = cls._schema_on_200_201.properties.networkacls.ip_rules
ip_rules.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.networkacls.ip_rules.Element
_element.action = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType()
virtual_network_rule = cls._schema_on_200_201.properties.networkacls.virtual_network_rule
virtual_network_rule.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.networkacls.virtual_network_rule.Element
_element.action = AAZStrType()
_element.id = AAZStrType(
flags={"required": True},
)
_element.state = AAZStrType()
owners = cls._schema_on_200_201.properties.owners
owners.Element = AAZStrType()
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class DataProductsCreate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 38 | 3 | 35 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 9 | 1 | 10 | 10 | 406 | 45 | 361 | 56 | 342 | 0 | 183 | 47 | 172 | 14 | 1 | 1 | 26 |
9,185 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-analytics/azext_network_analytics/aaz/latest/network_analytics/data_product/_add_user_role.py
|
azext_network_analytics.aaz.latest.network_analytics.data_product._add_user_role.AddUserRole.DataProductsAddUserRole
|
class DataProductsAddUserRole(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkAnalytics/dataProducts/{dataProductName}/addUserRole",
**self.url_parameters
)
@property
def method(self):
return "POST"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"dataProductName", self.ctx.args.data_product_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-11-15",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("dataTypeScope", AAZListType, ".data_type_scope", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("principalId", AAZStrType, ".principal_id", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("principalType", AAZStrType, ".principal_type", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("role", AAZStrType, ".role", typ_kwargs={
"flags": {"required": True}})
_builder.set_prop("roleId", AAZStrType, ".role_id",
typ_kwargs={"flags": {"required": True}})
_builder.set_prop("userName", AAZStrType, ".user_name", typ_kwargs={
"flags": {"required": True}})
data_type_scope = _builder.get(".dataTypeScope")
if data_type_scope is not None:
data_type_scope.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.data_type_scope = AAZListType(
serialized_name="dataTypeScope",
flags={"required": True},
)
_schema_on_200.principal_id = AAZStrType(
serialized_name="principalId",
flags={"required": True},
)
_schema_on_200.principal_type = AAZStrType(
serialized_name="principalType",
flags={"required": True},
)
_schema_on_200.role = AAZStrType(
flags={"required": True},
)
_schema_on_200.role_assignment_id = AAZStrType(
serialized_name="roleAssignmentId",
flags={"required": True},
)
_schema_on_200.role_id = AAZStrType(
serialized_name="roleId",
flags={"required": True},
)
_schema_on_200.user_name = AAZStrType(
serialized_name="userName",
flags={"required": True},
)
data_type_scope = cls._schema_on_200.data_type_scope
data_type_scope.Element = AAZStrType()
return cls._schema_on_200
|
class DataProductsAddUserRole(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 19 | 0 | 11 | 1 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 136 | 18 | 118 | 31 | 99 | 0 | 54 | 23 | 43 | 2 | 1 | 1 | 13 |
9,186 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_volume_commands_ext.py
|
azext_netappfiles_preview.tests.latest.test_volume_commands_ext.AzureNetAppFilesExtVolumeServiceScenarioTest
|
class AzureNetAppFilesExtVolumeServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name, subnet_name, ip_pre):
self.cmd("az network vnet create -n %s --resource-group %s -l %s --address-prefix %s/16" %
(vnet_name, rg, RG_LOCATION, ip_pre))
self.cmd("az network vnet subnet create -n %s -g %s --vnet-name %s --address-prefixes '%s/24' --delegations 'Microsoft.Netapp/volumes'" %
(subnet_name, rg, vnet_name, ip_pre))
def current_subscription(self):
subs = self.cmd("az account show").get_output_in_json()
return subs['id']
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None, volume_name2=None):
vnet_name = self.create_random_name(prefix='cli-vnet-', length=24)
creation_token = volume_name1
subnet_name = self.create_random_name(prefix='cli-subnet-', length=16)
subnet_id = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s" % (
self.current_subscription(), rg, vnet_name, subnet_name)
tag = "--tags '%s'" % tags if tags is not None else ""
self.setup_vnet(rg, vnet_name, subnet_name, '10.12.0.0')
self.cmd("az netappfiles account create -g %s -a '%s' -l %s" %
(rg, account_name, RG_LOCATION)).get_output_in_json()
self.cmd("az netappfiles pool create -g %s -a %s -p %s -l %s %s %s" %
(rg, account_name, pool_name, RG_LOCATION, POOL_DEFAULT, tag)).get_output_in_json()
volume1 = self.cmd("az netappfiles volume create --resource-group %s --account-name %s --pool-name %s --volume-name %s -l %s %s --creation-token %s --vnet %s --subnet %s %s" %
(rg, account_name, pool_name, volume_name1, RG_LOCATION, VOLUME_DEFAULT, creation_token, vnet_name, subnet_id, tag)).get_output_in_json()
if volume_name2:
creation_token = volume_name2
self.cmd("az netappfiles volume create -g %s -a %s -p %s -v %s -l %s %s --creation-token %s --subnet-id %s --tags '%s' --vnet %s" %
(rg, account_name, pool_name, volume_name2, RG_LOCATION, VOLUME_DEFAULT, creation_token, subnet_id, tags, vnet_name)).get_output_in_json()
return volume1
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_create_delete_volumes(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
tags = "Tag1=Value1 Tag2=Value2"
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}', tags)
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
# assert volume['tags']['Tag1'] == 'Value1'
# assert volume['tags']['Tag2'] == 'Value2'
# default export policy still present
assert volume['exportPolicy']['rules'][0]['allowedClients'] == '0.0.0.0/0'
assert not volume['exportPolicy']['rules'][0]['cifs']
assert volume['exportPolicy']['rules'][0]['ruleIndex'] == 1
volume_list = self.cmd("netappfiles volume list --resource-group {rg} --account-name %s --pool-name %s" % (
account_name, pool_name)).get_output_in_json()
assert len(volume_list) == 1
self.cmd("az netappfiles volume delete --resource-group {rg} --account-name %s --pool-name %s --volume-name %s -y" % (
account_name, pool_name, volume_name))
volume_list = self.cmd("netappfiles volume list --resource-group {rg} -a %s -p %s" % (
account_name, pool_name)).get_output_in_json()
assert len(volume_list) == 0
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_list_volumes(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name1 = self.create_random_name(prefix='cli-vol-', length=24)
volume_name2 = self.create_random_name(prefix='cli-vol-', length=24)
tags = "Tag1=Value1"
self.create_volume(account_name, pool_name,
volume_name1, '{rg}', tags, volume_name2)
volume_list = self.cmd("netappfiles volume list --resource-group {rg} -a '%s' -p '%s'" % (
account_name, pool_name)).get_output_in_json()
assert len(volume_list) == 2
self.cmd("az netappfiles volume delete -g {rg} -a %s -p %s -v %s -y" % (
account_name, pool_name, volume_name1))
volume_list = self.cmd("netappfiles volume list -g {rg} -a '%s' -p '%s'" % (
account_name, pool_name)).get_output_in_json()
assert len(volume_list) == 1
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_volume_by_name(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
tags = "Tag2=Value1"
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}', tags)
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
volume = self.cmd("az netappfiles volume show --resource-group {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
assert volume['tags']['Tag2'] == 'Value1'
volume_from_id = self.cmd(
"az netappfiles volume show --ids %s" % volume['id']).get_output_in_json()
assert volume_from_id['name'] == account_name + \
'/' + pool_name + '/' + volume_name
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_update_volume(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
tags = "Tag1=Value2"
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}')
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
usage = 200
volume = self.cmd("az netappfiles volume update --resource-group {rg} -a %s -p %s -v %s --tags %s --usage-threshold %s" % (
account_name, pool_name, volume_name, tags, usage)).get_output_in_json()
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
assert volume['serviceLevel'] == "Premium" # unchanged
assert volume['tags']['Tag1'] == 'Value2'
# default export policy still present
assert volume['exportPolicy']['rules'][0]['allowedClients'] == '0.0.0.0/0'
assert not volume['exportPolicy']['rules'][0]['cifs']
assert volume['exportPolicy']['rules'][0]['ruleIndex'] == 1
@unittest.skip('Skip this test due to AFEC issue, enable when fixed')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_volume_quota_report(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
tags = "Tag2=Value1"
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}', tags)
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
volume = self.cmd("az netappfiles volume show --resource-group {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
assert volume['tags']['Tag2'] == 'Value1'
quota_report_from_id = self.cmd("az netappfiles volume list-quota-report --resource-group {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
assert len(quota_report_from_id) > 0
@unittest.skip('Skip this test due to service side issue, enable when fixed')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_split_clone_from_parent(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
tags = "Tag2=Value1"
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}', tags)
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
volume = self.cmd("az netappfiles volume show --resource-group {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
assert volume['name'] == account_name + \
'/' + pool_name + '/' + volume_name
assert volume['tags']['Tag2'] == 'Value1'
with self.assertRaises(HttpResponseError) as cm:
quota_report_from_id = self.cmd("az netappfiles volume splitclonefromparent --resource-group {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
self.assertIn('ShortTermCloneSplitCloneFromParentOperationFailed', str(
cm.exception))
|
class AzureNetAppFilesExtVolumeServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name, subnet_name, ip_pre):
pass
def current_subscription(self):
pass
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None, volume_name2=None):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_create_delete_volumes(self):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_list_volumes(self):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_volume_by_name(self):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_update_volume(self):
pass
@unittest.skip('Skip this test due to AFEC issue, enable when fixed')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_volume_quota_report(self):
pass
@unittest.skip('Skip this test due to service side issue, enable when fixed')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_split_clone_from_parent(self):
pass
| 18 | 0 | 14 | 2 | 11 | 1 | 1 | 0.05 | 1 | 1 | 0 | 0 | 9 | 0 | 9 | 9 | 139 | 26 | 109 | 60 | 91 | 5 | 100 | 53 | 90 | 3 | 1 | 1 | 11 |
9,187 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_snapshot_commands_ext.py
|
azext_netappfiles_preview.tests.latest.test_snapshot_commands_ext.AzureNetAppFilesExtSnapshotServiceScenarioTest
|
class AzureNetAppFilesExtSnapshotServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name, subnet_name):
self.cmd("az network vnet create -n %s --resource-group %s -l eastus2 --address-prefix 10.5.0.0/16" % (vnet_name, rg))
self.cmd("az network vnet subnet create -n %s --vnet-name %s --address-prefixes '10.5.0.0/24' --delegations 'Microsoft.Netapp/volumes' -g %s" %
(subnet_name, vnet_name, rg))
def current_subscription(self):
subs = self.cmd("az account show").get_output_in_json()
return subs['id']
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None):
vnet_name = self.create_random_name(prefix='cli-vnet-', length=24)
creation_token = volume_name1
subnet_name = "subnet02"
subnet_id = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s" % (
self.current_subscription(), rg, vnet_name, subnet_name)
tag = "--tags '%s'" % tags if tags is not None else ""
self.setup_vnet(rg, vnet_name, subnet_name)
self.cmd("netappfiles account create -g %s -a '%s' -l 'eastus2'" %
(rg, account_name)).get_output_in_json()
self.cmd("netappfiles pool create -g %s -a %s -p %s -l 'eastus2' %s %s" %
(rg, account_name, pool_name, POOL_DEFAULT, tag)).get_output_in_json()
volume1 = self.cmd("netappfiles volume create --resource-group %s --account-name %s --pool-name %s --volume-name %s -l 'eastus2' %s --creation-token %s --subnet-id %s %s" %
(rg, account_name, pool_name, volume_name1, VOLUME_DEFAULT, creation_token, subnet_id, tag)).get_output_in_json()
return volume1
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer()
def test_ext_create_delete_snapshots(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
snapshot_name = self.create_random_name(prefix='cli-sn-', length=24)
rg = '{rg}'
volume = self.create_volume(account_name, pool_name, volume_name, rg)
snapshot = self.cmd("az netappfiles snapshot create -g %s -a %s -p %s -v %s -s %s -l 'eastus2' --file-system-id %s" %
(rg, account_name, pool_name, volume_name, snapshot_name, volume['fileSystemId'])).get_output_in_json()
assert snapshot['name'] == account_name + '/' + \
pool_name + '/' + volume_name + '/' + snapshot_name
snapshot_list = self.cmd("az netappfiles snapshot list --resource-group %s --account-name %s --pool-name %s --volume-name %s" %
(rg, account_name, pool_name, volume_name)).get_output_in_json()
assert len(snapshot_list) == 1
self.cmd("az netappfiles snapshot delete -g %s -a %s -p %s -v %s -s %s" %
(rg, account_name, pool_name, volume_name, snapshot_name))
snapshot_list = self.cmd("az netappfiles snapshot list --resource-group %s --account-name %s --pool-name %s --volume-name %s" %
(rg, account_name, pool_name, volume_name)).get_output_in_json()
assert len(snapshot_list) == 0
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer()
def test_ext_list_snapshots(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
snapshot_name1 = self.create_random_name(prefix='cli-sn-', length=24)
snapshot_name2 = self.create_random_name(prefix='cli-sn-', length=24)
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}')
self.cmd("az netappfiles snapshot create -g {rg} -a %s -p %s -v %s -s %s -l 'eastus2' --file-system-id %s" % (
account_name, pool_name, volume_name, snapshot_name1, volume['fileSystemId'])).get_output_in_json()
self.cmd("az netappfiles snapshot create -g {rg} -a %s -p %s -v %s -s %s -l 'eastus2' --file-system-id %s" % (
account_name, pool_name, volume_name, snapshot_name2, volume['fileSystemId'])).get_output_in_json()
snapshot_list = self.cmd("az netappfiles snapshot list -g {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
assert len(snapshot_list) == 2
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer()
def test_ext_get_snapshot(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
volume_name = self.create_random_name(prefix='cli-vol-', length=24)
snapshot_name = self.create_random_name(prefix='cli-sn-', length=24)
volume = self.create_volume(
account_name, pool_name, volume_name, '{rg}')
snapshot = self.cmd("az netappfiles snapshot create -g {rg} -a %s -p %s -v %s -s %s -l 'eastus2' --file-system-id %s" % (
account_name, pool_name, volume_name, snapshot_name, volume['fileSystemId'])).get_output_in_json()
snapshot = self.cmd("az netappfiles snapshot show -g {rg} -a %s -p %s -v %s -s %s" % (
account_name, pool_name, volume_name, snapshot_name)).get_output_in_json()
assert snapshot['name'] == account_name + '/' + \
pool_name + '/' + volume_name + '/' + snapshot_name
snapshot_from_id = self.cmd(
"az netappfiles snapshot show --ids %s" % snapshot['id']).get_output_in_json()
assert snapshot_from_id['name'] == account_name + '/' + \
pool_name + '/' + volume_name + '/' + snapshot_name
|
class AzureNetAppFilesExtSnapshotServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name, subnet_name):
pass
def current_subscription(self):
pass
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None):
pass
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer()
def test_ext_create_delete_snapshots(self):
pass
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer()
def test_ext_list_snapshots(self):
pass
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer()
def test_ext_get_snapshot(self):
pass
| 13 | 0 | 10 | 1 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 6 | 73 | 13 | 60 | 39 | 47 | 0 | 54 | 36 | 47 | 2 | 1 | 0 | 7 |
9,188 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_pool_commands_ext.py
|
azext_netappfiles_preview.tests.latest.test_pool_commands_ext.AzureNetAppFilesExtPoolServiceScenarioTest
|
class AzureNetAppFilesExtPoolServiceScenarioTest(ScenarioTest):
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_create_delete_pool(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
tags = "Tag1=Value1 Tag2=Value2"
self.cmd(
"az netappfiles account create --resource-group {rg} --account-name '%s' -l 'westus2'" % account_name).get_output_in_json()
pool = self.cmd("az netappfiles pool create --resource-group {rg} --account-name %s --pool-name %s -l 'westus2' %s --tags '%s'" % (
account_name, pool_name, POOL_DEFAULT, tags)).get_output_in_json()
assert pool['name'] == account_name + '/' + pool_name
assert pool['tags']['Tag1'] == 'Value1'
assert pool['tags']['Tag2'] == 'Value2'
pool_list = self.cmd(
"netappfiles pool list --resource-group {rg} --account-name %s" % account_name).get_output_in_json()
assert len(pool_list) == 1
self.cmd(
"az netappfiles pool delete --resource-group {rg} --account-name '%s' --pool-name '%s'" % (account_name, pool_name))
pool_list = self.cmd(
"netappfiles pool list --resource-group {rg} --account-name %s" % account_name).get_output_in_json()
assert len(pool_list) == 0
# and again with short forms and also unquoted
pool = self.cmd("az netappfiles pool create -g {rg} -a %s -p %s -l 'westus2' --service-level 'Premium' --size 4398046511104 --tags '%s'" % (
account_name, pool_name, tags)).get_output_in_json()
assert pool['name'] == account_name + '/' + pool_name
assert pool['tags']['Tag1'] == 'Value1'
assert pool['tags']['Tag2'] == 'Value2'
self.cmd(
"az netappfiles pool delete --resource-group {rg} -a %s -p %s" % (account_name, pool_name))
pool_list = self.cmd(
"netappfiles pool list --resource-group {rg} -a %s" % account_name).get_output_in_json()
assert len(pool_list) == 0
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_list_pools(self):
account_name = self.create_random_name(prefix='cli', length=24)
pools = [self.create_random_name(
prefix='cli', length=24), self.create_random_name(prefix='cli', length=24)]
self.cmd(
"az netappfiles account create -g {rg} -a '%s' -l 'westus2'" % account_name).get_output_in_json()
for pool_name in pools:
self.cmd("az netappfiles pool create -g {rg} -a '%s' -p '%s' -l 'westus2' %s --tags 'Tag1=Value1'" % (
account_name, pool_name, POOL_DEFAULT)).get_output_in_json()
pool_list = self.cmd(
"netappfiles pool list -g {rg} -a '%s'" % account_name).get_output_in_json()
assert len(pool_list) == 2
for pool_name in pools:
self.cmd(
"az netappfiles pool delete -g {rg} -a %s -p %s" % (account_name, pool_name))
pool_list = self.cmd(
"netappfiles pool list --resource-group {rg} -a '%s'" % account_name).get_output_in_json()
assert len(pool_list) == 0
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_pool_by_name(self):
account_name = self.create_random_name(prefix='cli', length=24)
pool_name = self.create_random_name(prefix='cli', length=24)
self.cmd(
"az netappfiles account create -g {rg} -a '%s' -l 'westus2'" % account_name).get_output_in_json()
self.cmd("az netappfiles pool create -g {rg} -a %s -p %s -l 'westus2' %s" % (
account_name, pool_name, POOL_DEFAULT)).get_output_in_json()
pool = self.cmd("az netappfiles pool show --resource-group {rg} -a %s -p %s" % (
account_name, pool_name)).get_output_in_json()
assert pool['name'] == account_name + '/' + pool_name
pool_from_id = self.cmd(
"az netappfiles pool show --ids %s" % pool['id']).get_output_in_json()
assert pool_from_id['name'] == account_name + '/' + pool_name
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_update_pool(self):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
pool_name = self.create_random_name(prefix='cli-pool-', length=24)
tag = "Tag1=Value1"
self.cmd(
"az netappfiles account create -g {rg} -a %s -l 'westus2'" % account_name).get_output_in_json()
pool = self.cmd("az netappfiles pool create -g {rg} -a %s -p %s -l 'westus2' %s" % (
account_name, pool_name, POOL_DEFAULT)).get_output_in_json()
assert pool['name'] == account_name + '/' + pool_name
pool = self.cmd("az netappfiles pool update --resource-group {rg} -a %s -p %s --tags %s --service-level 'Standard'" % (
account_name, pool_name, tag)).get_output_in_json()
assert pool['name'] == account_name + '/' + pool_name
assert pool['serviceLevel'] == "Standard"
assert pool['tags']['Tag1'] == 'Value1'
|
class AzureNetAppFilesExtPoolServiceScenarioTest(ScenarioTest):
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_create_delete_pool(self):
pass
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_list_pools(self):
pass
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_pool_by_name(self):
pass
@unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_update_pool(self):
pass
| 13 | 0 | 17 | 3 | 13 | 0 | 2 | 0.02 | 1 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 78 | 15 | 62 | 26 | 49 | 1 | 54 | 22 | 49 | 3 | 1 | 1 | 6 |
9,189 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_mount_target_commands_ext.py
|
azext_netappfiles_preview.tests.latest.test_mount_target_commands_ext.AzureNetAppFilesExtMountTargetServiceScenarioTest
|
class AzureNetAppFilesExtMountTargetServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name):
self.cmd(
"az network vnet create -n %s --resource-group %s -l westus2" % (vnet_name, rg))
self.cmd("az network vnet subnet create -n subnet01 --vnet-name %s --address-prefixes '10.0.0.0/24' --delegations 'Microsoft.Netapp/volumes' -g %s" % (vnet_name, rg))
def current_subscription(self):
subs = self.cmd("az account show").get_output_in_json()
return subs['id']
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None):
vnet_name = "cli-vnet-lefr-01"
creation_token = volume_name1
subnet_id = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/subnet01" % (
self.current_subscription(), rg, vnet_name)
tag = "--tags '%s'" % tags if tags is not None else ""
self.setup_vnet(rg, vnet_name)
self.cmd("az netappfiles account create -g %s -a '%s' -l 'westus2'" %
(rg, account_name)).get_output_in_json()
self.cmd("az netappfiles pool create -g %s -a %s -p %s -l 'westus2' %s %s" %
(rg, account_name, pool_name, POOL_DEFAULT, tag)).get_output_in_json()
volume1 = self.cmd("az netappfiles volume create --resource-group %s --account-name %s --pool-name %s --volume-name %s -l 'westus2' %s --creation-token %s --subnet-id %s %s" %
(rg, account_name, pool_name, volume_name1, VOLUME_DEFAULT, creation_token, subnet_id, tag)).get_output_in_json()
return volume1
@unittest.skip('This command is deprecated')
@ResourceGroupPreparer()
def test_ext_list_mount_targets(self):
account_name = "cli-acc-lefr-01"
pool_name = "cli-pool-lefr-01"
volume_name = "cli-volume-lefr-01"
self.create_volume(account_name, pool_name, volume_name, '{rg}')
volume_list = self.cmd("netappfiles mount-target list --resource-group {rg} -a %s -p %s -v %s" % (
account_name, pool_name, volume_name)).get_output_in_json()
assert len(volume_list) == 1
|
class AzureNetAppFilesExtMountTargetServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name):
pass
def current_subscription(self):
pass
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None):
pass
@unittest.skip('This command is deprecated')
@ResourceGroupPreparer()
def test_ext_list_mount_targets(self):
pass
| 7 | 0 | 7 | 1 | 6 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 32 | 6 | 26 | 16 | 19 | 0 | 24 | 15 | 19 | 2 | 1 | 0 | 5 |
9,190 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_backupvault_commands_ext.py
|
azext_netappfiles_preview.tests.latest.test_backupvault_commands_ext.AzureNetAppFilesExtBackupvaultServiceScenarioTest
|
class AzureNetAppFilesExtBackupvaultServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name, subnet_name, ip_pre):
self.cmd("az network vnet create -n %s --resource-group %s -l %s --address-prefix %s/16" %
(vnet_name, rg, RG_LOCATION, ip_pre))
self.cmd("az network vnet subnet create -n %s -g %s --vnet-name %s --address-prefixes '%s/24' --delegations 'Microsoft.Netapp/volumes'" %
(subnet_name, rg, vnet_name, ip_pre))
def current_subscription(self):
subs = self.cmd("az account show").get_output_in_json()
return subs['id']
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None, volume_name2=None):
vnet_name = self.create_random_name(prefix='cli-vnet-', length=24)
creation_token = volume_name1
subnet_name = self.create_random_name(prefix='cli-subnet-', length=16)
subnet_id = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s" % (
self.current_subscription(), rg, vnet_name, subnet_name)
tag = "--tags '%s'" % tags if tags is not None else ""
self.setup_vnet(rg, vnet_name, subnet_name, '10.12.0.0')
self.cmd("az netappfiles account create -g %s -a '%s' -l %s" %
(rg, account_name, RG_LOCATION)).get_output_in_json()
self.cmd("az netappfiles pool create -g %s -a %s -p %s -l %s %s %s" %
(rg, account_name, pool_name, RG_LOCATION, POOL_DEFAULT, tag)).get_output_in_json()
volume1 = self.cmd("az netappfiles volume create --resource-group %s --account-name %s --pool-name %s --volume-name %s -l %s %s --creation-token %s --vnet %s --subnet %s %s" %
(rg, account_name, pool_name, volume_name1, RG_LOCATION, VOLUME_DEFAULT, creation_token, vnet_name, subnet_id, tag)).get_output_in_json()
if volume_name2:
creation_token = volume_name2
self.cmd("az netappfiles volume create -g %s -a %s -p %s -v %s -l %s %s --creation-token %s --subnet-id %s --tags '%s' --vnet %s" %
(rg, account_name, pool_name, volume_name2, RG_LOCATION, VOLUME_DEFAULT, creation_token, subnet_id, tags, vnet_name)).get_output_in_json()
return volume1
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_create_delete_backupvault(self, resource_group):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
vault_name = self.create_random_name(
prefix='cli-backupvault-', length=24)
tags = "Tag1=Value1 Tag2=Value2"
self.cmd(
f"az netappfiles account create -g {resource_group} -a {account_name} -l {RG_LOCATION}")
backupvault = self.cmd(
f"az netappfiles account backup-vault create -g {resource_group} -a {account_name} -n {vault_name} -l {RG_LOCATION} --tags {tags}").get_output_in_json()
assert backupvault['name'] == account_name + '/' + vault_name
# assert volume['tags']['Tag1'] == 'Value1'
# assert volume['tags']['Tag2'] == 'Value2'
backupvault_list = self.cmd(
f"az netappfiles account backup-vault list --resource-group {resource_group} -a {account_name}").get_output_in_json()
assert len(backupvault_list) == 1
self.cmd(
f"az netappfiles account backup-vault delete --resource-group {resource_group} -a {account_name} -n {vault_name} -y")
backupvault_list = self.cmd(
f"az netappfiles account backup-vault list --resource-group {resource_group} -a {account_name}").get_output_in_json()
assert len(backupvault_list) == 0
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_backupvault_by_name(self, resource_group):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
vault_name = self.create_random_name(
prefix='cli-backupvault-', length=24)
tags = "Tag1=Value1 Tag2=Value2"
self.cmd(
f"az netappfiles account create -g {resource_group} -a {account_name} -l {RG_LOCATION}")
backupvault = self.cmd(
f"az netappfiles account backup-vault create -g {resource_group} -a {account_name} -n {vault_name} -l {RG_LOCATION} --tags {tags}").get_output_in_json()
assert backupvault['name'] == account_name + '/' + vault_name
backupvault = self.cmd(
f"az netappfiles account backup-vault show --resource-group {resource_group} -a {account_name} -n {vault_name}").get_output_in_json()
assert backupvault['name'] == account_name + '/' + vault_name
assert backupvault['tags']['Tag2'] == 'Value2'
backupvault_from_id = self.cmd(
f"az netappfiles account backup-vault show --ids {backupvault['id']} ").get_output_in_json()
assert backupvault_from_id['name'] == account_name + '/' + vault_name
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_update_backupvault(self, resource_group):
account_name = self.create_random_name(prefix='cli-acc-', length=24)
vault_name = self.create_random_name(
prefix='cli-backupvault-', length=24)
tags = "Tag1=Value1 Tag2=Value2"
self.cmd(
f"az netappfiles account create -g {resource_group} -a {account_name} -l {RG_LOCATION}")
backupvault = self.cmd(
f"az netappfiles account backup-vault create -g {resource_group} -a {account_name} -n {vault_name} -l {RG_LOCATION} --tags {tags}").get_output_in_json()
assert backupvault['name'] == account_name + '/' + vault_name
tags = "Tag1=Value1 Tag2=Value2Updated"
backupvault = self.cmd(
f"az netappfiles account backup-vault update -g {resource_group} -a {account_name} -n {vault_name} --tags {tags}").get_output_in_json()
assert backupvault['name'] == account_name + '/' + vault_name
assert backupvault['tags']['Tag2'] == 'Value2Updated'
|
class AzureNetAppFilesExtBackupvaultServiceScenarioTest(ScenarioTest):
def setup_vnet(self, rg, vnet_name, subnet_name, ip_pre):
pass
def current_subscription(self):
pass
def create_volume(self, account_name, pool_name, volume_name1, rg, tags=None, volume_name2=None):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_create_delete_backupvault(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_get_backupvault_by_name(self, resource_group):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg')
def test_ext_update_backupvault(self, resource_group):
pass
| 10 | 0 | 11 | 2 | 9 | 0 | 1 | 0.03 | 1 | 0 | 0 | 0 | 6 | 0 | 6 | 6 | 77 | 16 | 59 | 31 | 49 | 2 | 56 | 28 | 49 | 3 | 1 | 1 | 8 |
9,191 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/tests/latest/test_account_commands_ext.py
|
azext_netappfiles_preview.tests.latest.test_account_commands_ext.AzureNetAppFilesExtAccountServiceScenarioTest
|
class AzureNetAppFilesExtAccountServiceScenarioTest(ScenarioTest):
# @unittest.skip('This command is available from main module now')
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_create_delete_account(self):
account_name = self.create_random_name(prefix='cli', length=24)
tags = 'Tag1=Value1 Tag2=Value2'
# active_directories = '[{"username": "aduser", "password": "aduser", "smbservername": "SMBSERVER", "dns": "1.2.3.4", "domain": "westcentralus"}]'
# create and check
# account = self.cmd("az netappfiles account create --resource-group {rg} --account-name '%s' -l 'westus2' --tags '%s' --active-directories %s" % (account_name, tags, active_directories)).get_output_in_json()
account = self.cmd("az netappfiles account create --resource-group {rg} --account-name '%s' -l 'westus2' --tags %s" % (
account_name, tags)).get_output_in_json()
assert account['name'] == account_name
# assert account['tags']['Tag1'] == 'Value1'
# assert account['tags']['Tag2'] == 'Value2'
# not provided in call - interpreted as kwargs. Tested at command line instead.
# assert account['active_directories'][0]['username'] == 'aduser'
# assert account['active_directories'][0]['smbservername'] == 'SMBSERVER'
account_list = self.cmd(
"netappfiles account list --resource-group {rg}").get_output_in_json()
assert len(account_list) > 0
# delete and recheck
self.cmd(
"az netappfiles account delete --resource-group {rg} --account-name '%s' -y" % account_name)
account_list = self.cmd(
"netappfiles account list --resource-group {rg}").get_output_in_json()
assert len(account_list) == 0
# and again with short forms and also unquoted
account = self.cmd("az netappfiles account create -g {rg} -a %s -l westus2 --tags %s" % (
account_name, tags)).get_output_in_json()
assert account['name'] == account_name
# note: key case must match
# assert account['activeDirectories'] is None
assert account['tags']['Tag1'] == 'Value1'
account_list = self.cmd(
"netappfiles account list --resource-group {rg}").get_output_in_json()
assert len(account_list) > 0
self.cmd(
"az netappfiles account delete --resource-group {rg} -a %s -y" % account_name)
account_list = self.cmd(
"netappfiles account list --resource-group {rg}").get_output_in_json()
assert len(account_list) == 0
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_list_accounts_ext(self):
accounts = [self.create_random_name(
prefix='cli', length=24), self.create_random_name(prefix='cli', length=24)]
for account_name in accounts:
self.cmd(
"az netappfiles account create -g {rg} -a %s -l 'westus2' --tags 'Tag1=Value1'" % account_name).get_output_in_json()
account_list = self.cmd(
"netappfiles account list -g {rg}").get_output_in_json()
assert len(account_list) == 2
for account_name in accounts:
self.cmd(
"az netappfiles account delete -g {rg} -a %s -y" % account_name)
account_list = self.cmd(
"netappfiles account list --resource-group {rg}").get_output_in_json()
assert len(account_list) == 0
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_get_account_by_name_ext(self):
account_name = self.create_random_name(prefix='cli', length=24)
account = self.cmd(
"az netappfiles account create -g {rg} -a %s -l 'westus2'" % account_name).get_output_in_json()
account = self.cmd(
"az netappfiles account show --resource-group {rg} -a %s" % account_name).get_output_in_json()
assert account['name'] == account_name
account_from_id = self.cmd(
"az netappfiles account show --ids %s" % account['id']).get_output_in_json()
assert account_from_id['name'] == account_name
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_update_account_ext(self):
# only tags are checked here due to complications of active directory in automated test
account_name = self.create_random_name(prefix='cli', length=24)
tag = "Tag1=Value1"
account = self.cmd(
"az netappfiles account create -g {rg} -a %s -l 'westus2'" % account_name).get_output_in_json()
account = self.cmd("az netappfiles account update --resource-group {rg} -a %s --tags %s " % (
account_name, tag)).get_output_in_json()
assert account['name'] == account_name
assert account['tags']['Tag1'] == 'Value1'
|
class AzureNetAppFilesExtAccountServiceScenarioTest(ScenarioTest):
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_create_delete_account(self):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_list_accounts_ext(self):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_get_account_by_name_ext(self):
pass
@ResourceGroupPreparer(name_prefix='cli_tests_rg_')
def test_ext_update_account_ext(self):
pass
| 9 | 0 | 17 | 3 | 11 | 3 | 2 | 0.3 | 1 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 75 | 14 | 47 | 22 | 38 | 14 | 43 | 18 | 38 | 3 | 1 | 1 | 6 |
9,192 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/volume/latest_backup_status/current/_show.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.volume.latest_backup_status.current._show.Show.BackupsGetLatestStatus
|
class BackupsGetLatestStatus(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}/latestBackupStatus/current",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.account_name,
required=True,
),
**self.serialize_url_param(
"poolName", self.ctx.args.pool_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"volumeName", self.ctx.args.volume_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.error_message = AAZStrType(
serialized_name="errorMessage",
flags={"read_only": True},
)
_schema_on_200.healthy = AAZBoolType(
flags={"read_only": True},
)
_schema_on_200.last_transfer_size = AAZIntType(
serialized_name="lastTransferSize",
flags={"read_only": True},
)
_schema_on_200.last_transfer_type = AAZStrType(
serialized_name="lastTransferType",
flags={"read_only": True},
)
_schema_on_200.mirror_state = AAZStrType(
serialized_name="mirrorState",
flags={"read_only": True},
)
_schema_on_200.relationship_status = AAZStrType(
serialized_name="relationshipStatus",
flags={"read_only": True},
)
_schema_on_200.total_transfer_bytes = AAZIntType(
serialized_name="totalTransferBytes",
flags={"read_only": True},
)
_schema_on_200.transfer_progress_bytes = AAZIntType(
serialized_name="transferProgressBytes",
flags={"read_only": True},
)
_schema_on_200.unhealthy_reason = AAZStrType(
serialized_name="unhealthyReason",
flags={"read_only": True},
)
return cls._schema_on_200
|
class BackupsGetLatestStatus(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 12 | 0 | 11 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 126 | 14 | 112 | 26 | 95 | 0 | 42 | 19 | 32 | 2 | 1 | 1 | 11 |
9,193 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/netappfiles-preview/azext_netappfiles_preview/aaz/latest/netappfiles/volume/_wait.py
|
azext_netappfiles_preview.aaz.latest.netappfiles.volume._wait.Wait.VolumesGet
|
class VolumesGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}/volumes/{volumeName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "MgmtErrorFormat"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"accountName", self.ctx.args.account_name,
required=True,
),
**self.serialize_url_param(
"poolName", self.ctx.args.pool_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
**self.serialize_url_param(
"volumeName", self.ctx.args.volume_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-03-01-preview",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.location = AAZStrType(
flags={"required": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"required": True, "client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.tags = AAZDictType()
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.zones = AAZListType()
properties = cls._schema_on_200.properties
properties.accept_grow_capacity_pool_for_short_term_clone_split = AAZStrType(
serialized_name="acceptGrowCapacityPoolForShortTermCloneSplit",
)
properties.actual_throughput_mibps = AAZFloatType(
serialized_name="actualThroughputMibps",
flags={"read_only": True},
)
properties.avs_data_store = AAZStrType(
serialized_name="avsDataStore",
)
properties.backup_id = AAZStrType(
serialized_name="backupId",
nullable=True,
)
properties.baremetal_tenant_id = AAZStrType(
serialized_name="baremetalTenantId",
flags={"read_only": True},
)
properties.capacity_pool_resource_id = AAZStrType(
serialized_name="capacityPoolResourceId",
)
properties.clone_progress = AAZIntType(
serialized_name="cloneProgress",
nullable=True,
flags={"read_only": True},
)
properties.cool_access = AAZBoolType(
serialized_name="coolAccess",
)
properties.cool_access_retrieval_policy = AAZStrType(
serialized_name="coolAccessRetrievalPolicy",
)
properties.coolness_period = AAZIntType(
serialized_name="coolnessPeriod",
)
properties.creation_token = AAZStrType(
serialized_name="creationToken",
flags={"required": True},
)
properties.data_protection = AAZObjectType(
serialized_name="dataProtection",
)
properties.data_store_resource_id = AAZListType(
serialized_name="dataStoreResourceId",
flags={"read_only": True},
)
properties.default_group_quota_in_ki_bs = AAZIntType(
serialized_name="defaultGroupQuotaInKiBs",
)
properties.default_user_quota_in_ki_bs = AAZIntType(
serialized_name="defaultUserQuotaInKiBs",
)
properties.delete_base_snapshot = AAZBoolType(
serialized_name="deleteBaseSnapshot",
)
properties.enable_subvolumes = AAZStrType(
serialized_name="enableSubvolumes",
)
properties.encrypted = AAZBoolType(
flags={"read_only": True},
)
properties.encryption_key_source = AAZStrType(
serialized_name="encryptionKeySource",
)
properties.export_policy = AAZObjectType(
serialized_name="exportPolicy",
)
properties.file_access_logs = AAZStrType(
serialized_name="fileAccessLogs",
flags={"read_only": True},
)
properties.file_system_id = AAZStrType(
serialized_name="fileSystemId",
flags={"read_only": True},
)
properties.inherited_size_in_bytes = AAZIntType(
serialized_name="inheritedSizeInBytes",
nullable=True,
flags={"read_only": True},
)
properties.is_default_quota_enabled = AAZBoolType(
serialized_name="isDefaultQuotaEnabled",
)
properties.is_large_volume = AAZBoolType(
serialized_name="isLargeVolume",
)
properties.is_restoring = AAZBoolType(
serialized_name="isRestoring",
)
properties.kerberos_enabled = AAZBoolType(
serialized_name="kerberosEnabled",
)
properties.key_vault_private_endpoint_resource_id = AAZStrType(
serialized_name="keyVaultPrivateEndpointResourceId",
)
properties.language = AAZStrType(
nullable=True,
)
properties.ldap_enabled = AAZBoolType(
serialized_name="ldapEnabled",
)
properties.maximum_number_of_files = AAZIntType(
serialized_name="maximumNumberOfFiles",
flags={"read_only": True},
)
properties.mount_targets = AAZListType(
serialized_name="mountTargets",
flags={"read_only": True},
)
properties.network_features = AAZStrType(
serialized_name="networkFeatures",
)
properties.network_sibling_set_id = AAZStrType(
serialized_name="networkSiblingSetId",
flags={"read_only": True},
)
properties.originating_resource_id = AAZStrType(
serialized_name="originatingResourceId",
nullable=True,
flags={"read_only": True},
)
properties.placement_rules = AAZListType(
serialized_name="placementRules",
)
properties.protocol_types = AAZListType(
serialized_name="protocolTypes",
)
properties.provisioned_availability_zone = AAZStrType(
serialized_name="provisionedAvailabilityZone",
nullable=True,
flags={"read_only": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.proximity_placement_group = AAZStrType(
serialized_name="proximityPlacementGroup",
)
properties.security_style = AAZStrType(
serialized_name="securityStyle",
)
properties.service_level = AAZStrType(
serialized_name="serviceLevel",
)
properties.smb_access_based_enumeration = AAZStrType(
serialized_name="smbAccessBasedEnumeration",
nullable=True,
)
properties.smb_continuously_available = AAZBoolType(
serialized_name="smbContinuouslyAvailable",
)
properties.smb_encryption = AAZBoolType(
serialized_name="smbEncryption",
)
properties.smb_non_browsable = AAZStrType(
serialized_name="smbNonBrowsable",
)
properties.snapshot_directory_visible = AAZBoolType(
serialized_name="snapshotDirectoryVisible",
)
properties.snapshot_id = AAZStrType(
serialized_name="snapshotId",
nullable=True,
)
properties.storage_to_network_proximity = AAZStrType(
serialized_name="storageToNetworkProximity",
flags={"read_only": True},
)
properties.subnet_id = AAZStrType(
serialized_name="subnetId",
flags={"required": True},
)
properties.t2_network = AAZStrType(
serialized_name="t2Network",
flags={"read_only": True},
)
properties.throughput_mibps = AAZFloatType(
serialized_name="throughputMibps",
nullable=True,
)
properties.unix_permissions = AAZStrType(
serialized_name="unixPermissions",
nullable=True,
)
properties.usage_threshold = AAZIntType(
serialized_name="usageThreshold",
flags={"required": True},
)
properties.volume_group_name = AAZStrType(
serialized_name="volumeGroupName",
flags={"read_only": True},
)
properties.volume_spec_name = AAZStrType(
serialized_name="volumeSpecName",
)
properties.volume_type = AAZStrType(
serialized_name="volumeType",
)
data_protection = cls._schema_on_200.properties.data_protection
data_protection.backup = AAZObjectType()
data_protection.replication = AAZObjectType()
data_protection.snapshot = AAZObjectType()
data_protection.volume_relocation = AAZObjectType(
serialized_name="volumeRelocation",
)
backup = cls._schema_on_200.properties.data_protection.backup
backup.backup_policy_id = AAZStrType(
serialized_name="backupPolicyId",
)
backup.backup_vault_id = AAZStrType(
serialized_name="backupVaultId",
)
backup.policy_enforced = AAZBoolType(
serialized_name="policyEnforced",
)
replication = cls._schema_on_200.properties.data_protection.replication
replication.destination_replications = AAZListType(
serialized_name="destinationReplications",
flags={"read_only": True},
)
replication.endpoint_type = AAZStrType(
serialized_name="endpointType",
)
replication.remote_path = AAZObjectType(
serialized_name="remotePath",
)
replication.remote_volume_region = AAZStrType(
serialized_name="remoteVolumeRegion",
)
replication.remote_volume_resource_id = AAZStrType(
serialized_name="remoteVolumeResourceId",
flags={"required": True},
)
replication.replication_id = AAZStrType(
serialized_name="replicationId",
flags={"read_only": True},
)
replication.replication_schedule = AAZStrType(
serialized_name="replicationSchedule",
)
destination_replications = cls._schema_on_200.properties.data_protection.replication.destination_replications
destination_replications.Element = AAZObjectType()
_element = cls._schema_on_200.properties.data_protection.replication.destination_replications.Element
_element.region = AAZStrType()
_element.replication_type = AAZStrType(
serialized_name="replicationType",
)
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.zone = AAZStrType()
remote_path = cls._schema_on_200.properties.data_protection.replication.remote_path
remote_path.external_host_name = AAZStrType(
serialized_name="externalHostName",
flags={"required": True},
)
remote_path.server_name = AAZStrType(
serialized_name="serverName",
flags={"required": True},
)
remote_path.volume_name = AAZStrType(
serialized_name="volumeName",
flags={"required": True},
)
snapshot = cls._schema_on_200.properties.data_protection.snapshot
snapshot.snapshot_policy_id = AAZStrType(
serialized_name="snapshotPolicyId",
)
volume_relocation = cls._schema_on_200.properties.data_protection.volume_relocation
volume_relocation.ready_to_be_finalized = AAZBoolType(
serialized_name="readyToBeFinalized",
flags={"read_only": True},
)
volume_relocation.relocation_requested = AAZBoolType(
serialized_name="relocationRequested",
)
data_store_resource_id = cls._schema_on_200.properties.data_store_resource_id
data_store_resource_id.Element = AAZStrType()
export_policy = cls._schema_on_200.properties.export_policy
export_policy.rules = AAZListType()
rules = cls._schema_on_200.properties.export_policy.rules
rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.export_policy.rules.Element
_element.allowed_clients = AAZStrType(
serialized_name="allowedClients",
)
_element.chown_mode = AAZStrType(
serialized_name="chownMode",
)
_element.cifs = AAZBoolType()
_element.has_root_access = AAZBoolType(
serialized_name="hasRootAccess",
)
_element.kerberos5_read_only = AAZBoolType(
serialized_name="kerberos5ReadOnly",
)
_element.kerberos5_read_write = AAZBoolType(
serialized_name="kerberos5ReadWrite",
)
_element.kerberos5i_read_only = AAZBoolType(
serialized_name="kerberos5iReadOnly",
)
_element.kerberos5i_read_write = AAZBoolType(
serialized_name="kerberos5iReadWrite",
)
_element.kerberos5p_read_only = AAZBoolType(
serialized_name="kerberos5pReadOnly",
)
_element.kerberos5p_read_write = AAZBoolType(
serialized_name="kerberos5pReadWrite",
)
_element.nfsv3 = AAZBoolType()
_element.nfsv41 = AAZBoolType()
_element.rule_index = AAZIntType(
serialized_name="ruleIndex",
)
_element.unix_read_only = AAZBoolType(
serialized_name="unixReadOnly",
)
_element.unix_read_write = AAZBoolType(
serialized_name="unixReadWrite",
)
mount_targets = cls._schema_on_200.properties.mount_targets
mount_targets.Element = AAZObjectType()
_element = cls._schema_on_200.properties.mount_targets.Element
_element.file_system_id = AAZStrType(
serialized_name="fileSystemId",
flags={"required": True},
)
_element.ip_address = AAZStrType(
serialized_name="ipAddress",
flags={"read_only": True},
)
_element.mount_target_id = AAZStrType(
serialized_name="mountTargetId",
flags={"read_only": True},
)
_element.smb_server_fqdn = AAZStrType(
serialized_name="smbServerFqdn",
)
placement_rules = cls._schema_on_200.properties.placement_rules
placement_rules.Element = AAZObjectType()
_element = cls._schema_on_200.properties.placement_rules.Element
_element.key = AAZStrType(
flags={"required": True},
)
_element.value = AAZStrType(
flags={"required": True},
)
protocol_types = cls._schema_on_200.properties.protocol_types
protocol_types.Element = AAZStrType()
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.tags
tags.Element = AAZStrType()
zones = cls._schema_on_200.zones
zones.Element = AAZStrType()
return cls._schema_on_200
|
class VolumesGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 55 | 3 | 52 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 512 | 35 | 477 | 44 | 460 | 0 | 180 | 37 | 170 | 2 | 1 | 1 | 11 |
9,194 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/_create.py
|
azext_network_manager.aaz.latest.network.manager._create.Create.NetworkManagersCreateOrUpdate
|
class NetworkManagersCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"networkManagerName", self.ctx.args.network_manager_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("id", AAZStrType, ".id")
_builder.set_prop("location", AAZStrType, ".location")
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
_builder.set_prop("tags", AAZDictType, ".tags")
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("networkManagerScopeAccesses", AAZListType,
".network_manager_scope_accesses", typ_kwargs={"flags": {"required": True}})
properties.set_prop("networkManagerScopes", AAZObjectType, ".network_manager_scopes", typ_kwargs={
"flags": {"required": True}})
network_manager_scope_accesses = _builder.get(
".properties.networkManagerScopeAccesses")
if network_manager_scope_accesses is not None:
network_manager_scope_accesses.set_elements(AAZStrType, ".")
network_manager_scopes = _builder.get(
".properties.networkManagerScopes")
if network_manager_scopes is not None:
network_manager_scopes.set_prop(
"managementGroups", AAZListType, ".management_groups")
network_manager_scopes.set_prop(
"subscriptions", AAZListType, ".subscriptions")
management_groups = _builder.get(
".properties.networkManagerScopes.managementGroups")
if management_groups is not None:
management_groups.set_elements(AAZStrType, ".")
subscriptions = _builder.get(
".properties.networkManagerScopes.subscriptions")
if subscriptions is not None:
subscriptions.set_elements(AAZStrType, ".")
tags = _builder.get(".tags")
if tags is not None:
tags.set_elements(AAZStrType, ".")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.id = AAZStrType()
_schema_on_200_201.location = AAZStrType()
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.tags = AAZDictType()
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.description = AAZStrType()
properties.network_manager_scope_accesses = AAZListType(
serialized_name="networkManagerScopeAccesses",
flags={"required": True},
)
properties.network_manager_scopes = AAZObjectType(
serialized_name="networkManagerScopes",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
network_manager_scope_accesses = cls._schema_on_200_201.properties.network_manager_scope_accesses
network_manager_scope_accesses.Element = AAZStrType()
network_manager_scopes = cls._schema_on_200_201.properties.network_manager_scopes
network_manager_scopes.cross_tenant_scopes = AAZListType(
serialized_name="crossTenantScopes",
flags={"read_only": True},
)
network_manager_scopes.management_groups = AAZListType(
serialized_name="managementGroups",
)
network_manager_scopes.subscriptions = AAZListType()
cross_tenant_scopes = cls._schema_on_200_201.properties.network_manager_scopes.cross_tenant_scopes
cross_tenant_scopes.Element = AAZObjectType()
_element = cls._schema_on_200_201.properties.network_manager_scopes.cross_tenant_scopes.Element
_element.management_groups = AAZListType(
serialized_name="managementGroups",
flags={"read_only": True},
)
_element.subscriptions = AAZListType(
flags={"read_only": True},
)
_element.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
management_groups = cls._schema_on_200_201.properties.network_manager_scopes.cross_tenant_scopes.Element.management_groups
management_groups.Element = AAZStrType()
subscriptions = cls._schema_on_200_201.properties.network_manager_scopes.cross_tenant_scopes.Element.subscriptions
subscriptions.Element = AAZStrType()
management_groups = cls._schema_on_200_201.properties.network_manager_scopes.management_groups
management_groups.Element = AAZStrType()
subscriptions = cls._schema_on_200_201.properties.network_manager_scopes.subscriptions
subscriptions.Element = AAZStrType()
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200_201.tags
tags.Element = AAZStrType()
return cls._schema_on_200_201
|
class NetworkManagersCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 21 | 2 | 19 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 229 | 33 | 196 | 44 | 177 | 0 | 104 | 36 | 93 | 7 | 1 | 1 | 18 |
9,195 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/_delete.py
|
azext_network_manager.aaz.latest.network.manager._delete.Delete.NetworkManagersDelete
|
class NetworkManagersDelete(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [202]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [200]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_200,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
if session.http_response.status_code in [204]:
return self.client.build_lro_polling(
self.ctx.args.no_wait,
session,
self.on_204,
self.on_error,
lro_options={"final-state-via": "location"},
path_format_arguments=self.url_parameters,
)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}",
**self.url_parameters
)
@property
def method(self):
return "DELETE"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"networkManagerName", self.ctx.args.network_manager_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"force", self.ctx.args.force,
),
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
def on_200(self, session):
pass
def on_204(self, session):
pass
|
class NetworkManagersDelete(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
def on_200(self, session):
pass
def on_204(self, session):
pass
| 14 | 0 | 9 | 0 | 9 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 1 | 8 | 8 | 87 | 9 | 78 | 20 | 64 | 0 | 28 | 14 | 19 | 4 | 1 | 1 | 11 |
9,196 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/_list.py
|
azext_network_manager.aaz.latest.network.manager._list.List.NetworkManagersList
|
class NetworkManagersList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_element.id = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.description = AAZStrType()
properties.network_manager_scope_accesses = AAZListType(
serialized_name="networkManagerScopeAccesses",
flags={"required": True},
)
properties.network_manager_scopes = AAZObjectType(
serialized_name="networkManagerScopes",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
network_manager_scope_accesses = cls._schema_on_200.value.Element.properties.network_manager_scope_accesses
network_manager_scope_accesses.Element = AAZStrType()
network_manager_scopes = cls._schema_on_200.value.Element.properties.network_manager_scopes
network_manager_scopes.cross_tenant_scopes = AAZListType(
serialized_name="crossTenantScopes",
flags={"read_only": True},
)
network_manager_scopes.management_groups = AAZListType(
serialized_name="managementGroups",
)
network_manager_scopes.subscriptions = AAZListType()
cross_tenant_scopes = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes
cross_tenant_scopes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes.Element
_element.management_groups = AAZListType(
serialized_name="managementGroups",
flags={"read_only": True},
)
_element.subscriptions = AAZListType(
flags={"read_only": True},
)
_element.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
management_groups = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes.Element.management_groups
management_groups.Element = AAZStrType()
subscriptions = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes.Element.subscriptions
subscriptions.Element = AAZStrType()
management_groups = cls._schema_on_200.value.Element.properties.network_manager_scopes.management_groups
management_groups.Element = AAZStrType()
subscriptions = cls._schema_on_200.value.Element.properties.network_manager_scopes.subscriptions
subscriptions.Element = AAZStrType()
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NetworkManagersList(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 20 | 2 | 18 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 196 | 27 | 169 | 36 | 152 | 0 | 81 | 29 | 71 | 2 | 1 | 1 | 11 |
9,197 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/_list.py
|
azext_network_manager.aaz.latest.network.manager._list.List.NetworkManagersListBySubscription
|
class NetworkManagersListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"$skipToken", self.ctx.args.skip_token,
),
**self.serialize_query_param(
"$top", self.ctx.args.top,
),
**self.serialize_query_param(
"api-version", "2023-09-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
)
_schema_on_200.value = AAZListType()
value = cls._schema_on_200.value
value.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element
_element.etag = AAZStrType(
flags={"read_only": True},
)
_element.id = AAZStrType()
_element.location = AAZStrType()
_element.name = AAZStrType(
flags={"read_only": True},
)
_element.properties = AAZObjectType(
flags={"client_flatten": True},
)
_element.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_element.tags = AAZDictType()
_element.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.value.Element.properties
properties.description = AAZStrType()
properties.network_manager_scope_accesses = AAZListType(
serialized_name="networkManagerScopeAccesses",
flags={"required": True},
)
properties.network_manager_scopes = AAZObjectType(
serialized_name="networkManagerScopes",
flags={"required": True},
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
properties.resource_guid = AAZStrType(
serialized_name="resourceGuid",
flags={"read_only": True},
)
network_manager_scope_accesses = cls._schema_on_200.value.Element.properties.network_manager_scope_accesses
network_manager_scope_accesses.Element = AAZStrType()
network_manager_scopes = cls._schema_on_200.value.Element.properties.network_manager_scopes
network_manager_scopes.cross_tenant_scopes = AAZListType(
serialized_name="crossTenantScopes",
flags={"read_only": True},
)
network_manager_scopes.management_groups = AAZListType(
serialized_name="managementGroups",
)
network_manager_scopes.subscriptions = AAZListType()
cross_tenant_scopes = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes
cross_tenant_scopes.Element = AAZObjectType()
_element = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes.Element
_element.management_groups = AAZListType(
serialized_name="managementGroups",
flags={"read_only": True},
)
_element.subscriptions = AAZListType(
flags={"read_only": True},
)
_element.tenant_id = AAZStrType(
serialized_name="tenantId",
flags={"read_only": True},
)
management_groups = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes.Element.management_groups
management_groups.Element = AAZStrType()
subscriptions = cls._schema_on_200.value.Element.properties.network_manager_scopes.cross_tenant_scopes.Element.subscriptions
subscriptions.Element = AAZStrType()
management_groups = cls._schema_on_200.value.Element.properties.network_manager_scopes.management_groups
management_groups.Element = AAZStrType()
subscriptions = cls._schema_on_200.value.Element.properties.network_manager_scopes.subscriptions
subscriptions.Element = AAZStrType()
system_data = cls._schema_on_200.value.Element.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
tags = cls._schema_on_200.value.Element.tags
tags.Element = AAZStrType()
return cls._schema_on_200
|
class NetworkManagersListBySubscription(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 19 | 2 | 17 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 192 | 27 | 165 | 36 | 148 | 0 | 81 | 29 | 71 | 2 | 1 | 1 | 11 |
9,198 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connection/management_group/_create.py
|
azext_network_manager.aaz.latest.network.manager.connection.management_group._create.Create.ManagementGroupNetworkManagerConnectionsCreateOrUpdate
|
class ManagementGroupNetworkManagerConnectionsCreateOrUpdate(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200, 201]:
return self.on_200_201(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Network/networkManagerConnections/{networkManagerConnectionName}",
**self.url_parameters
)
@property
def method(self):
return "PUT"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"managementGroupId", self.ctx.args.management_group_id,
required=True,
),
**self.serialize_url_param(
"networkManagerConnectionName", self.ctx.args.connection_name,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Content-Type", "application/json",
),
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
@property
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={
"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("properties", AAZObjectType, typ_kwargs={
"flags": {"client_flatten": True}})
properties = _builder.get(".properties")
if properties is not None:
properties.set_prop("description", AAZStrType, ".description")
properties.set_prop("networkManagerId",
AAZStrType, ".network_manager_id")
return self.serialize_content(_content_value)
def on_200_201(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200_201
)
_schema_on_200_201 = None
@classmethod
def _build_schema_on_200_201(cls):
if cls._schema_on_200_201 is not None:
return cls._schema_on_200_201
cls._schema_on_200_201 = AAZObjectType()
_schema_on_200_201 = cls._schema_on_200_201
_schema_on_200_201.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200_201.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200_201.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200_201.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200_201.properties
properties.connection_state = AAZStrType(
serialized_name="connectionState",
flags={"read_only": True},
)
properties.description = AAZStrType()
properties.network_manager_id = AAZStrType(
serialized_name="networkManagerId",
)
system_data = cls._schema_on_200_201.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200_201
|
class ManagementGroupNetworkManagerConnectionsCreateOrUpdate(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
@property
def content(self):
pass
def on_200_201(self, session):
pass
@classmethod
def _build_schema_on_200_201(cls):
pass
| 19 | 0 | 13 | 1 | 12 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 9 | 0 | 10 | 10 | 147 | 19 | 128 | 32 | 109 | 0 | 58 | 24 | 47 | 2 | 1 | 1 | 13 |
9,199 |
Azure/azure-cli-extensions
|
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/data/git_repos_for_analysis/Azure_azure-cli-extensions/src/network-manager/azext_network_manager/aaz/latest/network/manager/connect_config/_wait.py
|
azext_network_manager.aaz.latest.network.manager.connect_config._wait.Wait.ConnectivityConfigurationsGet
|
class ConnectivityConfigurationsGet(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"
def __call__(self, *args, **kwargs):
request = self.make_request()
session = self.client.send_request(
request=request, stream=False, **kwargs)
if session.http_response.status_code in [200]:
return self.on_200(session)
return self.on_error(session.http_response)
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}",
**self.url_parameters
)
@property
def method(self):
return "GET"
@property
def error_format(self):
return "ODataV4Format"
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"configurationName", self.ctx.args.configuration_name,
required=True,
),
**self.serialize_url_param(
"networkManagerName", self.ctx.args.network_manager_name,
required=True,
),
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
),
}
return parameters
@property
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2022-01-01",
required=True,
),
}
return parameters
@property
def header_parameters(self):
parameters = {
**self.serialize_header_param(
"Accept", "application/json",
),
}
return parameters
def on_200(self, session):
data = self.deserialize_http_content(session)
self.ctx.set_var(
"instance",
data,
schema_builder=self._build_schema_on_200
)
_schema_on_200 = None
@classmethod
def _build_schema_on_200(cls):
if cls._schema_on_200 is not None:
return cls._schema_on_200
cls._schema_on_200 = AAZObjectType()
_schema_on_200 = cls._schema_on_200
_schema_on_200.etag = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.id = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.name = AAZStrType(
flags={"read_only": True},
)
_schema_on_200.properties = AAZObjectType(
flags={"client_flatten": True},
)
_schema_on_200.system_data = AAZObjectType(
serialized_name="systemData",
flags={"read_only": True},
)
_schema_on_200.type = AAZStrType(
flags={"read_only": True},
)
properties = cls._schema_on_200.properties
properties.applies_to_groups = AAZListType(
serialized_name="appliesToGroups",
flags={"required": True},
)
properties.connectivity_topology = AAZStrType(
serialized_name="connectivityTopology",
flags={"required": True},
)
properties.delete_existing_peering = AAZStrType(
serialized_name="deleteExistingPeering",
)
properties.description = AAZStrType()
properties.hubs = AAZListType()
properties.is_global = AAZStrType(
serialized_name="isGlobal",
)
properties.provisioning_state = AAZStrType(
serialized_name="provisioningState",
flags={"read_only": True},
)
applies_to_groups = cls._schema_on_200.properties.applies_to_groups
applies_to_groups.Element = AAZObjectType()
_element = cls._schema_on_200.properties.applies_to_groups.Element
_element.group_connectivity = AAZStrType(
serialized_name="groupConnectivity",
flags={"required": True},
)
_element.is_global = AAZStrType(
serialized_name="isGlobal",
)
_element.network_group_id = AAZStrType(
serialized_name="networkGroupId",
flags={"required": True},
)
_element.use_hub_gateway = AAZStrType(
serialized_name="useHubGateway",
)
hubs = cls._schema_on_200.properties.hubs
hubs.Element = AAZObjectType()
_element = cls._schema_on_200.properties.hubs.Element
_element.resource_id = AAZStrType(
serialized_name="resourceId",
)
_element.resource_type = AAZStrType(
serialized_name="resourceType",
)
system_data = cls._schema_on_200.system_data
system_data.created_at = AAZStrType(
serialized_name="createdAt",
)
system_data.created_by = AAZStrType(
serialized_name="createdBy",
)
system_data.created_by_type = AAZStrType(
serialized_name="createdByType",
)
system_data.last_modified_at = AAZStrType(
serialized_name="lastModifiedAt",
)
system_data.last_modified_by = AAZStrType(
serialized_name="lastModifiedBy",
)
system_data.last_modified_by_type = AAZStrType(
serialized_name="lastModifiedByType",
)
return cls._schema_on_200
|
class ConnectivityConfigurationsGet(AAZHttpOperation):
def __call__(self, *args, **kwargs):
pass
@property
def url(self):
pass
@property
def method(self):
pass
@property
def error_format(self):
pass
@property
def url_parameters(self):
pass
@property
def query_parameters(self):
pass
@property
def header_parameters(self):
pass
def on_200(self, session):
pass
@classmethod
def _build_schema_on_200(cls):
pass
| 17 | 0 | 18 | 1 | 16 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 8 | 0 | 9 | 9 | 178 | 20 | 158 | 31 | 141 | 0 | 66 | 24 | 56 | 2 | 1 | 1 | 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.