How to use the aliyun-python-sdk-core-v3.integration.test_ecs.TestEcsIntegration function in aliyun-python-sdk-core-v3

To help you get started, we’ve selected a few aliyun-python-sdk-core-v3 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 aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / integration / test_ecs.py View on Github external
def test_ecs(self):

        # init client
        client = AcsClient(
            os.environ['ACCESS_KEY_ID'],
            os.environ['ACCESS_KEY_SECRET'],
            "cn-hangzhou"
        )
        mylogger.info("Init client success")

        # get demo instance attributes
        image_id, security_group_id = TestEcsIntegration.get_demo_ecs_attributes(client)

        # create
        instance_id = TestEcsIntegration.create_instance(client, image_id, security_group_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # start
        TestEcsIntegration.start_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Running')

        # stop
        TestEcsIntegration.stop_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / integration / test_ecs.py View on Github external
os.environ['ACCESS_KEY_SECRET'],
            "cn-hangzhou"
        )
        mylogger.info("Init client success")

        # get demo instance attributes
        image_id, security_group_id = TestEcsIntegration.get_demo_ecs_attributes(client)

        # create
        instance_id = TestEcsIntegration.create_instance(client, image_id, security_group_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # start
        TestEcsIntegration.start_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Running')

        # stop
        TestEcsIntegration.stop_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # delete
        TestEcsIntegration.delete_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Deleted')
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / integration / test_ecs.py View on Github external
image_id, security_group_id = TestEcsIntegration.get_demo_ecs_attributes(client)

        # create
        instance_id = TestEcsIntegration.create_instance(client, image_id, security_group_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # start
        TestEcsIntegration.start_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Running')

        # stop
        TestEcsIntegration.stop_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # delete
        TestEcsIntegration.delete_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Deleted')
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / integration / test_ecs.py View on Github external
def test_ecs(self):

        # init client
        client = AcsClient(
            os.environ['ACCESS_KEY_ID'],
            os.environ['ACCESS_KEY_SECRET'],
            "cn-hangzhou"
        )
        mylogger.info("Init client success")

        # get demo instance attributes
        image_id, security_group_id = TestEcsIntegration.get_demo_ecs_attributes(client)

        # create
        instance_id = TestEcsIntegration.create_instance(client, image_id, security_group_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # start
        TestEcsIntegration.start_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Running')

        # stop
        TestEcsIntegration.stop_instance(client, instance_id)
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / integration / test_ecs.py View on Github external
# init client
        client = AcsClient(
            os.environ['ACCESS_KEY_ID'],
            os.environ['ACCESS_KEY_SECRET'],
            "cn-hangzhou"
        )
        mylogger.info("Init client success")

        # get demo instance attributes
        image_id, security_group_id = TestEcsIntegration.get_demo_ecs_attributes(client)

        # create
        instance_id = TestEcsIntegration.create_instance(client, image_id, security_group_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # start
        TestEcsIntegration.start_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Running')

        # stop
        TestEcsIntegration.stop_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # delete
        TestEcsIntegration.delete_instance(client, instance_id)
github aliyun / aliyun-openapi-python-sdk / aliyun-python-sdk-core-v3 / integration / test_ecs.py View on Github external
TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # start
        TestEcsIntegration.start_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Running')

        # stop
        TestEcsIntegration.stop_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Stopped')

        # delete
        TestEcsIntegration.delete_instance(client, instance_id)

        # wait
        TestEcsIntegration.wait_for_instance(client, instance_id, 'Deleted')

aliyun-python-sdk-core-v3

The core module of Aliyun Python SDK.

Apache-2.0
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis

Similar packages