from sfa.util.geniclient import GeniClient
from sfa.util.sfaticket import SfaTicket
from sfa.util.record import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import RSpec
from sfa.util.xmlrpcprotocol import ServerException
import sfa.util.xmlrpcprotocol as xmlrpcprotocol
from sfa.util.rspec import RSpec
import sys
import pdb
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import *
from sfa.util.specdict import *
from sfa.util.faults import *
from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import RSpec
from sfa.server.registry import Registries
from sfa.util.config import Config
import sys
from types import StringTypes
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import *
from sfa.util.specdict import *
from sfa.util.faults import *
from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import RSpec
from sfa.server.registry import Registries
from sfa.plc.nodes import *
import os
import xmlrpclib
from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.sfaticket import SfaTicket
def init_server():
import sys
from types import StringTypes
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import *
from sfa.util.specdict import *
from sfa.util.faults import *
from sfa.trust.rights import *
from sfa.trust.credential import *
from sfa.trust.certificate import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.api import *
from sfa.util.nodemanager import NodeManager
from sfa.util.sfalogging import *
import sys
import traceback
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import *
from sfa.util.specdict import *
from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from types import StringTypes
def get_peer(api, hrn):
import logging
from sfa.util.record import *
from sfa.util.genitable import GeniTable
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.config import Config
from sfa.trust.certificate import convert_public_key, Keypair
from sfa.trust.trustedroot import *
from sfa.util.record import *
from sfa.util.genitable import GeniTable
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.config import Config
from sfa.util.report import trace, error
-
from sfa.trust.certificate import convert_public_key, Keypair
from sfa.trust.trustedroot import *
from sfa.trust.hierarchy import *
import sys
from types import StringTypes
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import *
from sfa.util.specdict import *
from sfa.util.faults import *
from sfa.util.rspec import RSpec
import sys
import pdb
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import *
from sfa.util.specdict import *
from sfa.util.faults import *
from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import RSpec
from sfa.server.registry import Registries
from sfa.util.config import Config
from sfa.util.faults import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.rspec import RSpec
from sfa.server.registry import Registries
from sfa.plc.nodes import *
import sys
import os
import traceback
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.genitable import GeniTable
from sfa.util.geniclient import GeniClient
from sfa.plc.api import GeniAPI
from optparse import OptionParser
from sfa.util.config import Config
import sfa.util.xmlrpcprotocol as xmlrpcprotocol
-import sfa.util.misc as misc
+from sfa.util.namepace import *
from sfa.trust.certificate import Keypair, Certificate
from sfa.trust.credential import Credential
from sfa.trust.gid import GID
from sfa.plc.api import ComponentAPI
api = ComponentAPI()
slicenames = api.nodemanager.GetXIDs().keys()
- hrns = [misc.slicename_to_hrn(interface_hrn, slicename) for slicename in slicenames]
+ hrns = [slicename_to_hrn(interface_hrn, slicename) for slicename in slicenames]
if verbose:
# if this isnt a slice record skip it
if not record['type'] == 'slice':
continue
- slicename = misc.hrn_to_pl_slicename(record['hrn'])
+ slicename = hrn_to_pl_slicename(record['hrn'])
# if this slice isnt really instatiated skip it
if not os.path.exists("/vservers/%(slicename)s" % locals()):
continue
from sfa.util.geniserver import *
from sfa.util.geniclient import *
-from sfa.util.faults import *
-from sfa.util.misc import *
class SliceMgr(GeniServer):
from sfa.util.faults import *
from sfa.trust.hierarchy import Hierarchy
from sfa.util.config import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.trust.gid import GID
from sfa.util.sfaticket import *
# to perform this encoding.
class Credential(Certificate):
- gidOriginCaller = None
gidCaller = None
gidObject = None
lifeTime = None
def __init__(self, create=False, subject=None, string=None, filename=None):
Certificate.__init__(self, create, subject, string, filename)
- ## set the GID of the original caller
- #
- # @param gid GID object of the original caller
- def set_gid_origin_caller(self, gid):
- self.gidOriginCaller = gid
-
- ##
- # get the GID of the object
-
- def get_gid_origin_caller(self):
- if not self.gidOriginCaller:
- self.decode()
- return self.gidOriginCaller
-
##
# set the GID of the caller
#
# done immediately before signing the credential.
def encode(self):
- dict = {"gidOriginCaller": None,
- "gidCaller": None,
+ dict = {"gidCaller": None,
"gidObject": None,
"lifeTime": self.lifeTime,
"privileges": None,
"delegate": self.delegate}
- if self.gidOriginCaller:
- dict["gidOriginCaller"] = self.gidOriginCaller.save_to_string(save_parents=True)
if self.gidCaller:
dict["gidCaller"] = self.gidCaller.save_to_string(save_parents=True)
if self.gidObject:
else:
self.privileges = None
- gidOriginCallerStr = dict.get("gidOriginCaller", None)
- if gidOriginCallerStr:
- self.gidOriginCaller = GID(string=gidOriginCallerStr)
- else:
- self.gidOriginCaller = None
-
gidCallerStr = dict.get("gidCaller", None)
if gidCallerStr:
self.gidCaller = GID(string=gidCallerStr)
print " privs:", self.get_privileges().save_to_string()
- print " gidOriginCaller:"
- gidOriginCaller = self.get_gid_origin_caller()
- if gidOriginCaller:
- gidOriginCaller.dump(8, dump_parents)
-
print " gidCaller:"
gidCaller = self.get_gid_caller()
if gidCaller:
from sfa.trust.certificate import Keypair
from sfa.trust.credential import *
from sfa.trust.gid import GID, create_uuid
-
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.config import Config
from sfa.util.sfaticket import SfaTicket
from sfa.util.debug import *
from sfa.trust.credential import *
from sfa.trust.certificate import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.sfalogging import *
# See "2.2 Characters" in the XML specification:
# create the data directory if it doesnt exist
if not os.path.isdir(self.SFA_DATA_DIR):
- os.mkdir(self.SFA_DATA_DIR)
+ try:
+ os.mkdir(self.SFA_DATA_DIR)
+ except: pass
except IOError, e:
raise IOError, "Could not find the configuration file: %s" % config_file
import sfa.util.report
from sfa.util.rspec import *
from sfa.util.parameter import *
-from sfa.util.misc import *
+from sfa.util.namespace import *
from sfa.util.row import Row
class GeniRecord(Row):