Fixed many small issues.
This commit is contained in:
parent
97aa4ca978
commit
2de25c8b6f
@ -157,7 +157,9 @@ class CreateWinService(workflows.Workflow):
|
||||
def handle(self, request, context):
|
||||
try:
|
||||
datacenter = context.get('domain_controller_name', '')
|
||||
service = api.windc.services_create(request, context)
|
||||
service = api.windc.services_create(request,
|
||||
datacenter,
|
||||
context)
|
||||
return True
|
||||
except:
|
||||
exceptions.handle(request)
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
source openrc.sh
|
||||
|
||||
#export OS_USERNAME=admin
|
||||
#source ../../devstack/openrc
|
||||
#nova keypair-add keero-linux-keys > heat_key.priv
|
||||
heat "$@"
|
||||
|
||||
|
@ -49,6 +49,7 @@ class Services_Controller(object):
|
||||
# We need to create Service object and return its id
|
||||
params['tenant_id'] = tenant_id
|
||||
params['datacenter_id'] = datacenter_id
|
||||
params['type'] = 'active_directory_service'
|
||||
service_id = core_api.create_service(self.conf, params)
|
||||
return {'service': {'id': service_id}}
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
import logging
|
||||
import uuid
|
||||
import os
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
from windc.core.builder import Builder
|
||||
@ -46,8 +47,10 @@ class ActiveDirectory(Builder):
|
||||
|
||||
def do_analysis(self, context, event, data):
|
||||
LOG.debug("Doing analysis for data: %s", data)
|
||||
zones = data['zones']
|
||||
if data['type'] == self.type and len(zones) == 1:
|
||||
print data
|
||||
|
||||
context['zones'] = ['a1']
|
||||
if data['type'] == self.type:
|
||||
LOG.debug("It is a service which I should build.")
|
||||
datacenter_id = data['datacenter_id']
|
||||
dc = db_api.datacenter_get(context['conf'],data['tenant_id'],
|
||||
@ -90,6 +93,9 @@ class ActiveDirectory(Builder):
|
||||
|
||||
def deploy_template_command(self, context, event, data):
|
||||
LOG.debug("Creating CloudFormation Template deployment command...")
|
||||
print context['template'].to_json()
|
||||
LOG.debug(context['template'])
|
||||
print os.system('pwd')
|
||||
fname = "templates/"+str(uuid.uuid4())
|
||||
f=open(fname, "w")
|
||||
f.write(context['template'].to_json())
|
||||
@ -111,4 +117,4 @@ class ActiveDirectory(Builder):
|
||||
|
||||
def submit_commands(self, context, event, data):
|
||||
LOG.debug("Submit commands for execution...")
|
||||
pass
|
||||
pass
|
||||
|
@ -26,16 +26,8 @@ class Command:
|
||||
type = "Empty"
|
||||
context = None
|
||||
|
||||
def __init__(self):
|
||||
self.type = "Empty"
|
||||
self.context = None
|
||||
self.data = None
|
||||
|
||||
def __init__(self, type, context):
|
||||
self.type = type
|
||||
self.context = context
|
||||
|
||||
def __init__(self, type, context, data):
|
||||
def __init__(self, type="Empty", context=None, data=None):
|
||||
self.type = type
|
||||
self.context = context
|
||||
self.data = data
|
||||
|
@ -32,7 +32,7 @@ class Heat:
|
||||
def execute(self, command):
|
||||
# client = Client('1',OS_IMAGE_ENDPOINT, OS_TENANT_ID)
|
||||
LOG.debug('Calling heat script to execute template')
|
||||
call(["./heat_run","stack-create","-f "+command.context['template_name'],
|
||||
call(["./heat_run","stack-create","-f"+command.context['template_name'],
|
||||
command.context['stack_name']])
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user