Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

continue use instance-0000001

  • Loading branch information...
commit 6f24b3cf98fb0f066b36c219238617b24231d50b 1 parent 8ce3c11
@hokerffb hokerffb authored
View
5 kanyun/server/data_server.py
@@ -29,7 +29,7 @@
import plugin_agent_srv
from kanyun.common.const import *
from kanyun.common.app import *
-from kanyun.common.nova_tools import *
+#from kanyun.common.nova_tools import *
"""
Save the vm's system info data to db.
@@ -40,7 +40,8 @@
app = App(conf="kanyun.conf", log="/tmp/kanyun-server.log")
logger = app.get_logger()
-tool = NovaTools(app)
+#tool = NovaTools(app)
+tool = None
class LivingStatus():
View
5 kanyun/server/plugin_agent_srv.py
@@ -161,8 +161,9 @@ def plugin_decoder_agent(tool, db, data):
val2 = 0
for nova_id, data in data.iteritems():
# TODO:translate instance_id to instance_uuid
- instance_id = get_uuid(tool, nova_id)
- print nova_id, "-->", instance_id
+# instance_id = get_uuid(tool, nova_id)
+# print nova_id, "-->", instance_id
+ instance_id = nova_id
keypath = '/' # use for previous_data's key
keypath += instance_id
View
4 kanyun/worker/plugin_agent.py
@@ -74,8 +74,8 @@ def collect_info(self):
infos_by_dom_name = dict()
for dom_id in self.conn.listDomainsID():
dom_conn = self.conn.lookupByID(dom_id)
-# dom_key = "%s@%s" % (dom_conn.name(), self.hostname)
- dom_key = dom_conn.name()
+ dom_key = "%s@%s" % (dom_conn.name(), self.hostname)
+# dom_key = dom_conn.name()
dom_xml = dom_conn.XMLDesc(0)
print "-" * 60
print dom_key
Please sign in to comment.
Something went wrong with that request. Please try again.