Merge "pod create only need pod filename"

This commit is contained in:
Jenkins
2014-12-24 13:20:48 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 6 deletions

View File

@@ -17,7 +17,7 @@ from magnumclient.common import utils
from magnumclient import exceptions
CREATION_ATTRIBUTES = ['name']
CREATION_ATTRIBUTES = ['pod_data']
class Pod(base.Resource):

View File

@@ -184,17 +184,13 @@ def do_pod_list(cs, args):
{'versions': _print_list_field('versions')})
@utils.arg('--name',
metavar='<name>',
help='Name of the pod to create.')
@utils.arg('--pod-file',
metavar='<pod-file>',
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)