Security credentials are now passed into heat engine from cli
The request parameter KeyStoneCreds has the values for username, password, tenant, and authurl Fixes #30
This commit is contained in:
parent
5b78cd7f6b
commit
1e7c0eff6c
|
@ -33,7 +33,8 @@ shell2:
|
|||
sudo heat-engine
|
||||
|
||||
shell3:
|
||||
|
||||
|
||||
heat create_jeos F16 x86_64
|
||||
heat create my_stack --template-url=https://raw.github.com/heat-api/heat/master/templates/WordPress_Single_Instance.template
|
||||
|
||||
References
|
||||
|
|
5
bin/heat
5
bin/heat
|
@ -16,7 +16,6 @@ import sys
|
|||
import time
|
||||
import json
|
||||
|
||||
|
||||
from urlparse import urlparse
|
||||
|
||||
# If ../heat/__init__.py exists, add ../ to Python search path, so that
|
||||
|
@ -81,8 +80,8 @@ def template_validate(options, arguments):
|
|||
print 'Please specify a template file or url'
|
||||
return FAILURE
|
||||
|
||||
c = get_client(options)
|
||||
result = c.validate_template(**parameters)
|
||||
client = get_client(options)
|
||||
result = client.validate_template(**parameters)
|
||||
print json.dumps(result, indent=2)
|
||||
|
||||
@catch_error('gettemplate')
|
||||
|
|
|
@ -125,7 +125,7 @@ class StackController(object):
|
|||
|
||||
def validate_template(self, req):
|
||||
|
||||
c = engine.get_engine_client(req.context)
|
||||
client = engine.get_engine_client(req.context)
|
||||
|
||||
try:
|
||||
templ = self._get_template(req)
|
||||
|
@ -143,7 +143,7 @@ class StackController(object):
|
|||
return webob.exc.HTTPBadRequest(explanation=msg)
|
||||
|
||||
logger.info('validate_template')
|
||||
return c.validate_template(stack, **req.params)
|
||||
return client.validate_template(stack, **req.params)
|
||||
|
||||
def delete(self, req):
|
||||
"""
|
||||
|
|
|
@ -39,6 +39,7 @@ class V1Client(base_client.BaseClient):
|
|||
params['Version'] = '2010-05-15'
|
||||
params['SignatureVersion'] = '2'
|
||||
params['SignatureMethod'] = 'HmacSHA256'
|
||||
params['KeyStoneCreds'] = self.creds
|
||||
|
||||
def list_stacks(self, **kwargs):
|
||||
params = self._extract_params(kwargs, SUPPORTED_PARAMS)
|
||||
|
@ -91,7 +92,7 @@ class V1Client(base_client.BaseClient):
|
|||
def validate_template(self, **kwargs):
|
||||
params = self._extract_params(kwargs, SUPPORTED_PARAMS)
|
||||
self._insert_common_parameters(params)
|
||||
|
||||
|
||||
res = self.do_request("GET", "/ValidateTemplate", params=params)
|
||||
data = json.loads(res.read())
|
||||
return data
|
||||
|
|
|
@ -15,5 +15,5 @@
|
|||
|
||||
SUPPORTED_PARAMS = ('StackName', 'TemplateBody', 'TemplateUrl','NotificationARNs', 'Parameters',
|
||||
'Version', 'SignatureVersion', 'Timestamp', 'AWSAccessKeyId',
|
||||
'Signature')
|
||||
'Signature', 'KeyStoneCreds')
|
||||
|
||||
|
|
Loading…
Reference in New Issue