- Timestamp:
- Aug 25, 2010 1:14:50 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 208797c
- Parents:
- 4875e93
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/protogeni_access.py
r4875e93 r88dbe63 100 100 return "%s XML blob" % method 101 101 102 def clearinghouse_call(self, method, params, context): 103 return self.pg_call(self.ch_url, method, params, context) 104 105 def slice_authority_call(self, method, params, context): 106 return self.pg_call(self.sa_url, method, params, context) 107 108 def component_manager_call(self, method, params, context): 109 return self.pg_call(self.cm_url, method, params, context) 110 111 112 102 113 103 114 … … 878 889 879 890 try: 880 gcred = segment_commands. pg_call(self.sa_url,881 'GetCredential',{}, ctxt)882 except se lf.ProtoGENIError, e:891 gcred = segment_commands.slice_authority_call('GetCredential', 892 {}, ctxt) 893 except segment_commands.ProtoGENIError, e: 883 894 raise service_error(service_error.federant, 884 895 "ProtoGENI: %s" % e) … … 909 920 'type': 'Slice' 910 921 } 911 segment_commands. pg_call(self.sa_url,'Resolve', param, ctxt)922 segment_commands.slice_authority_call('Resolve', param, ctxt) 912 923 except segment_commands.ProtoGENIError, e: 913 924 print e … … 929 940 'type': 'Slice' 930 941 } 931 slice_cred = segment_commands. pg_call(self.sa_url,'Register',942 slice_cred = segment_commands.slice_authority_call('Register', 932 943 param, ctxt) 933 944 # Resolve the slice to get the URN that PG has assigned it. … … 937 948 'hrn': slicename 938 949 } 939 data = segment_commands. pg_call(self.sa_url,'Resolve', param,950 data = segment_commands.slice_authority_call('Resolve', param, 940 951 ctxt) 941 952 if 'urn' in data: … … 954 965 'credential': gcred, 955 966 } 956 keys = segment_commands. pg_call(self.sa_url,'GetKeys', param,967 keys = segment_commands.slice_authority_call('GetKeys', param, 957 968 ctxt) 958 969 # Create a Sliver … … 967 978 'slice_urn': slice_urn, 968 979 } 969 sliver_cred, manifest = segment_commands. pg_call(self.cm_url,980 sliver_cred, manifest = segment_commands.component_manager_call( 970 981 'CreateSliver', param, ctxt) 971 982 except segment_commands.ProtoGENIError, e: … … 991 1002 'slice_urn': slice_urn, 992 1003 } 993 r = segment_commands. pg_call(self.cm_url,1004 r = segment_commands.component_manager_call( 994 1005 'SliverStatus', param, ctxt) 995 1006 status = r.get('status', 'changing') … … 1014 1025 'slice_urn': slice_urn, 1015 1026 } 1016 segment_commands. pg_call(self.cm_url,'DeleteSlice',1027 segment_commands.component_manager_call('DeleteSlice', 1017 1028 param, ctxt) 1018 1029 except segment_commands.ProtoGENIError, e: … … 1428 1439 expiration = time.strftime("%Y%m%dT%H:%M:%S", 1429 1440 time.gmtime(time.time() + interval)) 1430 cred = segment_commands. pg_call(self.sa_url,'GetCredential',1441 cred = segment_commands.slice_authority_call('GetCredential', 1431 1442 {}, ctxt) 1432 1443 … … 1435 1446 'expiration': expiration 1436 1447 } 1437 r = segment_commands. pg_call(self.sa_url,'RenewSlice', param, ctxt)1448 r = segment_commands.slice_authority_call('RenewSlice', param, ctxt) 1438 1449 param = { 1439 1450 'credential': cred, … … 1441 1452 'type': 'Slice', 1442 1453 } 1443 slice = segment_commands. pg_call(self.sa_url,'Resolve',1454 slice = segment_commands.slice_authority_call('Resolve', 1444 1455 param, ctxt) 1445 1456 uuid = slice.get('uuid', None) … … 1453 1464 'type': 'Slice', 1454 1465 } 1455 new_scred = segment_commands. pg_call(self.sa_url,'GetCredential',1466 new_scred = segment_commands.slice_authority_call('GetCredential', 1456 1467 param, ctxt) 1457 1468 … … 1465 1476 'slice_urn': slice_urn, 1466 1477 } 1467 r = segment_commands.pg_call(self.cm_url, 'RenewSlice', param, ctxt) 1478 r = segment_commands.component_manager_call('RenewSlice', param, 1479 ctxt) 1468 1480 except segment_commands.ProtoGENIError, e: 1469 1481 self.log.warn("Failed to renew sliver for %s: %s" % (name, e))
Note: See TracChangeset
for help on using the changeset viewer.