networks api with final URL structure.
No serialization yet
This commit is contained in:
parent
5022c07f6b
commit
55599d7184
@ -56,6 +56,7 @@ if __name__ == '__main__':
|
||||
|
||||
try:
|
||||
print "HERE-1"
|
||||
print sys.path
|
||||
service = service.serve_wsgi(service.QuantumApiService,
|
||||
options=options,
|
||||
args=args)
|
||||
|
@ -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")
|
||||
|
@ -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():
|
||||
|
@ -1,3 +1,3 @@
|
||||
[PLUGIN]
|
||||
# Quantum plugin provider module
|
||||
provider = plugins.SamplePlugin.DummyDataPlugin
|
||||
provider = quantum.plugins.SamplePlugin.DummyDataPlugin
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user