def describe_vpcs(url, verb, headers, version, args): params = {} params['Action'] = utils.dash_to_camelcase(args[0]) params['Version'] = version args = args[1:] parser = utils.get_argument_parser() parser.add_argument('--vpc-ids', nargs='*', required=False) args = parser.parse_args(args) vpcutils.populate_params_from_cli_args(params, args) return requestify.make_request(url, verb, headers, params)
def create_vpc(url, verb, headers, version, args): params = {} params['Action'] = utils.dash_to_camelcase(args[0]) params['Version'] = version args = args[1:] parser = utils.get_argument_parser() parser.add_argument('--cidr-block',required=True) args = parser.parse_args(args) vpcutils.populate_params_from_cli_args(params, args) return requestify.make_request(url, verb, headers, params)
def create_vpc(url, verb, headers, version, args): params = {} params['Action'] = utils.dash_to_camelcase(args[0]) params['Version'] = version args = args[1:] parser = utils.get_argument_parser() parser.add_argument('--cidr-block', required=True) args = parser.parse_args(args) vpcutils.populate_params_from_cli_args(params, args) return requestify.make_request(url, verb, headers, params)
def create_sec_group_rule(params,args) : parser = utils.get_argument_parser() parser.add_argument('--group-id',required=True) group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--ip-permissions', nargs='*') group.add_argument('--protocol', dest = 'ip_Permissions.1._ip_protocol') group2 = parser.add_mutually_exclusive_group() group2.add_argument('--cidr', dest = 'ip_Permissions.1._ip_ranges.1._cidr_ip') group2.add_argument('--source-group', dest='ip_Permissions.1._groups.1._group_id') parser.add_argument('--port') args = parser.parse_args(args) vpcutils.populate_params_from_cli_args(params, args)
def create_sec_group_rule(params, args): parser = utils.get_argument_parser() parser.add_argument('--group-id', required=True) group = parser.add_mutually_exclusive_group(required=True) group.add_argument('--ip-permissions', nargs='*') group.add_argument('--protocol', dest='ip_Permissions.1._ip_protocol') group2 = parser.add_mutually_exclusive_group() group2.add_argument('--cidr', dest='ip_Permissions.1._ip_ranges.1._cidr_ip') group2.add_argument('--source-group', dest='ip_Permissions.1._groups.1._group_id') parser.add_argument('--port') args = parser.parse_args(args) vpcutils.populate_params_from_cli_args(params, args)