Beispiel #1
0
    def setUp(self):
        self.queue_client = QueueService(
            account_name=credentials.getStorageServicesName(),
            account_key=credentials.getStorageServicesKey())

        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()
        if proxy_host:
            self.queue_client.set_proxy(proxy_host, proxy_port)

        __uid = getUniqueTestRunID()

        queue_base_name = u'%s' % (__uid)
        self.test_queues = []
        self.creatable_queues = []
        for i in range(10):
            self.test_queues.append(
                TEST_QUEUE_PREFIX + str(i) +
                getUniqueNameBasedOnCurrentTime(queue_base_name))
        for i in range(4):
            self.creatable_queues.append(
                'mycreatablequeue' + str(i) +
                getUniqueNameBasedOnCurrentTime(queue_base_name))
        for queue_name in self.test_queues:
            self.queue_client.create_queue(queue_name)
Beispiel #2
0
    def test_get_affinity_group_properties(self):
        # Arrange
        self.hosted_service_name = getUniqueNameBasedOnCurrentTime('utsvc')
        self.storage_account_name = getUniqueNameBasedOnCurrentTime(
            'utstorage')
        self._create_affinity_group(self.affinity_group_name)
        self.sms.create_hosted_service(self.hosted_service_name,
                                       'affgrptestlabel', 'affgrptestdesc',
                                       None, self.affinity_group_name)
        self.sms.create_storage_account(self.storage_account_name,
                                        self.storage_account_name + 'desc',
                                        self.storage_account_name + 'label',
                                        self.affinity_group_name)

        # Act
        result = self.sms.get_affinity_group_properties(
            self.affinity_group_name)

        # Assert
        self.assertIsNotNone(result)
        self.assertEqual(result.name, self.affinity_group_name)
        self.assertIsNotNone(result.label)
        self.assertIsNotNone(result.description)
        self.assertIsNotNone(result.location)
        self.assertIsNotNone(result.hosted_services[0])
        self.assertEqual(result.hosted_services[0].service_name,
                         self.hosted_service_name)
        self.assertEqual(
            result.hosted_services[0].hosted_service_properties.affinity_group,
            self.affinity_group_name)
        # not sure why azure does not return any storage service
        self.assertTrue(len(result.capabilities) > 0)
    def setUp(self):
        self.tc = TableService(account_name=credentials.getStorageServicesName().encode('ascii', 'ignore'), 
                                   account_key=credentials.getStorageServicesKey().encode('ascii', 'ignore'))

        __uid = getUniqueTestRunID()
        test_table_base_name = u'testtable%s' % (__uid)
        self.test_table = getUniqueNameBasedOnCurrentTime(test_table_base_name)     
        self.tc.create_table(self.test_table)
    def setUp(self):
        self.tc = TableService(account_name=credentials.getStorageServicesName(), 
                                   account_key=credentials.getStorageServicesKey())

        __uid = getUniqueTestRunID()
        table_base_name = u'testtable%s' % (__uid)
        self.table_name = getUniqueNameBasedOnCurrentTime(table_base_name)     
        self.additional_table_names = []
Beispiel #5
0
    def setUp(self):
        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()

        self.sms = ServiceManagementService(credentials.getSubscriptionId(), credentials.getManagementCertFile())
        if proxy_host:
            self.sms.set_proxy(proxy_host, proxy_port)

        self.management_certificate_name = getUniqueNameBasedOnCurrentTime('utmgmtcert')
    def setUp(self):
        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()

        self.sms = ServiceBusManagementService(credentials.getSubscriptionId(), credentials.getManagementCertFile())
        if proxy_host:
            self.sms.set_proxy(proxy_host, proxy_port)

        self.sb_namespace = getUniqueNameBasedOnCurrentTime('uts')
Beispiel #7
0
    def setUp(self):
        self.sbs = ServiceBusService(credentials.getServiceBusNamespace(),
                                     credentials.getServiceBusKey(), 'owner')

        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()
        if proxy_host:
            self.sbs.set_proxy(proxy_host, proxy_port)

        __uid = getUniqueTestRunID()

        queue_base_name = u'mytestqueue%s' % (__uid)
        topic_base_name = u'mytesttopic%s' % (__uid)

        self.queue_name = getUniqueNameBasedOnCurrentTime(queue_base_name)
        self.topic_name = getUniqueNameBasedOnCurrentTime(topic_base_name)

        self.additional_queue_names = []
        self.additional_topic_names = []
    def setUp(self):
        self.sbs = ServiceBusService(credentials.getServiceBusNamespace(), 
                                     credentials.getServiceBusKey(), 
                                     'owner')

        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()
        if proxy_host:
            self.sbs.set_proxy(proxy_host, proxy_port)

        __uid = getUniqueTestRunID()

        queue_base_name = u'mytestqueue%s' % (__uid)
        topic_base_name = u'mytesttopic%s' % (__uid)

        self.queue_name = getUniqueNameBasedOnCurrentTime(queue_base_name)
        self.topic_name = getUniqueNameBasedOnCurrentTime(topic_base_name)

        self.additional_queue_names = []
        self.additional_topic_names = []
    def setUp(self):
        self.queue_client = QueueService(account_name=credentials.getStorageServicesName(), 
                                                account_key=credentials.getStorageServicesKey())

        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()
        if proxy_host:
            self.queue_client.set_proxy(proxy_host, proxy_port)

        __uid = getUniqueTestRunID()

        queue_base_name = u'%s' % (__uid)
        self.test_queues = []
        self.creatable_queues = []
        for i in range(10):
            self.test_queues.append(TEST_QUEUE_PREFIX + str(i) + getUniqueNameBasedOnCurrentTime(queue_base_name))
        for i in range(4):
            self.creatable_queues.append('mycreatablequeue' + str(i) + getUniqueNameBasedOnCurrentTime(queue_base_name))
        for queue_name in self.test_queues:
            self.queue_client.create_queue(queue_name)
    def setUp(self):
        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()

        self.sms = ServiceManagementService(credentials.getSubscriptionId(), credentials.getManagementCertFile())
        if proxy_host:
            self.sms.set_proxy(proxy_host, proxy_port)

        self.affinity_group_name = getUniqueNameBasedOnCurrentTime('utaffgrp')
        self.hosted_service_name = None
        self.storage_account_name = None
    def setUp(self):
        self.tc = TableService(
            account_name=credentials.getStorageServicesName().encode(
                'ascii', 'ignore'),
            account_key=credentials.getStorageServicesKey().encode(
                'ascii', 'ignore'))

        __uid = getUniqueTestRunID()
        test_table_base_name = u'testtable%s' % (__uid)
        self.test_table = getUniqueNameBasedOnCurrentTime(test_table_base_name)
        self.tc.create_table(self.test_table)
    def setUp(self):
        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()

        self.sms = ServiceBusManagementService(
            credentials.getSubscriptionId(),
            credentials.getManagementCertFile())
        if proxy_host:
            self.sms.set_proxy(proxy_host, proxy_port)

        self.sb_namespace = getUniqueNameBasedOnCurrentTime('uts')
    def setUp(self):
        self.tc = TableService(account_name=credentials.getStorageServicesName(), 
                                   account_key=credentials.getStorageServicesKey())

        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()
        if proxy_host:
            self.tc.set_proxy(proxy_host, proxy_port)

        __uid = getUniqueTestRunID()
        table_base_name = u'testtable%s' % (__uid)
        self.table_name = getUniqueNameBasedOnCurrentTime(table_base_name)     
        self.additional_table_names = []
Beispiel #14
0
    def setUp(self):
        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()

        self.sms = ServiceManagementService(
            credentials.getSubscriptionId(),
            credentials.getManagementCertFile())
        if proxy_host:
            self.sms.set_proxy(proxy_host, proxy_port)

        self.affinity_group_name = getUniqueNameBasedOnCurrentTime('utaffgrp')
        self.hosted_service_name = None
        self.storage_account_name = None
    def test_get_affinity_group_properties(self):
        # Arrange
        self.hosted_service_name = getUniqueNameBasedOnCurrentTime('utsvc')
        self.storage_account_name = getUniqueNameBasedOnCurrentTime('utstorage')
        self._create_affinity_group(self.affinity_group_name)
        self.sms.create_hosted_service(self.hosted_service_name, 'affgrptestlabel', 'affgrptestdesc', None, self.affinity_group_name)
        self.sms.create_storage_account(self.storage_account_name, self.storage_account_name + 'desc', self.storage_account_name + 'label', self.affinity_group_name)

        # Act
        result = self.sms.get_affinity_group_properties(self.affinity_group_name)
        
        # Assert
        self.assertIsNotNone(result)
        self.assertEqual(result.name, self.affinity_group_name)
        self.assertIsNotNone(result.label)
        self.assertIsNotNone(result.description)
        self.assertIsNotNone(result.location)
        self.assertIsNotNone(result.hosted_services[0])
        self.assertEqual(result.hosted_services[0].service_name, self.hosted_service_name)
        self.assertEqual(result.hosted_services[0].hosted_service_properties.affinity_group, self.affinity_group_name)
        # not sure why azure does not return any storage service
        self.assertTrue(len(result.capabilities) > 0)
Beispiel #16
0
    def setUp(self):
        self.tc = TableService(
            account_name=credentials.getStorageServicesName(),
            account_key=credentials.getStorageServicesKey())

        proxy_host = credentials.getProxyHost()
        proxy_port = credentials.getProxyPort()
        if proxy_host:
            self.tc.set_proxy(proxy_host, proxy_port)

        __uid = getUniqueTestRunID()
        table_base_name = u'testtable%s' % (__uid)
        self.table_name = getUniqueNameBasedOnCurrentTime(table_base_name)
        self.additional_table_names = []