Skip to content
Merged
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
1 change: 1 addition & 0 deletions azure-mgmt-edgegateway/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-edgegateway/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-edgegateway%2FREADME.png
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@ class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel):
Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: The path ID that uniquely identifies the object.
:vartype id: str
:ivar name: The object name.
:vartype name: str
:ivar type: The hierarchical type of the object.
:vartype type: str
:param integrity_key: Required. The Channel Integrity Key (CIK) of the
device.
:type integrity_key: str
:param encryption_key_thumbprint: The certificate thumbprint that was used
to encrypt the Channel Integrity Key (CIK).
:param encryption_key_thumbprint: The digital signature of encrypted
certificate.
:type encryption_key_thumbprint: str
:param encryption_key: The Channel Integrity Key (CIK) of the device.
:param encryption_key: The public part of the encryption certificate.
Client uses this to encrypt any secret.
:type encryption_key: str
:ivar resource_key: The Resource ID of the Resource.
:vartype resource_key: str
Expand All @@ -42,23 +38,20 @@ class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'integrity_key': {'required': True},
'resource_key': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'integrity_key': {'key': 'properties.integrityKey', 'type': 'str'},
'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'},
'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'},
'resource_key': {'key': 'properties.resourceKey', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs)
self.integrity_key = kwargs.get('integrity_key', None)
self.encryption_key_thumbprint = kwargs.get('encryption_key_thumbprint', None)
self.encryption_key = kwargs.get('encryption_key', None)
self.resource_key = None
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,17 @@ class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel):
Variables are only populated by the server, and will be ignored when
sending a request.

All required parameters must be populated in order to send to Azure.

:ivar id: The path ID that uniquely identifies the object.
:vartype id: str
:ivar name: The object name.
:vartype name: str
:ivar type: The hierarchical type of the object.
:vartype type: str
:param integrity_key: Required. The Channel Integrity Key (CIK) of the
device.
:type integrity_key: str
:param encryption_key_thumbprint: The certificate thumbprint that was used
to encrypt the Channel Integrity Key (CIK).
:param encryption_key_thumbprint: The digital signature of encrypted
certificate.
:type encryption_key_thumbprint: str
:param encryption_key: The Channel Integrity Key (CIK) of the device.
:param encryption_key: The public part of the encryption certificate.
Client uses this to encrypt any secret.
:type encryption_key: str
:ivar resource_key: The Resource ID of the Resource.
:vartype resource_key: str
Expand All @@ -42,23 +38,20 @@ class DataBoxEdgeDeviceExtendedInfo(ARMBaseModel):
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'integrity_key': {'required': True},
'resource_key': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'integrity_key': {'key': 'properties.integrityKey', 'type': 'str'},
'encryption_key_thumbprint': {'key': 'properties.encryptionKeyThumbprint', 'type': 'str'},
'encryption_key': {'key': 'properties.encryptionKey', 'type': 'str'},
'resource_key': {'key': 'properties.resourceKey', 'type': 'str'},
}

def __init__(self, *, integrity_key: str, encryption_key_thumbprint: str=None, encryption_key: str=None, **kwargs) -> None:
def __init__(self, *, encryption_key_thumbprint: str=None, encryption_key: str=None, **kwargs) -> None:
super(DataBoxEdgeDeviceExtendedInfo, self).__init__(**kwargs)
self.integrity_key = integrity_key
self.encryption_key_thumbprint = encryption_key_thumbprint
self.encryption_key = encryption_key
self.resource_key = None
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class PeriodicTimerSourceInfo(Model):
All required parameters must be populated in order to send to Azure.

:param start_time: Required. The time of the day that results in a valid
trigger. Schedule is computed with reference to the time specified.
trigger. Schedule is computed with reference to the time specified upto
seconds. If timezone is not specified the time will considered to be in
device timezone. The value will always be returned as UTC time.
:type start_time: datetime
:param schedule: Required. Periodic frequency at which timer event needs
to be raised. Supports daily, hourly, minutes, and seconds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class PeriodicTimerSourceInfo(Model):
All required parameters must be populated in order to send to Azure.

:param start_time: Required. The time of the day that results in a valid
trigger. Schedule is computed with reference to the time specified.
trigger. Schedule is computed with reference to the time specified upto
seconds. If timezone is not specified the time will considered to be in
device timezone. The value will always be returned as UTC time.
:type start_time: datetime
:param schedule: Required. Periodic frequency at which timer event needs
to be raised. Supports daily, hourly, minutes, and seconds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,77 +573,6 @@ def get_long_running_output(response):
return LROPoller(self._client, raw_result, get_long_running_output, polling_method)
download_updates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/downloadUpdates'}

def create_or_update_extended_info(
self, device_name, parameters, resource_group_name, custom_headers=None, raw=False, **operation_config):
"""Creates or updates the additional information of a the data box
edge/gateway device.

:param device_name: The device name.
:type device_name: str
:param parameters: The additional information.
:type parameters:
~azure.mgmt.edgegateway.models.DataBoxEdgeDeviceExtendedInfo
:param resource_group_name: The resource group name.
:type resource_group_name: 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: DataBoxEdgeDeviceExtendedInfo or ClientRawResponse if
raw=true
:rtype: ~azure.mgmt.edgegateway.models.DataBoxEdgeDeviceExtendedInfo
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = self.create_or_update_extended_info.metadata['url']
path_format_arguments = {
'deviceName': self._serialize.url("device_name", device_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
header_parameters = {}
header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct body
body_content = self._serialize.body(parameters, 'DataBoxEdgeDeviceExtendedInfo')

# Construct and send request
request = self._client.put(url, query_parameters, header_parameters, body_content)
response = self._client.send(request, stream=False, **operation_config)

if response.status_code not in [200]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('DataBoxEdgeDeviceExtendedInfo', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
create_or_update_extended_info.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/getExtendedInformation'}

def get_extended_information(
self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config):
"""Gets additional information for the specified data box edge/gateway
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def create_or_update(
self, device_name, order, resource_group_name, custom_headers=None, raw=False, polling=True, **operation_config):
"""Creates or updates an order.

:param device_name: The order details of a device.
:param device_name: The device name.
:type device_name: str
:param order: The order to be created or updated.
:type order: ~azure.mgmt.edgegateway.models.Order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config

def list_by_data_box_edge_device(
self, device_name, resource_group_name, custom_headers=None, raw=False, **operation_config):
self, device_name, resource_group_name, expand=None, custom_headers=None, raw=False, **operation_config):
"""Lists all the triggers configured in the device.

:param device_name: The device name.
:type device_name: str
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param expand: Specify $filter='CustomContextTag eq <tag>' to filter
on custom context tag property
:type expand: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -72,6 +75,8 @@ def internal_paging(next_link=None, raw=False):
# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
if expand is not None:
query_parameters['$expand'] = self._serialize.query("expand", expand, 'str')

else:
url = next_link
Expand Down