Cleanup imports
diff --git a/xos/observers/helloworldservice/helloworldservice_config b/xos/observers/helloworldservice/helloworldservice_config
index 39dacbe..c14dff4 100644
--- a/xos/observers/helloworldservice/helloworldservice_config
+++ b/xos/observers/helloworldservice/helloworldservice_config
@@ -35,13 +35,10 @@
pretend=False
backoff_disabled=False
images_directory=/opt/xos/images
-dependency_graph=/opt/xos/model-deps
+dependency_graph=/opt/xos/observers/helloworldservice/model-deps
logfile=/var/log/xos_backend.log
steps_dir=/opt/xos/observers/helloworldservice/steps
save_ansible_output=True
[gui]
disable_minidashboard=True
-#branding_name=CORD
-#branding_css=/static/cord.css
-#branding_icon=/static/onos-logo.png
diff --git a/xos/observers/helloworldservice/model-deps b/xos/observers/helloworldservice/model-deps
index 63188f0..0967ef4 100644
--- a/xos/observers/helloworldservice/model-deps
+++ b/xos/observers/helloworldservice/model-deps
@@ -1,19 +1 @@
-{
- "OriginServer": [
- "ContentProvider"
- ],
- "ContentProvider": [
- "ServiceProvider"
- ],
- "CDNPrefix": [
- "ContentProvider"
- ],
- "AccessMap": [
- "ContentProvider"
- ],
- "SiteMap": [
- "ContentProvider",
- "ServiceProvider",
- "CDNPrefix"
- ]
-}
+{}
diff --git a/xos/observers/helloworldservice/steps/sync_helloworldtenant.py b/xos/observers/helloworldservice/steps/sync_helloworldtenant.py
index 9adddd2..80efd75 100644
--- a/xos/observers/helloworldservice/steps/sync_helloworldtenant.py
+++ b/xos/observers/helloworldservice/steps/sync_helloworldtenant.py
@@ -1,39 +1,36 @@
import os
import sys
-import base64
-from django.db.models import F, Q
-from xos.config import Config
-from observer.syncstep import SyncStep
-from helloworldservice.models import HelloWorldService,HelloWorldTenant
+from django.db.models import Q
+from helloworldservice.models import HelloWorldService, HelloWorldTenant
from observers.base.SyncInstanceUsingAnsible import SyncInstanceUsingAnsible
-from util.logger import Logger, logging
parentdir = os.path.join(os.path.dirname(__file__),"..")
sys.path.insert(0,parentdir)
-logger = Logger(level=logging.INFO)
-
class SyncHelloWorldServiceTenant(SyncInstanceUsingAnsible):
provides=[HelloWorldTenant]
observes=HelloWorldTenant
requested_interval=0
template_name = "sync_helloworldtenant.yaml"
- service_key_name = "/opt/xos/observers/helloworldservice/helloworldservice_private_key"
+ service_key_name =
+ "/opt/xos/observers/helloworldservice/helloworldservice_private_key"
def __init__(self, *args, **kwargs):
super(SyncHelloWorldServiceTenant, self).__init__(*args, **kwargs)
def fetch_pending(self, deleted):
if (not deleted):
- objs = HelloWorldTenant.get_tenant_objects().filter(Q(enacted__lt=F('updated')) | Q(enacted=None),Q(lazy_blocked=False))
+ objs = HelloWorldTenant.get_tenant_objects().filter(
+ Q(enacted__lt=F('updated')) | Q(enacted=None),
+ Q(lazy_blocked=False))
else:
objs = HelloWorldTenant.get_deleted_tenant_objects()
return objs
-
+
def get_extra_attributes(self, o):
- self.get_instance(o)
- return {"display_message": o.display_message}
+ self.get_instance(o)
+ return {"display_message": o.display_message}
def delete_record(self, m):
pass
diff --git a/xos/observers/helloworldservice/steps/sync_helloworldtenant.yaml b/xos/observers/helloworldservice/steps/sync_helloworldtenant.yaml
index 1338713..ae472f8 100644
--- a/xos/observers/helloworldservice/steps/sync_helloworldtenant.yaml
+++ b/xos/observers/helloworldservice/steps/sync_helloworldtenant.yaml
@@ -13,7 +13,8 @@
- name: write message
shell: cat "{{ display_message }}" > "/var/www/html/{{ instance_name }}.html"
+ - name: stop apache
+ service: name=apache2 state=stopped
+
- name: start apache
- shell: service apache2 restart
-
-
+ service: name=apache2 state=started