mxcubecore.HardwareObjects.mockup.ISPyBRestClientMockup#
A client for ISPyB Webservices.
Classes
|
RESTful Web-service client for EXI. |
- class mxcubecore.HardwareObjects.mockup.ISPyBRestClientMockup.ISPyBRestClientMockup(name)[source]#
Bases:
HardwareObject
RESTful Web-service client for EXI.
- authenticate(user, password)[source]#
Authenticate with RESTfull services, updates the authentication token, username and password used internally by this object.
- dc_link(did)[source]#
Get the LIMS link the data collection with id <id>.
- Parameters:
did (str) – Data collection ID
- Returns:
The link to the data collection
- get_bl_sample(bl_sample_id)[source]#
Fetch the BLSample entry with the id bl_sample_id
- Parameters:
bl_sample_id (int) –
- Returns:
A BLSampleWSValue, defined in the wsdl.
- Return type:
BLSampleWSValue
- get_dc(dc_id)[source]#
Get data collection with id <dc_id>
- Parameters:
dc_id (int) – The collection id
- Returns:
Data collection dict
- get_dc_list()[source]#
Get the list of data collections for the current session belonging to the current proposal. (Given by the session object)
- Returns:
A list of LIMS DataCollection Objects
- get_dc_thumbnail(image_id)[source]#
Get the image data for image with id <image_id>
- Parameters:
image_id (int) – The image id
- Returns:
tuple on the form (file name, base64 encoded data)
- get_proposals_by_user(user_name)[source]#
- Descript.gets all proposals for selected user
at first all proposals for user are obtained then for each proposal all sessions are obtained TODO: also user and laboratory should be obtained
- get_session_local_contact(session_id)[source]#
Retrieves the person entry associated with the session id <session_id> :param int session_id: session_id
- Returns:
Person dict
- Return type:
- get_session_samples(proposal_id, session_id, sample_refs)[source]#
Retrives the list of samples associated with the session <session_id>. The samples from ISPyB is cross checked with the ones that are currently in the sample changer.
The datamatrix code read by the sample changer is used in case of conflict.
- Parameters:
- Returns:
A list with sample_ref objects.
- Return type:
- store_data_collection(mx_collection, bl_config=None)[source]#
Stores the data collection mx_collection, and the beamline setup if provided.
- store_data_collection_group(mx_collection)[source]#
Stores or updates a DataCollectionGroup object. The entry is updated of the group_id in the mx_collection dictionary is set to an exisitng DataCollectionGroup id.
- store_image(image_dict)[source]#
Stores the image (image parameters) <image_dict>
- Parameters:
image_dict (dict) – A dictonary with image pramaters.
- Returns:
None