########## registry oriented
########################################
- # redefine this if you want to check again records
- # when running GetCredential
- # This is to reflect the 'enabled' user field in planetlab testbeds
- # expected retcod boolean
- def is_enabled (self, record) :
- return True
+ # NOTE: the is_enabled method is deprecated
+ # it was only making things confusing, as the (PL) import mechanism would
+ # ignore not enabled users anyway..
# the following is used in Resolve (registry) when run in full mode
# after looking up the sfa db, we wish to be able to display
record=dbsession.query(RegRecord).filter_by(type=type,hrn=hrn).first()
if not record:
raise RecordNotFound("hrn=%s, type=%s"%(hrn,type))
-
- # verify_cancreate_credential requires that the member lists
- # (researchers, pis, etc) be filled in
- logger.debug("get credential before augment dict, keys=%s"%record.__dict__.keys())
- self.driver.augment_records_with_testbed_info (record.__dict__)
- logger.debug("get credential after augment dict, keys=%s"%record.__dict__.keys())
- if not self.driver.is_enabled (record.__dict__):
- raise AccountNotEnabled(": PlanetLab account %s is not enabled. Please contact your site PI" %(record.email))
+
+ # xxx for the record only
+ # used to call this, which was wrong, now all needed data is natively is our DB
+ # self.driver.augment_records_with_testbed_info (record.__dict__)
+ # likewise, we deprecate is_enabled which was not really useful
+ # if not self.driver.is_enabled (record.__dict__): ...
+ # xxx for the record only
# get the callers gid
# if caller_xrn is not specified assume the caller is the record
########## registry oriented
########################################
- ########## disabled users
- def is_enabled (self, record):
- # the incoming record was augmented already, so 'enabled' should be set
- if record['type'] == 'user':
- return record['enabled']
- # only users can be disabled
- return True
-
def augment_records_with_testbed_info (self, sfa_records):
return self.fill_record_info (sfa_records)