X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FSliverStatus.py;h=24d6ff2ab1bdc37be6d1dd4b35174414646cccb0;hb=6b0890481fe49ef7368ed8a8991a42fbba0248da;hp=6b9009648b8fcec5406a5178dc0203851c30d544;hpb=d2723560cdb75ef57cb3bda3c86e674bcd260731;p=sfa.git diff --git a/sfa/methods/SliverStatus.py b/sfa/methods/SliverStatus.py index 6b900964..24d6ff2a 100644 --- a/sfa/methods/SliverStatus.py +++ b/sfa/methods/SliverStatus.py @@ -2,7 +2,6 @@ from sfa.util.faults import * from sfa.util.namespace import * from sfa.util.method import Method from sfa.util.parameter import Parameter -from sfa.server.aggregate import Aggregates class SliverStatus(Method): """ @@ -20,10 +19,7 @@ class SliverStatus(Method): def call(self, slice_xrn, creds): hrn, type = urn_to_hrn(slice_xrn) - # Make sure that this is a geni_aggregate talking to us - geni_aggs = Aggregates(self.api, '/etc/sfa/geni_aggregates.xml') - if not hrn in [agg['hrn'] for agg in geni_aggs]: - raise SfaPermissionDenied("Only GENI Aggregates may make this call") + ValidCreds = self.api.auth.checkCredentials(creds, 'sliverstatus', hrn) self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name)) @@ -33,7 +29,7 @@ class SliverStatus(Method): mgr_type = self.api.config.SFA_GENI_AGGREGATE_TYPE manager_module = manager_base + ".geni_am_%s" % mgr_type manager = __import__(manager_module, fromlist=[manager_base]) - return manager.SliverStatus(self.api, slice_xrn) + return manager.SliverStatus(self.api, slice_xrn, ValidCreds) return ''