Redid the pretend mode patch.
diff --git a/xos/openstack_observer/ansible.py b/xos/openstack_observer/ansible.py
index f8ed547..ec9f160 100644
--- a/xos/openstack_observer/ansible.py
+++ b/xos/openstack_observer/ansible.py
@@ -67,21 +67,26 @@
f.write(buffer)
f.flush()
- run = os.popen(XOS_DIR + '/observer/run_ansible %s'%shellquote(fqp))
- #run = os.popen('ansible-playbook -v %s'%shellquote(fqp))
- msg = run.read()
- status = run.close()
+
+ if (Config().observer_steps):
+ run = os.popen(XOS_DIR + '/observer/run_ansible %s'%shellquote(fqp))
+ msg = run.read()
+ status = run.close()
+
+ else:
+ msg = open(fqp+'.out').read()
+
try:
ok_results = parse_output(msg)
- if (len(ok_results) != expected_num):
- raise ValueError('Unexpected num')
+ if (len(ok_results) != expected_num):
+ raise ValueError('Unexpected num')
except ValueError,e:
all_fatal = re.findall(r'^msg: (.*)',msg,re.MULTILINE)
all_fatal2 = re.findall(r'^ERROR: (.*)',msg,re.MULTILINE)
-
-
- all_fatal.extend(all_fatal2)
+
+
+ all_fatal.extend(all_fatal2)
try:
error = ' // '.join(all_fatal)
except:
diff --git a/xos/xos_config b/xos/xos_config
index a618905..26211d0 100644
--- a/xos/xos_config
+++ b/xos/xos_config
@@ -32,6 +32,7 @@
ca_ssl_cert=/etc/ssl/certs/ca-certificates.crt
[observer]
+pretend=True
backoff_disabled=False
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps