Skip to content

Commit 5a0703d

Browse files
author
SDK Automation
committed
Generated from 3f7191a36502e27539b82ab4661904017edfc46d
Fix
1 parent 5d277ae commit 5a0703d

File tree

7 files changed

+277
-93
lines changed

7 files changed

+277
-93
lines changed

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/_storage_cache_management_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from .operations import Operations
1717
from .operations import SkusOperations
1818
from .operations import UsageModelsOperations
19+
from .operations import AscOperations
1920
from .operations import CachesOperations
2021
from .operations import StorageTargetsOperations
2122
from . import models
@@ -33,6 +34,8 @@ class StorageCacheManagementClient(SDKClient):
3334
:vartype skus: azure.mgmt.storagecache.operations.SkusOperations
3435
:ivar usage_models: UsageModels operations
3536
:vartype usage_models: azure.mgmt.storagecache.operations.UsageModelsOperations
37+
:ivar asc_operations: AscOperations operations
38+
:vartype asc_operations: azure.mgmt.storagecache.operations.AscOperations
3639
:ivar caches: Caches operations
3740
:vartype caches: azure.mgmt.storagecache.operations.CachesOperations
3841
:ivar storage_targets: StorageTargets operations
@@ -65,6 +68,8 @@ def __init__(
6568
self._client, self.config, self._serialize, self._deserialize)
6669
self.usage_models = UsageModelsOperations(
6770
self._client, self.config, self._serialize, self._deserialize)
71+
self.asc_operations = AscOperations(
72+
self._client, self.config, self._serialize, self._deserialize)
6873
self.caches = CachesOperations(
6974
self._client, self.config, self._serialize, self._deserialize)
7075
self.storage_targets = StorageTargetsOperations(

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
try:
1313
from ._models_py3 import ApiOperation
1414
from ._models_py3 import ApiOperationDisplay
15+
from ._models_py3 import AscOperation
1516
from ._models_py3 import Cache
1617
from ._models_py3 import CacheEncryptionSettings
1718
from ._models_py3 import CacheHealth
@@ -23,6 +24,7 @@
2324
from ._models_py3 import ClfsTarget
2425
from ._models_py3 import ClfsTargetProperties
2526
from ._models_py3 import CloudErrorBody
27+
from ._models_py3 import ErrorResponse
2628
from ._models_py3 import KeyVaultKeyReference
2729
from ._models_py3 import KeyVaultKeyReferenceSourceVault
2830
from ._models_py3 import NamespaceJunction
@@ -42,6 +44,7 @@
4244
except (SyntaxError, ImportError):
4345
from ._models import ApiOperation
4446
from ._models import ApiOperationDisplay
47+
from ._models import AscOperation
4548
from ._models import Cache
4649
from ._models import CacheEncryptionSettings
4750
from ._models import CacheHealth
@@ -53,6 +56,7 @@
5356
from ._models import ClfsTarget
5457
from ._models import ClfsTargetProperties
5558
from ._models import CloudErrorBody
59+
from ._models import ErrorResponse
5660
from ._models import KeyVaultKeyReference
5761
from ._models import KeyVaultKeyReferenceSourceVault
5862
from ._models import NamespaceJunction
@@ -79,13 +83,13 @@
7983
HealthStateType,
8084
ProvisioningStateType,
8185
FirmwareStatusType,
82-
StorageTargetType,
8386
ReasonCode,
8487
)
8588

8689
__all__ = [
8790
'ApiOperation',
8891
'ApiOperationDisplay',
92+
'AscOperation',
8993
'Cache',
9094
'CacheEncryptionSettings',
9195
'CacheHealth',
@@ -97,6 +101,7 @@
97101
'ClfsTarget',
98102
'ClfsTargetProperties',
99103
'CloudErrorBody',
104+
'ErrorResponse',
100105
'KeyVaultKeyReference',
101106
'KeyVaultKeyReferenceSourceVault',
102107
'NamespaceJunction',
@@ -122,6 +127,5 @@
122127
'HealthStateType',
123128
'ProvisioningStateType',
124129
'FirmwareStatusType',
125-
'StorageTargetType',
126130
'ReasonCode',
127131
]

sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/models/_models.py

Lines changed: 77 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,42 @@ def __init__(self, **kwargs):
5858
self.resource = kwargs.get('resource', None)
5959

6060

61+
class AscOperation(Model):
62+
"""The status of operation.
63+
64+
:param id: The operation Id.
65+
:type id: str
66+
:param name: The operation name.
67+
:type name: str
68+
:param start_time: The start time of the operation.
69+
:type start_time: str
70+
:param end_time: The end time of the operation.
71+
:type end_time: str
72+
:param status: The status of the operation.
73+
:type status: str
74+
:param error: The error detail of the operation if any.
75+
:type error: ~azure.mgmt.storagecache.models.ErrorResponse
76+
"""
77+
78+
_attribute_map = {
79+
'id': {'key': 'id', 'type': 'str'},
80+
'name': {'key': 'name', 'type': 'str'},
81+
'start_time': {'key': 'startTime', 'type': 'str'},
82+
'end_time': {'key': 'endTime', 'type': 'str'},
83+
'status': {'key': 'status', 'type': 'str'},
84+
'error': {'key': 'error', 'type': 'ErrorResponse'},
85+
}
86+
87+
def __init__(self, **kwargs):
88+
super(AscOperation, self).__init__(**kwargs)
89+
self.id = kwargs.get('id', None)
90+
self.name = kwargs.get('name', None)
91+
self.start_time = kwargs.get('start_time', None)
92+
self.end_time = kwargs.get('end_time', None)
93+
self.status = kwargs.get('status', None)
94+
self.error = kwargs.get('error', None)
95+
96+
6197
class Cache(Model):
6298
"""A Cache instance. Follows Azure Resource Manager standards:
6399
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/resource-api-reference.md.
@@ -368,8 +404,6 @@ class StorageTargetProperties(Model):
368404
:param junctions: List of Cache namespace junctions to target for
369405
namespace associations.
370406
:type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction]
371-
:param target_type: Type of the Storage Target.
372-
:type target_type: str
373407
:param provisioning_state: ARM provisioning state, see
374408
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
375409
Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating',
@@ -382,37 +416,35 @@ class StorageTargetProperties(Model):
382416
:type clfs: ~azure.mgmt.storagecache.models.ClfsTarget
383417
:param unknown: Properties when targetType is unknown.
384418
:type unknown: ~azure.mgmt.storagecache.models.UnknownTarget
385-
:param target_base_type: Required. Constant filled by server.
386-
:type target_base_type: str
419+
:param target_type: Required. Constant filled by server.
420+
:type target_type: str
387421
"""
388422

389423
_validation = {
390-
'target_base_type': {'required': True},
424+
'target_type': {'required': True},
391425
}
392426

393427
_attribute_map = {
394428
'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'},
395-
'target_type': {'key': 'targetType', 'type': 'str'},
396429
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
397430
'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'},
398431
'clfs': {'key': 'clfs', 'type': 'ClfsTarget'},
399432
'unknown': {'key': 'unknown', 'type': 'UnknownTarget'},
400-
'target_base_type': {'key': 'targetBaseType', 'type': 'str'},
433+
'target_type': {'key': 'targetType', 'type': 'str'},
401434
}
402435

403436
_subtype_map = {
404-
'target_base_type': {'nfs3': 'Nfs3TargetProperties', 'clfs': 'ClfsTargetProperties', 'unknown': 'UnknownTargetProperties'}
437+
'target_type': {'nfs3': 'Nfs3TargetProperties', 'clfs': 'ClfsTargetProperties', 'unknown': 'UnknownTargetProperties'}
405438
}
406439

407440
def __init__(self, **kwargs):
408441
super(StorageTargetProperties, self).__init__(**kwargs)
409442
self.junctions = kwargs.get('junctions', None)
410-
self.target_type = kwargs.get('target_type', None)
411443
self.provisioning_state = kwargs.get('provisioning_state', None)
412444
self.nfs3 = kwargs.get('nfs3', None)
413445
self.clfs = kwargs.get('clfs', None)
414446
self.unknown = kwargs.get('unknown', None)
415-
self.target_base_type = None
447+
self.target_type = None
416448

417449

418450
class ClfsTargetProperties(StorageTargetProperties):
@@ -423,8 +455,6 @@ class ClfsTargetProperties(StorageTargetProperties):
423455
:param junctions: List of Cache namespace junctions to target for
424456
namespace associations.
425457
:type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction]
426-
:param target_type: Type of the Storage Target.
427-
:type target_type: str
428458
:param provisioning_state: ARM provisioning state, see
429459
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
430460
Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating',
@@ -437,27 +467,26 @@ class ClfsTargetProperties(StorageTargetProperties):
437467
:type clfs: ~azure.mgmt.storagecache.models.ClfsTarget
438468
:param unknown: Properties when targetType is unknown.
439469
:type unknown: ~azure.mgmt.storagecache.models.UnknownTarget
440-
:param target_base_type: Required. Constant filled by server.
441-
:type target_base_type: str
470+
:param target_type: Required. Constant filled by server.
471+
:type target_type: str
442472
"""
443473

444474
_validation = {
445-
'target_base_type': {'required': True},
475+
'target_type': {'required': True},
446476
}
447477

448478
_attribute_map = {
449479
'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'},
450-
'target_type': {'key': 'targetType', 'type': 'str'},
451480
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
452481
'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'},
453482
'clfs': {'key': 'clfs', 'type': 'ClfsTarget'},
454483
'unknown': {'key': 'unknown', 'type': 'UnknownTarget'},
455-
'target_base_type': {'key': 'targetBaseType', 'type': 'str'},
484+
'target_type': {'key': 'targetType', 'type': 'str'},
456485
}
457486

458487
def __init__(self, **kwargs):
459488
super(ClfsTargetProperties, self).__init__(**kwargs)
460-
self.target_base_type = 'clfs'
489+
self.target_type = 'clfs'
461490

462491

463492
class CloudError(Model):
@@ -519,6 +548,26 @@ def __init__(self, **kwargs):
519548
self.target = kwargs.get('target', None)
520549

521550

551+
class ErrorResponse(Model):
552+
"""Describes the format of Error response.
553+
554+
:param code: Error code
555+
:type code: str
556+
:param message: Error message indicating why the operation failed.
557+
:type message: str
558+
"""
559+
560+
_attribute_map = {
561+
'code': {'key': 'code', 'type': 'str'},
562+
'message': {'key': 'message', 'type': 'str'},
563+
}
564+
565+
def __init__(self, **kwargs):
566+
super(ErrorResponse, self).__init__(**kwargs)
567+
self.code = kwargs.get('code', None)
568+
self.message = kwargs.get('message', None)
569+
570+
522571
class KeyVaultKeyReference(Model):
523572
"""Describes a reference to Key Vault Key.
524573
@@ -623,8 +672,6 @@ class Nfs3TargetProperties(StorageTargetProperties):
623672
:param junctions: List of Cache namespace junctions to target for
624673
namespace associations.
625674
:type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction]
626-
:param target_type: Type of the Storage Target.
627-
:type target_type: str
628675
:param provisioning_state: ARM provisioning state, see
629676
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
630677
Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating',
@@ -637,27 +684,26 @@ class Nfs3TargetProperties(StorageTargetProperties):
637684
:type clfs: ~azure.mgmt.storagecache.models.ClfsTarget
638685
:param unknown: Properties when targetType is unknown.
639686
:type unknown: ~azure.mgmt.storagecache.models.UnknownTarget
640-
:param target_base_type: Required. Constant filled by server.
641-
:type target_base_type: str
687+
:param target_type: Required. Constant filled by server.
688+
:type target_type: str
642689
"""
643690

644691
_validation = {
645-
'target_base_type': {'required': True},
692+
'target_type': {'required': True},
646693
}
647694

648695
_attribute_map = {
649696
'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'},
650-
'target_type': {'key': 'targetType', 'type': 'str'},
651697
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
652698
'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'},
653699
'clfs': {'key': 'clfs', 'type': 'ClfsTarget'},
654700
'unknown': {'key': 'unknown', 'type': 'UnknownTarget'},
655-
'target_base_type': {'key': 'targetBaseType', 'type': 'str'},
701+
'target_type': {'key': 'targetType', 'type': 'str'},
656702
}
657703

658704
def __init__(self, **kwargs):
659705
super(Nfs3TargetProperties, self).__init__(**kwargs)
660-
self.target_base_type = 'nfs3'
706+
self.target_type = 'nfs3'
661707

662708

663709
class ResourceSku(Model):
@@ -840,8 +886,6 @@ class StorageTarget(StorageTargetResource):
840886
:param junctions: List of Cache namespace junctions to target for
841887
namespace associations.
842888
:type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction]
843-
:param target_type: Type of the Storage Target.
844-
:type target_type: str
845889
:param provisioning_state: ARM provisioning state, see
846890
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
847891
Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating',
@@ -867,7 +911,6 @@ class StorageTarget(StorageTargetResource):
867911
'id': {'key': 'id', 'type': 'str'},
868912
'type': {'key': 'type', 'type': 'str'},
869913
'junctions': {'key': 'properties.junctions', 'type': '[NamespaceJunction]'},
870-
'target_type': {'key': 'properties.targetType', 'type': 'str'},
871914
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
872915
'nfs3': {'key': 'properties.nfs3', 'type': 'Nfs3Target'},
873916
'clfs': {'key': 'properties.clfs', 'type': 'ClfsTarget'},
@@ -877,7 +920,6 @@ class StorageTarget(StorageTargetResource):
877920
def __init__(self, **kwargs):
878921
super(StorageTarget, self).__init__(**kwargs)
879922
self.junctions = kwargs.get('junctions', None)
880-
self.target_type = kwargs.get('target_type', None)
881923
self.provisioning_state = kwargs.get('provisioning_state', None)
882924
self.nfs3 = kwargs.get('nfs3', None)
883925
self.clfs = kwargs.get('clfs', None)
@@ -909,8 +951,6 @@ class UnknownTargetProperties(StorageTargetProperties):
909951
:param junctions: List of Cache namespace junctions to target for
910952
namespace associations.
911953
:type junctions: list[~azure.mgmt.storagecache.models.NamespaceJunction]
912-
:param target_type: Type of the Storage Target.
913-
:type target_type: str
914954
:param provisioning_state: ARM provisioning state, see
915955
https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property.
916956
Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating',
@@ -923,27 +963,26 @@ class UnknownTargetProperties(StorageTargetProperties):
923963
:type clfs: ~azure.mgmt.storagecache.models.ClfsTarget
924964
:param unknown: Properties when targetType is unknown.
925965
:type unknown: ~azure.mgmt.storagecache.models.UnknownTarget
926-
:param target_base_type: Required. Constant filled by server.
927-
:type target_base_type: str
966+
:param target_type: Required. Constant filled by server.
967+
:type target_type: str
928968
"""
929969

930970
_validation = {
931-
'target_base_type': {'required': True},
971+
'target_type': {'required': True},
932972
}
933973

934974
_attribute_map = {
935975
'junctions': {'key': 'junctions', 'type': '[NamespaceJunction]'},
936-
'target_type': {'key': 'targetType', 'type': 'str'},
937976
'provisioning_state': {'key': 'provisioningState', 'type': 'str'},
938977
'nfs3': {'key': 'nfs3', 'type': 'Nfs3Target'},
939978
'clfs': {'key': 'clfs', 'type': 'ClfsTarget'},
940979
'unknown': {'key': 'unknown', 'type': 'UnknownTarget'},
941-
'target_base_type': {'key': 'targetBaseType', 'type': 'str'},
980+
'target_type': {'key': 'targetType', 'type': 'str'},
942981
}
943982

944983
def __init__(self, **kwargs):
945984
super(UnknownTargetProperties, self).__init__(**kwargs)
946-
self.target_base_type = 'unknown'
985+
self.target_type = 'unknown'
947986

948987

949988
class UsageModel(Model):

0 commit comments

Comments
 (0)