]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
networks api with final URL structure.
authorsalvatore <>
Thu, 26 May 2011 23:52:11 +0000 (00:52 +0100)
committersalvatore <>
Thu, 26 May 2011 23:52:11 +0000 (00:52 +0100)
No serialization yet

bin/quantum
quantum/common/utils.py
quantum/manager.py
quantum/plugins.ini
quantum/utils.py

index 9971e795add0da830a2ebf7d9dcc931eb78e3d32..0c4a5dd6cf6df87c0472ee966229f1bc19f2e273 100755 (executable)
@@ -56,6 +56,7 @@ if __name__ == '__main__':
 
     try:
         print "HERE-1"
+        print sys.path
         service = service.serve_wsgi(service.QuantumApiService,
                                      options=options,
                                      args=args)
index 4acea98523cf49cf0dfad7bbf5226f3bf49d314d..1317bc1571b49ff787fbd1041166abfe24f86a7a 100644 (file)
@@ -29,8 +29,8 @@ import socket
 import sys
 import ConfigParser
 
-from quantum.common import exceptions as exception
-from quantum.common import flags
+import exceptions as exception
+import flags
 from exceptions import ProcessExecutionError
 
 
@@ -76,7 +76,7 @@ def import_class(import_str):
         #mod_str = os.path.join(FLAGS.state_path, mod_str)
         print "MODULE PATH:%s" %mod_str
         print "CUR DIR:%s" %os.getcwd()
-        __import__(mod_str)
+        __import__(mod_str, level=2)
         print "IO SONO QUI"
         return getattr(sys.modules[mod_str], class_str)
     except (ImportError, ValueError, AttributeError) as e:
@@ -194,6 +194,7 @@ def parse_isotime(timestr):
 
 def getPluginFromConfig(file="config.ini"):
         print "FILE:%s" %os.path.join(FLAGS.state_path, file)
+        print "Globals:%s" %globals()
         Config = ConfigParser.ConfigParser()
         Config.read(os.path.join(FLAGS.state_path, file))
         return Config.get("PLUGIN", "provider")
index ed09f365c95508318b29017f340382b65089fd45..69e78561a8d3f51608de2eaaaac44c157f53fed9 100644 (file)
@@ -23,7 +23,9 @@ plugin that concretely implement quantum_plugin_base class
 
 The caller should make sure that QuantumManager is a singleton.
 """
-
+import gettext
+gettext.install('quantum', unicode=1)
+    
 from common import utils
 from quantum_plugin_base import QuantumPluginBase
 
@@ -45,6 +47,9 @@ class QuantumManager(object):
    def get_manager(self):
        return self.plugin
 
+
+
+
 # TODO(somik): rmove the main class
 # Added for temporary testing purposes
 def main():
index 61c7694cdc15c0f95ee51ace54482faca5996972..e6dc080d45f3322baf6758b858c83f22ce8329b0 100644 (file)
@@ -1,3 +1,3 @@
 [PLUGIN]
 # Quantum plugin provider module
-provider = plugins.SamplePlugin.DummyDataPlugin
+provider = quantum.plugins.SamplePlugin.DummyDataPlugin
index c56631627818c382b3e931cd5aa46a8dc8227ab8..c14135d4701b31996bb7d3a6bdebf883b90cadc8 100644 (file)
@@ -35,7 +35,7 @@ import sys
 import time
 import types
 
-from quantum.common import exceptions as exception
+from common import exceptions as exception
 
 
 def import_class(import_str):