Skip to content

Commit f83f148

Browse files
code and test (Azure#24102)
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines> Co-authored-by: Jiefeng Chen <[email protected]>
1 parent 9dede66 commit f83f148

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+15733
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0b1 (2022-04-20)
4+
5+
* Initial Release

sdk/scvmm/azure-mgmt-scvmm/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include _meta.json
2+
recursive-include tests *.py *.yaml
3+
include *.md
4+
include azure/__init__.py
5+
include azure/mgmt/__init__.py
6+
include LICENSE

sdk/scvmm/azure-mgmt-scvmm/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Microsoft Azure SDK for Python
2+
3+
This is the Microsoft Azure Scvmm Management Client Library.
4+
This package has been tested with Python 3.6+.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
6+
7+
## _Disclaimer_
8+
9+
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
10+
11+
# Usage
12+
13+
14+
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15+
16+
17+
18+
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
19+
Code samples for this package can be found at [Scvmm Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
20+
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
21+
22+
23+
# Provide Feedback
24+
25+
If you encounter any bugs or have suggestions, please file an issue in the
26+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
27+
section of the project.
28+
29+
30+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-scvmm%2FREADME.png)

sdk/scvmm/azure-mgmt-scvmm/_meta.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.7.2",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "2d58f12d3885fe2e88d0bf5c7c6386b919ed85bb",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/scvmm/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.7.2",
10+
"readme": "specification/scvmm/resource-manager/readme.md"
11+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
9+
from ._scvmm import SCVMM
10+
from ._version import VERSION
11+
12+
__version__ = VERSION
13+
__all__ = ['SCVMM']
14+
15+
# `._patch.py` is used for handwritten extensions to the generated code
16+
# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
17+
from ._patch import patch_sdk
18+
patch_sdk()
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
9+
from typing import Any, TYPE_CHECKING
10+
11+
from azure.core.configuration import Configuration
12+
from azure.core.pipeline import policies
13+
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
14+
15+
from ._version import VERSION
16+
17+
if TYPE_CHECKING:
18+
# pylint: disable=unused-import,ungrouped-imports
19+
from azure.core.credentials import TokenCredential
20+
21+
22+
class SCVMMConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
23+
"""Configuration for SCVMM.
24+
25+
Note that all parameters used to create this instance are saved as instance
26+
attributes.
27+
28+
:param credential: Credential needed for the client to connect to Azure.
29+
:type credential: ~azure.core.credentials.TokenCredential
30+
:param subscription_id: The Azure subscription ID. This is a GUID-formatted string (e.g.
31+
00000000-0000-0000-0000-000000000000).
32+
:type subscription_id: str
33+
:keyword api_version: Api Version. Default value is "2020-06-05-preview". Note that overriding
34+
this default value may result in unsupported behavior.
35+
:paramtype api_version: str
36+
"""
37+
38+
def __init__(
39+
self,
40+
credential: "TokenCredential",
41+
subscription_id: str,
42+
**kwargs: Any
43+
) -> None:
44+
super(SCVMMConfiguration, self).__init__(**kwargs)
45+
api_version = kwargs.pop('api_version', "2020-06-05-preview") # type: str
46+
47+
if credential is None:
48+
raise ValueError("Parameter 'credential' must not be None.")
49+
if subscription_id is None:
50+
raise ValueError("Parameter 'subscription_id' must not be None.")
51+
52+
self.credential = credential
53+
self.subscription_id = subscription_id
54+
self.api_version = api_version
55+
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
56+
kwargs.setdefault('sdk_moniker', 'mgmt-scvmm/{}'.format(VERSION))
57+
self._configure(**kwargs)
58+
59+
def _configure(
60+
self,
61+
**kwargs # type: Any
62+
):
63+
# type: (...) -> None
64+
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
65+
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
66+
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
67+
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
68+
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
69+
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
70+
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
71+
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
72+
self.authentication_policy = kwargs.get('authentication_policy')
73+
if self.credential and not self.authentication_policy:
74+
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"chosen_version": "2020-06-05-preview",
3+
"total_api_version_list": ["2020-06-05-preview"],
4+
"client": {
5+
"name": "SCVMM",
6+
"filename": "_scvmm",
7+
"description": "The Microsoft.ScVmm Rest API spec.",
8+
"host_value": "\"https://management.azure.com\"",
9+
"parameterized_host_template": null,
10+
"azure_arm": true,
11+
"has_lro_operations": true,
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SCVMMConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"SCVMMConfiguration\"]}, \"thirdparty\": {\"msrest\": [\"Deserializer\", \"Serializer\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
},
24+
"subscription_id": {
25+
"signature": "subscription_id, # type: str",
26+
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
27+
"docstring_type": "str",
28+
"required": true
29+
}
30+
},
31+
"async": {
32+
"credential": {
33+
"signature": "credential: \"AsyncTokenCredential\",",
34+
"description": "Credential needed for the client to connect to Azure.",
35+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
36+
"required": true
37+
},
38+
"subscription_id": {
39+
"signature": "subscription_id: str,",
40+
"description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).",
41+
"docstring_type": "str",
42+
"required": true
43+
}
44+
},
45+
"constant": {
46+
},
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=\"https://management.azure.com\", # type: str",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: str = \"https://management.azure.com\",",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
90+
},
91+
"config": {
92+
"credential": true,
93+
"credential_scopes": ["https://management.azure.com/.default"],
94+
"credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
95+
"credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)",
96+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
97+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
98+
},
99+
"operation_groups": {
100+
"vmm_servers": "VmmServersOperations",
101+
"operations": "Operations",
102+
"clouds": "CloudsOperations",
103+
"virtual_networks": "VirtualNetworksOperations",
104+
"virtual_machines": "VirtualMachinesOperations",
105+
"virtual_machine_templates": "VirtualMachineTemplatesOperations",
106+
"availability_sets": "AvailabilitySetsOperations",
107+
"inventory_items": "InventoryItemsOperations"
108+
}
109+
}

0 commit comments

Comments
 (0)