提交 ad4bef71 编写于 作者: X Xi Chen

move required arguments together

上级 cd31c12a
...@@ -28,6 +28,19 @@ import paramiko ...@@ -28,6 +28,19 @@ import paramiko
# ~/.aws/credentials and ~/.aws/config # ~/.aws/credentials and ~/.aws/config
parser = argparse.ArgumentParser(description=__doc__) parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument(
'--key_name',
type=str,
default="",
required=True,
help="required, key pair name")
parser.add_argument(
'--security_group_id',
type=str,
default="",
required=True,
help="required, the security group id associated with your VPC")
parser.add_argument( parser.add_argument(
'--vpc_id', '--vpc_id',
type=str, type=str,
...@@ -38,12 +51,7 @@ parser.add_argument( ...@@ -38,12 +51,7 @@ parser.add_argument(
type=str, type=str,
default="", default="",
help="The Subnet_id in which you wish to run test") help="The Subnet_id in which you wish to run test")
parser.add_argument(
'--security_group_id',
type=str,
default="",
required=True,
help="required, the security group id associated with your VPC")
parser.add_argument( parser.add_argument(
'--pserver_instance_type', '--pserver_instance_type',
type=str, type=str,
...@@ -54,12 +62,7 @@ parser.add_argument( ...@@ -54,12 +62,7 @@ parser.add_argument(
type=str, type=str,
default="p2.xlarge", default="p2.xlarge",
help="your trainer instance type") help="your trainer instance type")
parser.add_argument(
'--key_name',
type=str,
default="",
required=True,
help="required, key pair name")
parser.add_argument( parser.add_argument(
'--task_name', '--task_name',
type=str, type=str,
...@@ -316,7 +319,6 @@ def cleanup(task_name): ...@@ -316,7 +319,6 @@ def cleanup(task_name):
}]) }])
ec2client.delete_subnet(SubnetId=subnet["Subnets"][0]["SubnetId"]) ec2client.delete_subnet(SubnetId=subnet["Subnets"][0]["SubnetId"])
# no subnet delete waiter, just leave it. # no subnet delete waiter, just leave it.
return return
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册