Пример #1
0
    def run_test(self, commands, ros_func, save_stack_id=False):
        self.args = self.parser.parse_args(commands)
        config.set_client(self.args.config, self.args.region_id)
        req = ros_func.prepare_request(self.args)
        status, headers, body = utils.send_req(req)

        if self.show_output:
            utils.deal_resp(status, headers, body, ros_func.print_response)
        elif status >= 300 or status < 200:
            print(body)

        self.assertGreaterEqual(status, 200)
        self.assertLess(status, 300)

        if save_stack_id:
            self.save_stack_id(json.loads(body)['Id'])
Пример #2
0
def list_regions(args):
    req = prepare_request(args)
    status, headers, body = utils.send_req(req)
    utils.deal_resp(status, headers, body, print_response)
Пример #3
0
def create_stack(args):
    req = prepare_request(args)
    status, headers, body = utils.send_req(req)
    utils.deal_resp(status, headers, body, print_response)
def resource_type_template(args):
    req = prepare_request(args)
    status, headers, body = utils.send_req(req)
    utils.deal_resp(status, headers, body, print_response)
Пример #5
0
def describe_resource(args):
    req = prepare_request(args)
    status, headers, body = utils.send_req(req)
    utils.deal_resp(status, headers, body, print_response)