From 535ecb720a527de6ea6d8339a340d0484f98bf2d Mon Sep 17 00:00:00 2001 From: Jay Lau Date: Tue, 23 Dec 2014 09:44:47 -0500 Subject: [PATCH] pod create only need pod filename The k8s pod create only has one parameter as filename, this patch is updating magnum client can have same parameter when creating pod. Magnum backend also needs to be updated to reflect this. Change-Id: I254a20a5a22e0296004a88ccdf5c66a9fa6e47f0 --- magnumclient/api/pods.py | 2 +- magnumclient/api/shell.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/magnumclient/api/pods.py b/magnumclient/api/pods.py index c05cdcc8..5ca3c357 100644 --- a/magnumclient/api/pods.py +++ b/magnumclient/api/pods.py @@ -17,7 +17,7 @@ from magnumclient.common import utils from magnumclient import exceptions -CREATION_ATTRIBUTES = ['name'] +CREATION_ATTRIBUTES = ['pod_data'] class Pod(base.Resource): diff --git a/magnumclient/api/shell.py b/magnumclient/api/shell.py index c84884e5..200c761b 100644 --- a/magnumclient/api/shell.py +++ b/magnumclient/api/shell.py @@ -180,17 +180,13 @@ def do_pod_list(cs, args): {'versions': _print_list_field('versions')}) -@utils.arg('--name', - metavar='', - help='Name of the pod to create.') @utils.arg('--pod-file', metavar='', help='Name of the pod file to use for creating PODs.') def do_pod_create(cs, args): """Create a pod.""" opts = {} - opts['name'] = args.name - opts['pod_data'] = open(args.pod_file).read() + opts['pod_data'] = args.pod_file node = cs.pods.create(**opts) _show_pod(node)