Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR azure-mgmt-network] Add IpAllocation resource for Hypernet IP management. #587

Open
wants to merge 1 commit into
base: sdkAutomation/azure-mgmt-network
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,79 @@ def check_dns_name_availability(self, location, domain_name_label, custom_header
mixin_instance.api_version = api_version
return mixin_instance.check_dns_name_availability(location, domain_name_label, custom_headers, raw, **operation_config)

def delete_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Deletes the Bastion Shareable Links for all the VMs specified in the
request.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:param vms: List of VM references.
:type vms:
list[~azure.mgmt.network.v2019_11_01.models.BastionShareableLink]
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
:param polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:return: An instance of LROPoller that returns None or
ClientRawResponse<None> if raw==True
:rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

"""
api_version = self._get_api_version('delete_bastion_shareable_link')
if api_version == '2019-09-01':
from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance.config = self.config
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
mixin_instance.api_version = api_version
return mixin_instance.delete_bastion_shareable_link(resource_group_name, bastion_host_name, vms, custom_headers, raw, polling, **operation_config)

def disconnect_active_sessions(self, resource_group_name, bastion_host_name, session_ids=None, custom_headers=None, raw=False, **operation_config):
"""Returns the list of currently active sessions on the Bastion.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:param session_ids: List of session IDs.
:type session_ids: list[str]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of BastionSessionState
:rtype:
~azure.mgmt.network.v2019_11_01.models.BastionSessionStatePaged[~azure.mgmt.network.v2019_11_01.models.BastionSessionState]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

"""
api_version = self._get_api_version('disconnect_active_sessions')
if api_version == '2019-09-01':
from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance.config = self.config
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
mixin_instance.api_version = api_version
return mixin_instance.disconnect_active_sessions(resource_group_name, bastion_host_name, session_ids, custom_headers, raw, **operation_config)

def generatevirtualwanvpnserverconfigurationvpnprofile(self, resource_group_name, virtual_wan_name, vpn_server_configuration_resource_id=None, authentication_method=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Generates a unique VPN profile for P2S clients for VirtualWan and
associated VpnServerConfiguration combination in the specified resource
Expand Down Expand Up @@ -145,6 +218,121 @@ def generatevirtualwanvpnserverconfigurationvpnprofile(self, resource_group_name
mixin_instance.api_version = api_version
return mixin_instance.generatevirtualwanvpnserverconfigurationvpnprofile(resource_group_name, virtual_wan_name, vpn_server_configuration_resource_id, authentication_method, custom_headers, raw, polling, **operation_config)

def get_active_sessions(self, resource_group_name, bastion_host_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Returns the list of currently active sessions on the Bastion.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
:param polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:return: An instance of LROPoller that returns
BastionActiveSessionListResult or
ClientRawResponse<BastionActiveSessionListResult> if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_11_01.models.BastionActiveSessionListResult]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_11_01.models.BastionActiveSessionListResult]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

"""
api_version = self._get_api_version('get_active_sessions')
if api_version == '2019-09-01':
from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance.config = self.config
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
mixin_instance.api_version = api_version
return mixin_instance.get_active_sessions(resource_group_name, bastion_host_name, custom_headers, raw, polling, **operation_config)

def get_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms=None, custom_headers=None, raw=False, **operation_config):
"""Return the Bastion Shareable Links for all the VMs specified in the
request.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:param vms: List of VM references.
:type vms:
list[~azure.mgmt.network.v2019_11_01.models.BastionShareableLink]
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: An iterator like instance of BastionShareableLink
:rtype:
~azure.mgmt.network.v2019_11_01.models.BastionShareableLinkPaged[~azure.mgmt.network.v2019_11_01.models.BastionShareableLink]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

"""
api_version = self._get_api_version('get_bastion_shareable_link')
if api_version == '2019-09-01':
from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance.config = self.config
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
mixin_instance.api_version = api_version
return mixin_instance.get_bastion_shareable_link(resource_group_name, bastion_host_name, vms, custom_headers, raw, **operation_config)

def put_bastion_shareable_link(self, resource_group_name, bastion_host_name, vms=None, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates a Bastion Shareable Links for all the VMs specified in the
request.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param bastion_host_name: The name of the Bastion Host.
:type bastion_host_name: str
:param vms: List of VM references.
:type vms:
list[~azure.mgmt.network.v2019_11_01.models.BastionShareableLink]
:param dict custom_headers: headers that will be added to the request
:param bool raw: The poller return type is ClientRawResponse, the
direct response alongside the deserialized response
:param polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:return: An instance of LROPoller that returns
BastionShareableLinkListResult or
ClientRawResponse<BastionShareableLinkListResult> if raw==True
:rtype:
~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.network.v2019_11_01.models.BastionShareableLinkListResult]
or
~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.network.v2019_11_01.models.BastionShareableLinkListResult]]
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`

"""
api_version = self._get_api_version('put_bastion_shareable_link')
if api_version == '2019-09-01':
from .v2019_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass
elif api_version == '2019-11-01':
from .v2019_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass
else:
raise NotImplementedError("APIVersion {} is not available".format(api_version))
mixin_instance = OperationClass()
mixin_instance._client = self._client
mixin_instance.config = self.config
mixin_instance._serialize = Serializer(self._models_dict(api_version))
mixin_instance._deserialize = Deserializer(self._models_dict(api_version))
mixin_instance.api_version = api_version
return mixin_instance.put_bastion_shareable_link(resource_group_name, bastion_host_name, vms, custom_headers, raw, polling, **operation_config)

def supported_security_providers(self, resource_group_name, virtual_wan_name, custom_headers=None, raw=False, **operation_config):
"""Gives the supported security providers for the virtual wan.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ class BgpPeerStatus(Model):
:ivar messages_sent: The number of BGP messages sent
:vartype messages_sent: long
:ivar messages_received: The number of BGP messages received
:vartype messages_received: int
:vartype messages_received: long
"""

_validation = {
Expand All @@ -1119,7 +1119,7 @@ class BgpPeerStatus(Model):
'connected_duration': {'key': 'connectedDuration', 'type': 'str'},
'routes_received': {'key': 'routesReceived', 'type': 'long'},
'messages_sent': {'key': 'messagesSent', 'type': 'long'},
'messages_received': {'key': 'messagesReceived', 'type': 'int'},
'messages_received': {'key': 'messagesReceived', 'type': 'long'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ class BgpPeerStatus(Model):
:ivar messages_sent: The number of BGP messages sent
:vartype messages_sent: long
:ivar messages_received: The number of BGP messages received
:vartype messages_received: int
:vartype messages_received: long
"""

_validation = {
Expand All @@ -1119,7 +1119,7 @@ class BgpPeerStatus(Model):
'connected_duration': {'key': 'connectedDuration', 'type': 'str'},
'routes_received': {'key': 'routesReceived', 'type': 'long'},
'messages_sent': {'key': 'messagesSent', 'type': 'long'},
'messages_received': {'key': 'messagesReceived', 'type': 'int'},
'messages_received': {'key': 'messagesReceived', 'type': 'long'},
}

def __init__(self, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ class BgpPeerStatus(Model):
:ivar messages_sent: The number of BGP messages sent
:vartype messages_sent: long
:ivar messages_received: The number of BGP messages received
:vartype messages_received: int
:vartype messages_received: long
"""

_validation = {
Expand All @@ -1187,7 +1187,7 @@ class BgpPeerStatus(Model):
'connected_duration': {'key': 'connectedDuration', 'type': 'str'},
'routes_received': {'key': 'routesReceived', 'type': 'long'},
'messages_sent': {'key': 'messagesSent', 'type': 'long'},
'messages_received': {'key': 'messagesReceived', 'type': 'int'},
'messages_received': {'key': 'messagesReceived', 'type': 'long'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ class BgpPeerStatus(Model):
:ivar messages_sent: The number of BGP messages sent
:vartype messages_sent: long
:ivar messages_received: The number of BGP messages received
:vartype messages_received: int
:vartype messages_received: long
"""

_validation = {
Expand All @@ -1187,7 +1187,7 @@ class BgpPeerStatus(Model):
'connected_duration': {'key': 'connectedDuration', 'type': 'str'},
'routes_received': {'key': 'routesReceived', 'type': 'long'},
'messages_sent': {'key': 'messagesSent', 'type': 'long'},
'messages_received': {'key': 'messagesReceived', 'type': 'int'},
'messages_received': {'key': 'messagesReceived', 'type': 'long'},
}

def __init__(self, **kwargs) -> None:
Expand Down
Loading