Module libnova.common.api.AccessMethod
Expand source code
#!/usr/bin/env python
# coding: utf-8
from libnova.common import api
def get(access_method):
"""Retrieve data to use a given `access_method`
Args:
access_method (str): A platform data access method (s3, ftp, xrootd)
Returns:
dict: A `dict` with the data needed to access your platform data using the given `access_method`
"""
api_driver = api.Driver.get_instance()
return api_driver.get_single(
api_driver.get(
url_segment='user/internal/access_methods/' + access_method
)
)
if __name__ == "__main__":
print('This file cannot be executed directly!')
Functions
def get(access_method)
-
Retrieve data to use a given
access_method
Args
access_method
:str
- A platform data access method (s3, ftp, xrootd)
Returns
dict
- A
dict
with the data needed to access your platform data using the givenaccess_method
Expand source code
def get(access_method): """Retrieve data to use a given `access_method` Args: access_method (str): A platform data access method (s3, ftp, xrootd) Returns: dict: A `dict` with the data needed to access your platform data using the given `access_method` """ api_driver = api.Driver.get_instance() return api_driver.get_single( api_driver.get( url_segment='user/internal/access_methods/' + access_method ) )