Fix helloworldservice observer
diff --git a/xos/observers/helloworldservice/run.sh b/xos/observers/helloworldservice/run.sh
index ad83332..7b0ca1e 100755
--- a/xos/observers/helloworldservice/run.sh
+++ b/xos/observers/helloworldservice/run.sh
@@ -1,2 +1,2 @@
export XOS_DIR=/opt/xos
-python helloworldservice-observer.py -C $XOS_DIR/observers/helloworldservice/helloworldservice_observer_config
+python helloworldservice-observer.py -C $XOS_DIR/observers/helloworldservice/helloworldservice_config
diff --git a/xos/observers/helloworldservice/steps/sync_helloworldtenant.py b/xos/observers/helloworldservice/steps/sync_helloworldtenant.py
index ff6253d..73dd185 100644
--- a/xos/observers/helloworldservice/steps/sync_helloworldtenant.py
+++ b/xos/observers/helloworldservice/steps/sync_helloworldtenant.py
@@ -17,10 +17,15 @@
provides=[HelloWorldTenant]
observes=HelloWorldTenant
requested_interval=1
-
+
def sync_record(self, record):
logger.info("Syncing helloworldtenant");
- open('log','w').write(record.name)
-
+ open('log','w').write(record.display_message + '\n');
+ if (record.instance):
+ open('log','w').write(record.instance + '\n');
+ record.instance.userData = "packages:\n - apache2\nruncmd:\n - update-rc.d apache2 enable\n - service apache2 start\nwrite_files:\n- content: Hello %s\n path: /var/www/html/hello.txt"%record.display_message
+ record.instance.save();
+
+
def delete_record(self, m):
return