X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Freservation.py;h=a81cd04f9f8d2c4ae3037f1866011bc7f61587e3;hb=cbc6d01d813b85b78bc5268b469b46fc74e33cef;hp=70c6ddf340294cf78bc62b3d18d25055fa970234;hpb=0b0cd940aa2227074a877c480ba15542c82b9d59;p=nodemanager.git diff --git a/plugins/reservation.py b/plugins/reservation.py index 70c6ddf..a81cd04 100644 --- a/plugins/reservation.py +++ b/plugins/reservation.py @@ -11,7 +11,7 @@ import time import threading import logger -import accounts +import account import database # there is an implicit assumption that this triggers after slicemanager @@ -227,15 +227,15 @@ class reservation: def is_running (self, slicename): try: - return accounts.get(slicename).is_running() + return account.get(slicename).is_running() except: return False - # quick an d dirty - this does not obey the accounts/sliver_vs/controller hierarchy + # quick an d dirty - this does not obey the account/sliver_vs/controller hierarchy def suspend_slice(self, slicename): logger.log('reservation: Suspending slice %s'%(slicename)) self.debug_box('before suspending',slicename) - worker=accounts.get(slicename) + worker=account.get(slicename) try: logger.log("reservation: Located worker object %r"%worker) worker.stop() @@ -243,7 +243,7 @@ class reservation: # when the underlying worker is not entirely initialized yet pass except: - logger.log_exc("reservation.suspend_slice: Could not stop slice %s through its worker"%slicename) + logger.log_exc("reservation.suspend_slice: Could not stop slice through its worker",name=slicename) # we hope the status line won't return anything self.debug_box('after suspending',slicename) @@ -264,7 +264,7 @@ class reservation: def restart_slice(self, slicename): logger.log('reservation: Restarting slice %s'%(slicename)) self.debug_box('before restarting',slicename) - worker=accounts.get(slicename) + worker=account.get(slicename) try: # dig in self.data to retrieve corresponding rec slivers = [ sliver for sliver in self.data['slivers'] if sliver['name']==slicename ] @@ -276,6 +276,6 @@ class reservation: logger.log("reservation: Located record at the db %r"%record) worker.start(record) except: - logger.log_exc("reservation.restart_slice: Could not start slice %s through its worker"%slicename) + logger.log_exc("reservation.restart_slice: Could not start slice through its worker",name=slicename) # we hope the status line won't return anything self.debug_box('after restarting',slicename)