Ejemplo n.º 1
0
 def get_plugin_representation_from_store(name,
                                          store_url,
                                          version=None,
                                          username=None,
                                          password=None,
                                          timeout=30):
     """
     Get a plugin app representation from the ChRIS store.
     """
     store_client = StoreClient(store_url, username, password, timeout)
     plg = store_client.get_plugin(name, version)
     parameters = []
     offset = 0
     limit = 50
     while True:
         result = store_client.get_plugin_parameters(
             plg['id'], {
                 'limit': limit,
                 'offset': offset
             })
         parameters.extend(result['data'])
         offset += limit
         if not result['hasNextPage']: break
     plg['parameters'] = parameters
     return plg
 def get_plugin_representation_from_store(name, store_url, username=None,
                                          password=None, timeout=30):
     """
     Get a plugin app representation from the ChRIS store.
     """
     store_client = StoreClient(store_url, username, password, timeout)
     return store_client.get_plugin(name)
Ejemplo n.º 3
0
 def get_plugin_representation_from_store(name, store_url, username=None,
                                          password=None, timeout=30):
     """
     Get a plugin app representation from the ChRIS store.
     """
     store_client = StoreClient(store_url, username, password, timeout)
     return store_client.get_plugin(name)
Ejemplo n.º 4
0
 def get_plugin_representation_from_store(name, version=None, timeout=30):
     """
     Get a plugin app representation from the ChRIS store.
     """
     store_url = settings.CHRIS_STORE_URL
     store_client = StoreClient(store_url, None, None, timeout)
     plg = store_client.get_plugin(name, version)
     plg['parameters'] = PluginManager.get_plugin_parameters_from_store(
         plg['id'], timeout)
     return plg
Ejemplo n.º 5
0
 def get_plugin_representation_from_store(name, store_url, version=None, username=None,
                                          password=None, timeout=30):
     """
     Get a plugin app representation from the ChRIS store.
     """
     store_client = StoreClient(store_url, username, password, timeout)
     plg = store_client.get_plugin(name, version)
     parameters = []
     offset = 0
     limit = 50
     while True:
         result = store_client.get_plugin_parameters(plg['id'], {'limit': limit,
                                                                 'offset': offset})
         parameters.extend(result['data'])
         offset += limit
         if not result['hasNextPage']: break
     plg['parameters'] = parameters
     return plg