How to use the azure-servicemanagement-legacy.azure.servicemanagement._common_error._validate_not_none function in azure-servicemanagement-legacy

To help you get started, we’ve selected a few azure-servicemanagement-legacy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
password=None):
        '''
        Adds a certificate to a hosted service.

        service_name:
            Name of the hosted service.
        data:
            The base-64 encoded form of the pfx/cer file.
        certificate_format:
            The service certificate format.
        password:
            The certificate password. Default to None when using cer format.
        '''
        _validate_not_none('service_name', service_name)
        _validate_not_none('data', data)
        _validate_not_none('certificate_format', certificate_format)
        _validate_not_none('password', password)

        return self._perform_post(
            '/' + self.subscription_id + '/services/hostedservices/' +
            _str(service_name) + '/certificates',
            _XmlSerializer.certificate_file_to_xml(
                data, certificate_format, password),
            as_async=True)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
def update_affinity_group(self, affinity_group_name, label,
                              description=None):
        '''
        Updates the label and/or the description for an affinity group for the
        specified subscription.

        affinity_group_name:
            The name of the affinity group.
        label:
            A name for the affinity group. The name can be up to 100 characters
            in length.
        description:
            A description for the affinity group. The description can be up to
            1024 characters in length.
        '''
        _validate_not_none('affinity_group_name', affinity_group_name)
        _validate_not_none('label', label)
        return self._perform_put(
            '/' + self.subscription_id + '/affinitygroups/' +
            _str(affinity_group_name),
            _XmlSerializer.update_affinity_group_to_xml(label, description))
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementclient.py View on Github external
def get_operation_status(self, request_id):
        '''
        Returns the status of the specified operation. After calling an
        asynchronous operation, you can call Get Operation Status to determine
        whether the operation has succeeded, failed, or is still in progress.

        request_id:
            The request ID for the request you wish to track.
        '''
        _validate_not_none('request_id', request_id)
        return self._perform_get(
            '/' + self.subscription_id + '/operations/' + _str(request_id),
            Operation)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
def list_service_certificates(self, service_name):
        '''
        Lists all of the service certificates associated with the specified
        hosted service.

        service_name:
            Name of the hosted service.
        '''
        _validate_not_none('service_name', service_name)
        return self._perform_get(
            '/' + self.subscription_id + '/services/hostedservices/' +
            _str(service_name) + '/certificates',
            Certificates)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / schedulermanagementservice.py View on Github external
The Create Cloud Service request creates a new cloud service. When job
        collections are created, they are hosted within a cloud service.
        A cloud service groups job collections together in a given region.
        Once a cloud service has been created, job collections can then be
        created and contained within it.

        cloud_service_id:
            The cloud service id
        label:
            The name of the cloud service.
        description:
            The description of the cloud service.
        geo_region:
            The geographical region of the webspace that will be created.
        '''
        _validate_not_none('cloud_service_id', cloud_service_id)
        _validate_not_none('label', label)
        _validate_not_none('description', description)
        _validate_not_none('geo_region', geo_region)

        path = self._get_cloud_services_path(cloud_service_id)
        body = _SchedulerManagementXmlSerializer.create_cloud_service_to_xml(
            label, description, geo_region)

        return self._perform_put(path, body, as_async=True)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
options.vm_image_label:
            Required. Specifies the label of the VM Image.
        options.description:
            Optional. Specifies the description of the VM Image.
        options.language:
            Optional. Specifies the language of the VM Image.
        options.image_family:
            Optional. Specifies a value that can be used to group VM Images.
        options.recommended_vm_size:
            Optional. Specifies the size to use for the Virtual Machine that
            is created from the VM Image.
        '''
        _validate_not_none('service_name', service_name)
        _validate_not_none('deployment_name', deployment_name)
        _validate_not_none('role_name', role_name)
        _validate_not_none('options', options)
        _validate_not_none('options.os_state', options.os_state)
        _validate_not_none('options.vm_image_name', options.vm_image_name)
        _validate_not_none('options.vm_image_label', options.vm_image_label)
        return self._perform_post(
            self._get_capture_vm_image_path(service_name, deployment_name, role_name),
            _XmlSerializer.capture_vm_image_to_xml(options),
            as_async=True)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
'''
        Updates the ip address of a DNS server.

        service_name:
            The name of the service.
        deployment_name:
            The name of the deployment.
        dns_server_name:
            Specifies the name of the DNS server.
        address:
            Specifies the IP address of the DNS server.
        '''
        _validate_not_none('service_name', service_name)
        _validate_not_none('deployment_name', deployment_name)
        _validate_not_none('dns_server_name', dns_server_name)
        _validate_not_none('address', address)
        return self._perform_put(
            self._get_dns_server_path(service_name,
                                      deployment_name,
                                      dns_server_name),
            _XmlSerializer.dns_server_to_xml(dns_server_name, address),
            as_async=True)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
disk_name:
            Specifies the name of the disk. Windows Azure uses the specified
            disk to create the data disk for the machine and populates this
            field with the disk name.
        logical_disk_size_in_gb:
            Specifies the size, in GB, of an empty disk to be attached to the
            role. The disk can be created as part of disk attach or create VM
            role call by specifying the value for this property. Windows Azure
            creates the empty disk based on size preference and attaches the
            newly created disk to the Role.
        source_media_link:
            Specifies the location of a blob in account storage which is
            mounted as a data disk when the virtual machine is created.
        '''
        _validate_not_none('service_name', service_name)
        _validate_not_none('deployment_name', deployment_name)
        _validate_not_none('role_name', role_name)
        _validate_not_none('lun', lun)
        return self._perform_post(
            self._get_data_disk_path(service_name, deployment_name, role_name),
            _XmlSerializer.data_virtual_hard_disk_to_xml(
                host_caching,
                disk_label,
                disk_name,
                lun,
                logical_disk_size_in_gb,
                media_link,
                source_media_link),
            as_async=True)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
role_instance_name):
        '''
        Reinstalls the operating system on instances of web roles or worker
        roles and initializes the storage resources that are used by them. If
        you do not want to initialize storage resources, you can use
        reimage_role_instance.

        service_name:
            Name of the hosted service.
        deployment_name:
            The name of the deployment.
        role_instance_name:
            The name of the role instance.
        '''
        _validate_not_none('service_name', service_name)
        _validate_not_none('deployment_name', deployment_name)
        _validate_not_none('role_instance_name', role_instance_name)
        return self._perform_post(
            self._get_deployment_path_using_name(
                service_name, deployment_name) + \
                    '/roleinstances/' + _str(role_instance_name) + \
                    '?comp=rebuild&resources=allLocalDrives',
            '',
            as_async=True)
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
set the status to Running, at which time the service will be
            started. A deployed service still incurs charges, even if it is
            suspended.
        treat_warnings_as_error:
            Indicates whether to treat package validation warnings as errors.
            If set to true, the Created Deployment operation fails if there
            are validation warnings on the service package.
        extended_properties:
            Dictionary containing name/value pairs of storage account
            properties. You can have a maximum of 50 extended property
            name/value pairs. The maximum length of the Name element is 64
            characters, only alphanumeric characters and underscores are valid
            in the Name, and the name must start with a letter. The value has
            a maximum length of 255 characters.
        '''
        _validate_not_none('service_name', service_name)
        _validate_not_none('deployment_slot', deployment_slot)
        _validate_not_none('name', name)
        _validate_not_none('package_url', package_url)
        _validate_not_none('label', label)
        _validate_not_none('configuration', configuration)
        return self._perform_post(
            self._get_deployment_path_using_slot(
                service_name, deployment_slot),
            _XmlSerializer.create_deployment_to_xml(
                name,
                package_url,
                label,
                configuration,
                start_deployment,
                treat_warnings_as_error,
                extended_properties),

azure-servicemanagement-legacy

Microsoft Azure Legacy Service Management Client Library for Python

MIT
Latest version published 2 months ago

Package Health Score

91 / 100
Full package analysis

Popular azure-servicemanagement-legacy functions