Changeset 4875e93 for fedd/federation
- Timestamp:
- Aug 24, 2010 2:01:19 AM (14 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
- Children:
- 88dbe63
- Parents:
- d49c11c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/federation/protogeni_access.py
rd49c11c r4875e93 944 944 raise service_error(service_error.federant, 945 945 "No URN returned for slice %s" % hrn) 946 947 if 'creator_urn' in data: 948 creator_urn = data['creator_urn'] 949 else: 950 raise service_error(service_error.federant, 951 "No creator URN returned for slice %s" % hrn) 946 952 # Populate the ssh keys (let PG format them) 947 953 param = { … … 954 960 'credentials': [ slice_cred ], 955 961 'rspec': rspec, 956 'keys': keys, 962 'users': [ { 963 'urn': creator_urn, 964 'keys': keys, 965 }, 966 ], 957 967 'slice_urn': slice_urn, 958 968 } … … 963 973 "ProtoGENI: %s %s" % (e.code, e)) 964 974 965 return (slice_urn, slice_cred, sliver_cred,manifest)966 967 def wait_for_slice(self, segment_commands, sli ver_cred, slice_urn, ctxt,975 return (slice_urn, slice_cred, manifest) 976 977 def wait_for_slice(self, segment_commands, slice_cred, slice_urn, ctxt, 968 978 timeout=None): 969 979 """ … … 978 988 while status not in completed_states: 979 989 param = { 980 'credentials': [ sli ver_cred ],990 'credentials': [ slice_cred ], 981 991 'slice_urn': slice_urn, 982 992 } … … 1034 1044 slicename = self.get_free_slicename(segment_commands, user, gcred, ctxt) 1035 1045 self.log.info("Creating %s" % slicename) 1036 slice_urn, slice_cred, sliver_cred,manifest = self.allocate_slice(1046 slice_urn, slice_cred, manifest = self.allocate_slice( 1037 1047 segment_commands, slicename, rspec, gcred, ctxt) 1038 1048 … … 1059 1069 1060 1070 # Now we wait for the nodes to start on PG 1061 status = self.wait_for_slice(segment_commands, sli ver_cred, slice_urn,1071 status = self.wait_for_slice(segment_commands, slice_cred, slice_urn, 1062 1072 ctxt, timeout=300) 1063 1073 if status == 'failed': … … 1075 1085 self.allocation[aid]['slice_name'] = slicename 1076 1086 self.allocation[aid]['slice_credential'] = slice_cred 1077 self.allocation[aid]['sliver_credential'] = sliver_cred1078 1087 self.allocation[aid]['manifest'] = manifest 1079 1088 self.allocation[aid]['certfile'] = certfile … … 1393 1402 cf, user, ssh_key, cpw = (None, None, None, None) 1394 1403 slice_cred = None 1404 slice_urn = None 1395 1405 ename = None 1396 1406 self.state_lock.release() … … 1500 1510 if self.allocation.has_key(aid): 1501 1511 self.allocation[aid]['slice_credential'] = new_scred 1512 self.write_state() 1502 1513 self.state_lock.release() 1503 1514 else:
Note: See TracChangeset
for help on using the changeset viewer.