summaryrefslogtreecommitdiffstats
path: root/utils/create_pod_file.py
diff options
context:
space:
mode:
authorYang (Gabriel) Yu <Gabriel.yuyang@huawei.com>2017-08-22 15:42:14 +0800
committerYang (Gabriel) Yu <Gabriel.yuyang@huawei.com>2017-08-23 14:35:28 +0800
commit7828581444d21ad792eebda90b21b2984068d19a (patch)
treed6e7d6384374235ef1fc57d2fb1ad7f54f094d87 /utils/create_pod_file.py
parent117c48ea667348525b8b8a35d8bc8e2f8067dcd5 (diff)
Add pod description file support
JIRA: BOTTLENECK-178 Need to add pod descrition file for Bottlenecks to be installer-agnostic Change-Id: I100022ff1fcdaabe800492649c138dfe9fce55c2 Signed-off-by: Yang (Gabriel) Yu <Gabriel.yuyang@huawei.com>
Diffstat (limited to 'utils/create_pod_file.py')
-rw-r--r--utils/create_pod_file.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/create_pod_file.py b/utils/create_pod_file.py
index e2c57d23f..def5ecca8 100644
--- a/utils/create_pod_file.py
+++ b/utils/create_pod_file.py
@@ -12,6 +12,8 @@ parser.add_argument("-u", "--user", help="Give username of this pod")
parser.add_argument("-k", "--key", help="Give key file of the user")
parser.add_argument("-p", "--password", help="Give password of the user")
parser.add_argument("-f", "--filepath", help="Give dest path of output file")
+parser.add_argument("-s", "--sshkey", default="/root/.ssh/id_rsa",
+ help="Give the path for ssh key")
args = parser.parse_args()
@@ -92,7 +94,7 @@ def create_file(handler, INSTALLER_TYPE):
item['password'] = 'root'
else:
for item in node_list:
- item['key_filename'] = '/root/.ssh/id_rsa'
+ item['key_filename'] = args.sshkey
data = {'nodes': node_list}
with open(args.filepath, "w") as fw:
yaml.dump(data, fw)