-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Heat provisioner #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, thanks. Can you add requirements?
I'll think about ways to test this code.
kqueen/provisioners/heat.py
Outdated
from keystoneauth1.identity import v3 | ||
from keystoneauth1 import session | ||
import heatclient | ||
import heatclient.client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you plesae add these dependencies to requirements.txt
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See latest commit
sort imports be consistent with quotes
if cacheEnabled and cache.get(cluster_id): | ||
return cache.get(cluster_id) | ||
|
||
if cluster_id in self.clusters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can negate here, so it will be
if clusterd_id not in self.clusters:
logger.error('Cluster {} not managed by this provisioner'.format(cluster_id))
return None
and continue with less nesting.
return self.clusters | ||
|
||
def delete(self, cluster_id): | ||
if cluster_id in self.clusters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again if you negate and return code will be much easier to read
|
||
try: | ||
# Create stack | ||
r = self.__create_stack(stack_name, template, merged_files, merged_env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the 'r' used somewhere? also do not use one letter names.
from heatclient.common import template_utils | ||
|
||
import logging | ||
from werkzeug.contrib.cache import SimpleCache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import are wrongly ordered
Provisioning animated loader
Add support for Heat provisioner