Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into enum-meta

* 'master' of https://github.com/Azure/azure-sdk-for-python:
  revert file changed by bot (Azure#16493)
  [T2] Resourcemover fix dependency (Azure#16491)
  fix compute readme (Azure#16488)
  [Python] python track2 new pipeline (Azure#16484)
  T2 compute 2021 02 02 (Azure#16486)
  Mindep test all dependencies except nspkg (Azure#16331)
  Add aio folder and update GA tag (Azure#16178)
  • Loading branch information
iscai-msft committed Feb 3, 2021
2 parents 017a88a + 9328675 commit 0770f6f
Show file tree
Hide file tree
Showing 102 changed files with 17,138 additions and 5,532 deletions.
1 change: 0 additions & 1 deletion eng/pipelines/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ stages:
- template: ./templates/jobs/archetype-sdk-client.yml
parameters:
ToxEnvParallel: '--tenvparallel'
InjectedPackages: $(InjectedPackages)
BuildTargetingString: $(BuildTargetingString)
BuildDocs: false
TestTimeoutInMinutes: 300
Expand Down
6 changes: 4 additions & 2 deletions eng/tox/install_depend_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
logging.getLogger().setLevel(logging.INFO)

MINIMUM_VERSION_SUPPORTED_OVERRIDE = {
'azure-common': '1.1.10'
'azure-common': '1.1.10',
'msrest': '0.6.10',
'six': '1.9'
}

def install_dependent_packages(setup_py_file_path, dependency_type, temp_dir):
Expand Down Expand Up @@ -60,7 +62,7 @@ def find_released_packages(setup_py_path, dependency_type):
# this method returns list of required available package on PyPI in format <package-name>==<version>

# parse setup.py and find install requires
requires = [r for r in get_install_requires(setup_py_path) if r.startswith('azure') and '-nspkg' not in r]
requires = [r for r in get_install_requires(setup_py_path) if '-nspkg' not in r]

# Get available version on PyPI for each required package
avlble_packages = [x for x in map(lambda x: process_requirement(x, dependency_type), requires) if x]
Expand Down
2 changes: 1 addition & 1 deletion eng/tox/verify_installed_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def verify_packages(package_file_path):
sys.exit(1)

# find installed and expected packages
installed = dict(p.split('==') for p in get_installed_packages() if p.startswith('azure') and "==" in p)
installed = dict(p.split('==') for p in get_installed_packages() if "==" in p)
expected = dict(p.split('==') for p in packages)

missing_packages = [pkg for pkg in expected.keys() if installed.get(pkg) != expected.get(pkg)]
Expand Down
17 changes: 12 additions & 5 deletions scripts/automation_generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,19 @@ sudo npm install -g n
sudo n 10.15.0
export PATH=/usr/local/n/versions/node/10.15.0/bin:$PATH

# generate code and package
python -m packaging_tools.auto_codegen "$1" "$TMPDIR/venv-sdk/auto_temp.json" 2>&1
TEMP_FILE="$TMPDIR/venv-sdk/auto_temp.json"
# generate code
python -m packaging_tools.auto_codegen "$1" "$TEMP_FILE" 2>&1
echo "[Generate] codegen done!!!"
python -m packaging_tools.auto_package "$TMPDIR/venv-sdk/auto_temp.json" "$2" 2>&1
echo "[Generate] generate done!!!"
if [ ! -f "$TEMP_FILE" ]; then
echo "[Autorest]$TEMP_FILE does not exist!!!Error happened during codegen"
exit 1
fi

# package
python -m packaging_tools.auto_package "$TEMP_FILE" "$2" 2>&1
echo "[Generate] generate done!!!"
if [ ! -f "$2" ]; then
echo "[Autorest]$2 does not exist!!!"
echo "[Autorest]$2 does not exist!!!Error happened during package"
exit 1
fi
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
../../core/azure-core
-e ../../identity/azure-identity
aiohttp>=3.0; python_version >= '3.5'
msrest>=0.6.10
-e ../../../tools/azure-sdk-tools
-e ../../../tools/azure-devtools
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-e ../../../tools/azure-sdk-tools
msrestazure
../../core/azure-core
9 changes: 9 additions & 0 deletions sdk/compute/azure-mgmt-compute/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release History

## 18.2.0 (2021-02-02)

**Features**

- Added operation group CloudServicesUpdateDomainOperations
- Added operation group CloudServiceRolesOperations
- Added operation group CloudServiceRoleInstancesOperations
- Added operation group CloudServicesOperations

## 18.1.0 (2021-01-19)

**Features**
Expand Down
21 changes: 8 additions & 13 deletions sdk/compute/azure-mgmt-compute/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ This is the Microsoft Azure Compute Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).


# Usage

For code examples, see [Compute Management](https://docs.microsoft.com/python/api/overview/azure/virtualmachines?view=azure-python-preview)
on docs.microsoft.com.

To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)



For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
Code samples for this package can be found at [Compute Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)


# Provide Feedback
Expand All @@ -19,13 +24,3 @@ section of the project.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-compute%2FREADME.png)
# Usage


To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)



For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
Code samples for this package can be found at [Compute Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.compute.v2020_06_01.models>`
* 2020-06-30: :mod:`v2020_06_30.models<azure.mgmt.compute.v2020_06_30.models>`
* 2020-09-30: :mod:`v2020_09_30.models<azure.mgmt.compute.v2020_09_30.models>`
* 2020-10-01-preview: :mod:`v2020_10_01_preview.models<azure.mgmt.compute.v2020_10_01_preview.models>`
"""
if api_version == '2015-06-15':
from .v2015_06_15 import models
Expand Down Expand Up @@ -180,6 +181,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2020-09-30':
from .v2020_09_30 import models
return models
elif api_version == '2020-10-01-preview':
from .v2020_10_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -228,6 +232,58 @@ def availability_sets(self):
raise ValueError("API version {} does not have operation group 'availability_sets'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_service_role_instances(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServiceRoleInstancesOperations<azure.mgmt.compute.v2020_10_01_preview.operations.CloudServiceRoleInstancesOperations>`
"""
api_version = self._get_api_version('cloud_service_role_instances')
if api_version == '2020-10-01-preview':
from .v2020_10_01_preview.operations import CloudServiceRoleInstancesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_service_role_instances'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_service_roles(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServiceRolesOperations<azure.mgmt.compute.v2020_10_01_preview.operations.CloudServiceRolesOperations>`
"""
api_version = self._get_api_version('cloud_service_roles')
if api_version == '2020-10-01-preview':
from .v2020_10_01_preview.operations import CloudServiceRolesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_service_roles'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_services(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServicesOperations<azure.mgmt.compute.v2020_10_01_preview.operations.CloudServicesOperations>`
"""
api_version = self._get_api_version('cloud_services')
if api_version == '2020-10-01-preview':
from .v2020_10_01_preview.operations import CloudServicesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_services'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_services_update_domain(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServicesUpdateDomainOperations<azure.mgmt.compute.v2020_10_01_preview.operations.CloudServicesUpdateDomainOperations>`
"""
api_version = self._get_api_version('cloud_services_update_domain')
if api_version == '2020-10-01-preview':
from .v2020_10_01_preview.operations import CloudServicesUpdateDomainOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_services_update_domain'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def dedicated_host_groups(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "18.1.0"
VERSION = "18.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
* 2020-06-01: :mod:`v2020_06_01.models<azure.mgmt.compute.v2020_06_01.models>`
* 2020-06-30: :mod:`v2020_06_30.models<azure.mgmt.compute.v2020_06_30.models>`
* 2020-09-30: :mod:`v2020_09_30.models<azure.mgmt.compute.v2020_09_30.models>`
* 2020-10-01-preview: :mod:`v2020_10_01_preview.models<azure.mgmt.compute.v2020_10_01_preview.models>`
"""
if api_version == '2015-06-15':
from ..v2015_06_15 import models
Expand Down Expand Up @@ -180,6 +181,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
elif api_version == '2020-09-30':
from ..v2020_09_30 import models
return models
elif api_version == '2020-10-01-preview':
from ..v2020_10_01_preview import models
return models
raise ValueError("API version {} is not available".format(api_version))

@property
Expand Down Expand Up @@ -228,6 +232,58 @@ def availability_sets(self):
raise ValueError("API version {} does not have operation group 'availability_sets'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_service_role_instances(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServiceRoleInstancesOperations<azure.mgmt.compute.v2020_10_01_preview.aio.operations.CloudServiceRoleInstancesOperations>`
"""
api_version = self._get_api_version('cloud_service_role_instances')
if api_version == '2020-10-01-preview':
from ..v2020_10_01_preview.aio.operations import CloudServiceRoleInstancesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_service_role_instances'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_service_roles(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServiceRolesOperations<azure.mgmt.compute.v2020_10_01_preview.aio.operations.CloudServiceRolesOperations>`
"""
api_version = self._get_api_version('cloud_service_roles')
if api_version == '2020-10-01-preview':
from ..v2020_10_01_preview.aio.operations import CloudServiceRolesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_service_roles'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_services(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServicesOperations<azure.mgmt.compute.v2020_10_01_preview.aio.operations.CloudServicesOperations>`
"""
api_version = self._get_api_version('cloud_services')
if api_version == '2020-10-01-preview':
from ..v2020_10_01_preview.aio.operations import CloudServicesOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_services'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def cloud_services_update_domain(self):
"""Instance depends on the API version:
* 2020-10-01-preview: :class:`CloudServicesUpdateDomainOperations<azure.mgmt.compute.v2020_10_01_preview.aio.operations.CloudServicesUpdateDomainOperations>`
"""
api_version = self._get_api_version('cloud_services_update_domain')
if api_version == '2020-10-01-preview':
from ..v2020_10_01_preview.aio.operations import CloudServicesUpdateDomainOperations as OperationClass
else:
raise ValueError("API version {} does not have operation group 'cloud_services_update_domain'".format(api_version))
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

@property
def dedicated_host_groups(self):
"""Instance depends on the API version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
from ._models_py3 import UpgradePolicy
from ._models_py3 import Usage
from ._models_py3 import UsageName
from ._models_py3 import UserArtifactManage
from ._models_py3 import UserArtifactSource
from ._models_py3 import UserAssignedIdentitiesValue
from ._models_py3 import VMScaleSetConvertToSinglePlacementGroupInput
Expand Down Expand Up @@ -358,6 +359,7 @@
from ._models import UpgradePolicy # type: ignore
from ._models import Usage # type: ignore
from ._models import UsageName # type: ignore
from ._models import UserArtifactManage # type: ignore
from ._models import UserArtifactSource # type: ignore
from ._models import UserAssignedIdentitiesValue # type: ignore
from ._models import VMScaleSetConvertToSinglePlacementGroupInput # type: ignore
Expand Down Expand Up @@ -619,6 +621,7 @@
'UpgradePolicy',
'Usage',
'UsageName',
'UserArtifactManage',
'UserArtifactSource',
'UserAssignedIdentitiesValue',
'VMScaleSetConvertToSinglePlacementGroupInput',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ class OperatingSystemStateTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, En
SPECIALIZED = "Specialized" #: Specialized image. Contains already provisioned OS Disk.

class OperatingSystemTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)):
"""The operating system of the osDiskImage.
"""This property allows you to specify the supported type of the OS that application is built for.
:code:`<br>`:code:`<br>` Possible values are: :code:`<br>`:code:`<br>` **Windows**
:code:`<br>`:code:`<br>` **Linux**
"""

WINDOWS = "Windows"
Expand Down
Loading

0 comments on commit 0770f6f

Please sign in to comment.