1# coding=utf-8 2# -------------------------------------------------------------------------- 3# Copyright (c) Microsoft Corporation. All rights reserved. 4# Licensed under the MIT License. See License.txt in the project root for license information. 5# Code generated by Microsoft (R) AutoRest Code Generator. 6# Changes may cause incorrect behavior and will be lost if the code is regenerated. 7# -------------------------------------------------------------------------- 8 9from enum import Enum, EnumMeta 10from six import with_metaclass 11 12class _CaseInsensitiveEnumMeta(EnumMeta): 13 def __getitem__(self, name): 14 return super().__getitem__(name.upper()) 15 16 def __getattr__(cls, name): 17 """Return the enum member matching `name` 18 We use __getattr__ instead of descriptors or inserting into the enum 19 class' __dict__ in order to support `name` and `value` being both 20 properties for enum members (which live in the class' __dict__) and 21 enum members themselves. 22 """ 23 try: 24 return cls._member_map_[name.upper()] 25 except KeyError: 26 raise AttributeError(name) 27 28 29class AllocationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 30 """Allocation state of the cluster. Possible values are: steady - Indicates that the cluster is 31 not resizing. There are no changes to the number of compute nodes in the cluster in progress. A 32 cluster enters this state when it is created and when no operations are being performed on the 33 cluster to change the number of compute nodes. resizing - Indicates that the cluster is 34 resizing; that is, compute nodes are being added to or removed from the cluster. 35 """ 36 37 STEADY = "steady" 38 RESIZING = "resizing" 39 40class CachingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 41 """Caching type for the disks. Available values are none (default), readonly, readwrite. Caching 42 type can be set only for VM sizes supporting premium storage. 43 """ 44 45 NONE = "none" 46 READONLY = "readonly" 47 READWRITE = "readwrite" 48 49class DeallocationOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 50 """Actions which should be performed when compute nodes are removed from the cluster. Possible 51 values are: requeue (default) - Terminate running jobs and requeue them so the jobs will run 52 again. Remove compute nodes as soon as jobs have been terminated; terminate - Terminate running 53 jobs. The jobs will not run again. Remove compute nodes as soon as jobs have been terminated. 54 waitforjobcompletion - Allow currently running jobs to complete. Schedule no new jobs while 55 waiting. Remove compute nodes when all jobs have completed. 56 """ 57 58 REQUEUE = "requeue" 59 TERMINATE = "terminate" 60 WAITFORJOBCOMPLETION = "waitforjobcompletion" 61 62class ExecutionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 63 """The current state of the job. Possible values are: queued - The job is queued and able to run. 64 A job enters this state when it is created, or when it is awaiting a retry after a failed run. 65 running - The job is running on a compute cluster. This includes job-level preparation such as 66 downloading resource files or set up container specified on the job - it does not necessarily 67 mean that the job command line has started executing. terminating - The job is terminated by 68 the user, the terminate operation is in progress. succeeded - The job has completed running 69 successfully and exited with exit code 0. failed - The job has finished unsuccessfully (failed 70 with a non-zero exit code) and has exhausted its retry limit. A job is also marked as failed if 71 an error occurred launching the job. 72 """ 73 74 QUEUED = "queued" 75 RUNNING = "running" 76 TERMINATING = "terminating" 77 SUCCEEDED = "succeeded" 78 FAILED = "failed" 79 80class FileServerProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 81 """Provisioning state of the File Server. Possible values: creating - The File Server is getting 82 created; updating - The File Server creation has been accepted and it is getting updated; 83 deleting - The user has requested that the File Server be deleted, and it is in the process of 84 being deleted; failed - The File Server creation has failed with the specified error code. 85 Details about the error code are specified in the message field; succeeded - The File Server 86 creation has succeeded. 87 """ 88 89 CREATING = "creating" 90 UPDATING = "updating" 91 DELETING = "deleting" 92 SUCCEEDED = "succeeded" 93 FAILED = "failed" 94 95class FileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 96 """Type of the file. Possible values are file and directory. 97 """ 98 99 FILE = "file" 100 DIRECTORY = "directory" 101 102class JobPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 103 """Scheduling priority associated with the job. Possible values: low, normal, high. 104 """ 105 106 LOW = "low" 107 NORMAL = "normal" 108 HIGH = "high" 109 110class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 111 """Provisioning state of the cluster. Possible value are: creating - Specifies that the cluster is 112 being created. succeeded - Specifies that the cluster has been created successfully. failed - 113 Specifies that the cluster creation has failed. deleting - Specifies that the cluster is being 114 deleted. 115 """ 116 117 CREATING = "creating" 118 SUCCEEDED = "succeeded" 119 FAILED = "failed" 120 DELETING = "deleting" 121 122class StorageAccountType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 123 """Type of storage account to be used on the disk. Possible values are: Standard_LRS or 124 Premium_LRS. Premium storage account type can only be used with VM sizes supporting premium 125 storage. 126 """ 127 128 STANDARD_LRS = "Standard_LRS" 129 PREMIUM_LRS = "Premium_LRS" 130 131class ToolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 132 """The toolkit type of the job. 133 """ 134 135 CNTK = "cntk" 136 TENSORFLOW = "tensorflow" 137 CAFFE = "caffe" 138 CAFFE2 = "caffe2" 139 CHAINER = "chainer" 140 HOROVOD = "horovod" 141 CUSTOMMPI = "custommpi" 142 CUSTOM = "custom" 143 144class UsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 145 """An enum describing the unit of usage measurement. 146 """ 147 148 COUNT = "Count" 149 150class VmPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 151 """VM priority. Allowed values are: dedicated (default) and lowpriority. 152 """ 153 154 DEDICATED = "dedicated" 155 LOWPRIORITY = "lowpriority" 156