How to use the azure-servicemanagement-legacy.azure.servicemanagement.servicemanagementclient._ServiceManagementClient 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 / servicemanagementclient.py View on Github external
if not self.cert_file and not request_session:
            if AZURE_MANAGEMENT_CERTFILE in os.environ:
                self.cert_file = os.environ[AZURE_MANAGEMENT_CERTFILE]

        if not self.subscription_id:
            if AZURE_MANAGEMENT_SUBSCRIPTIONID in os.environ:
                self.subscription_id = os.environ[
                    AZURE_MANAGEMENT_SUBSCRIPTIONID]

        if not self.request_session:
            if not self.cert_file or not self.subscription_id:
                raise ValueError(
                    'You need to provide subscription id and certificate file')

        if not self.request_session:
            if _ServiceManagementClient.should_use_requests(self.cert_file):
                self.request_session = requests.Session()
                self.request_session.cert = self.cert_file

        self._httpclient = _HTTPClient(
            service_instance=self, cert_file=self.cert_file,
            request_session=self.request_session, timeout=timeout,
            user_agent=_USER_AGENT_STRING)
        self._filter = self._httpclient.perform_request
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / computemanagementservice.py View on Github external
VMImages,
)
from ._common_conversion import (
    _str,
)
from ._common_error import (
    _validate_not_none,
)
from .servicemanagementclient import (
    _ServiceManagementClient,
)
from ._serialization import (
    _XmlSerializer,
)

class ComputeManagementService(_ServiceManagementClient):

    def __init__(self, subscription_id=None, cert_file=None,
                 host=MANAGEMENT_HOST, request_session=None,
                 timeout=DEFAULT_HTTP_TIMEOUT):
        '''
        Initializes the management service.

        subscription_id:
            Subscription to manage.
        cert_file:
            Path to .pem certificate file (httplib), or location of the
            certificate in your Personal certificate store (winhttp) in the
            CURRENT_USER\my\CertificateName format.
            If a request_session is specified, then this is unused.
        host:
            Live ServiceClient URL. Defaults to Azure public cloud.
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / websitemanagementservice.py View on Github external
Site,
    Sites,
    WebSpace,
    WebSpaces,
)
from .servicemanagementclient import (
    _ServiceManagementClient,
)
from ._common_conversion import (
    _str,
)
from ._serialization import (
    _XmlSerializer,
)

class WebsiteManagementService(_ServiceManagementClient):
    ''' Note that this class is a preliminary work on WebSite
        management. Since it lack a lot a features, final version
        can be slightly different from the current one.
    '''

    def __init__(self, subscription_id=None, cert_file=None,
                 host=MANAGEMENT_HOST, request_session=None,
                 timeout=DEFAULT_HTTP_TIMEOUT):
        '''
        Initializes the website management service.

        subscription_id:
            Subscription to manage.
        cert_file:
            Path to .pem certificate file (httplib), or location of the
            certificate in your Personal certificate store (winhttp) in the
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / sqldatabasemanagementservice.py View on Github external
)
from . import (
    EventLog,
    ServerQuota,
    Servers,
    ServiceObjective,
    Database,
    FirewallRule,
    _SqlManagementXmlSerializer,
    _MinidomXmlToObject,
    )
from .servicemanagementclient import (
    _ServiceManagementClient,
    )

class SqlDatabaseManagementService(_ServiceManagementClient):
    ''' Note that this class is a preliminary work on SQL Database
        management. Since it lack a lot a features, final version
        can be slightly different from the current one.
    '''

    def __init__(self, subscription_id=None, cert_file=None,
                 host=MANAGEMENT_HOST, request_session=None,
                 timeout=DEFAULT_HTTP_TIMEOUT):
        '''
        Initializes the sql database management service.

        subscription_id:
            Subscription to manage.
        cert_file:
            Path to .pem certificate file (httplib), or location of the
            certificate in your Personal certificate store (winhttp) in the
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / schedulermanagementservice.py View on Github external
)
from ._common_conversion import (
    _str,
)
from ._common_error import (
    _validate_not_none
)
from .servicemanagementclient import (
    _ServiceManagementClient,
)
from ._serialization import (
    JSONEncoder,
    _SchedulerManagementXmlSerializer,
)

class SchedulerManagementService(_ServiceManagementClient):

    ''' Note that this class is a preliminary work on Scheduler
        management. Since it lack a lot a features, final version
        can be slightly different from the current one.
    '''

    def __init__(self, subscription_id=None, cert_file=None,
                 host=MANAGEMENT_HOST, request_session=None,
                 timeout=DEFAULT_HTTP_TIMEOUT):
        '''
        Initializes the scheduler management service.

        subscription_id:
            Subscription to manage.
        cert_file:
            Path to .pem certificate file (httplib), or location of the
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicebusmanagementservice.py View on Github external
NotificationHubDescription,
    RelayDescription,
    MetricProperties,
    MetricValues,
    MetricRollups,
    _MinidomXmlToObject,
)
from .servicemanagementclient import (
    _ServiceManagementClient,
)

from functools import partial

X_MS_VERSION = '2012-03-01'

class ServiceBusManagementService(_ServiceManagementClient):

    def __init__(self, subscription_id=None, cert_file=None,
                 host=MANAGEMENT_HOST, request_session=None,
                 timeout=DEFAULT_HTTP_TIMEOUT):
        '''
        Initializes the service bus management service.

        subscription_id:
            Subscription to manage.
        cert_file:
            Path to .pem certificate file (httplib), or location of the
            certificate in your Personal certificate store (winhttp) in the
            CURRENT_USER\my\CertificateName format.
            If a request_session is specified, then this is unused.
        host:
            Live ServiceClient URL. Defaults to Azure public cloud.
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementclient.py View on Github external
if not self.cert_file and not request_session:
            if AZURE_MANAGEMENT_CERTFILE in os.environ:
                self.cert_file = os.environ[AZURE_MANAGEMENT_CERTFILE]

        if not self.subscription_id:
            if AZURE_MANAGEMENT_SUBSCRIPTIONID in os.environ:
                self.subscription_id = os.environ[
                    AZURE_MANAGEMENT_SUBSCRIPTIONID]

        if not self.request_session:
            if not self.cert_file or not self.subscription_id:
                raise ValueError(
                    'You need to provide subscription id and certificate file')

        if not self.request_session:
            if _ServiceManagementClient.should_use_requests(self.cert_file):
                self.request_session = requests.Session()
                self.request_session.cert = self.cert_file

        self._httpclient = _HTTPClient(
            service_instance=self, cert_file=self.cert_file,
            request_session=self.request_session, timeout=timeout,
            user_agent=_USER_AGENT_STRING)
        self._filter = self._httpclient.perform_request
github Azure / azure-sdk-for-python / azure-servicemanagement-legacy / azure / servicemanagement / servicemanagementservice.py View on Github external
VMImages,
)
from ._common_conversion import (
    _str,
)
from ._common_error import (
    _validate_not_none,
)
from .servicemanagementclient import (
    _ServiceManagementClient,
)
from ._serialization import (
    _XmlSerializer,
)

class ServiceManagementService(_ServiceManagementClient):

    def __init__(self, subscription_id=None, cert_file=None,
                 host=MANAGEMENT_HOST, request_session=None,
                 timeout=DEFAULT_HTTP_TIMEOUT):
        '''
        Initializes the management service.

        subscription_id:
            Subscription to manage.
        cert_file:
            Path to .pem certificate file (httplib), or location of the
            certificate in your Personal certificate store (winhttp) in the
            CURRENT_USER\my\CertificateName format.
            If a request_session is specified, then this is unused.
        host:
            Live ServiceClient URL. Defaults to Azure public cloud.

azure-servicemanagement-legacy

Microsoft Azure Legacy Service Management Client Library for Python

MIT
Latest version published 2 months ago

Package Health Score

88 / 100
Full package analysis

Popular azure-servicemanagement-legacy functions