summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorviswesn <viswesn@gmail.com>2016-11-11 15:52:16 +0530
committerviswesn <viswesn@gmail.com>2016-11-11 15:52:16 +0530
commit1a19e7918a3b61c7197227f6c0c90001b34e86f3 (patch)
treecb3966ef0d58b29be556a16b2e3998dfdfa76923
parent5c21ca76090e7372c890f5818b512210c65b2621 (diff)
downloadcharm-murano-1a19e7918a3b61c7197227f6c0c90001b34e86f3.zip
charm-murano-1a19e7918a3b61c7197227f6c0c90001b34e86f3.tar.gz
charm-murano-1a19e7918a3b61c7197227f6c0c90001b34e86f3.tar.bz2
Fixed the lint errors
-rw-r--r--src/lib/charm/openstack/murano.py25
-rw-r--r--src/reactive/murano_handlers.py4
2 files changed, 14 insertions, 15 deletions
diff --git a/src/lib/charm/openstack/murano.py b/src/lib/charm/openstack/murano.py
index e3ccdff..b0a5879 100644
--- a/src/lib/charm/openstack/murano.py
+++ b/src/lib/charm/openstack/murano.py
@@ -1,7 +1,3 @@
-import os
-import socket
-import subprocess
-
import charmhelpers.contrib.openstack.utils as ch_utils
import charmhelpers.core.hookenv as hookenv
import charms_openstack.charm
@@ -9,8 +5,8 @@ import charms_openstack.ip as os_ip
RC_FILE = '/root/novarc'
+
class MuranoCharm(charms_openstack.charm.HAOpenStackCharm):
-
# Internal name of charm
service_name = name = 'murano'
@@ -19,7 +15,7 @@ class MuranoCharm(charms_openstack.charm.HAOpenStackCharm):
# List of packages to install for this charm
packages = ['murano-api', 'murano-engine', 'python-pymysql', 'python-apt']
-
+
# Init services the charm manages
services = ['haproxy', 'murano-api', 'murano-engine']
@@ -43,7 +39,8 @@ class MuranoCharm(charms_openstack.charm.HAOpenStackCharm):
ha_resources = ['vips', 'haproxy']
- sync_cmd = ['murano-db-manage', '--config-file', '/etc/murano/murano.conf', 'upgrade']
+ sync_cmd = ['murano-db-manage', '--config-file',
+ '/etc/murano/murano.conf', 'upgrade']
def __init__(self, release=None, **kwargs):
"""Custom initialiser for class
@@ -63,7 +60,7 @@ class MuranoCharm(charms_openstack.charm.HAOpenStackCharm):
def get_database_setup(self):
"""Provide the default database credentials as a list of 3-tuples
-
+
returns a structure of:
[
{'database': <database>,
@@ -71,14 +68,12 @@ class MuranoCharm(charms_openstack.charm.HAOpenStackCharm):
'hostname': <hostname of this unit>
'prefix': <the optional prefix for the database>, },
]
-
+
:returns [{'database': ...}, ...]: credentials for multiple databases
"""
return [
- dict(
- database=self.config['database'],
- username=self.config['database-user'],
- hostname=hookenv.unit_private_ip(), )
+ dict(
+ database=self.config['database'],
+ username=self.config['database-user'],
+ hostname=hookenv.unit_private_ip(), )
]
-
-
diff --git a/src/reactive/murano_handlers.py b/src/reactive/murano_handlers.py
index 4cf400d..fed0d82 100644
--- a/src/reactive/murano_handlers.py
+++ b/src/reactive/murano_handlers.py
@@ -15,7 +15,10 @@
import charms_openstack.charm as charm
import charms.reactive as reactive
+# We need to import charm.openstack.murano to avoid
+# No derived OpenStackCharm() classes registered
import charm.openstack.murano as murano
+assert murano
charm.use_defaults(
'charm.installed',
@@ -32,6 +35,7 @@ COMPLETE_INTERFACE_STATES = [
'amqp.available',
]
+
@reactive.when(*COMPLETE_INTERFACE_STATES)
def render_config(*args):
"""Render the configuration for charm when all the interfaces are

This mirror site include all the OpenStack related repositories under: openstack, openstack-dev and openstack-infra.

NOTE: All repositories are updated every one hour.

Usage

For Git Clone
 git clone http://git.trystack.cn/openstack/nova.git 
For DevStack

Add GIT_BASE, NOVNC_REPO and SPICE_REPO variables to local.conf file.

[[local|localrc]]

# use TryStack git mirror
GIT_BASE=http://git.trystack.cn
NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git
SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git