Shell
Managing the database of the vantage6 server can be done by an administrator through the shell.
Through the shell it is possible to manage all server entities. To start the shell, use vserver shell [options].

In the next sections the different database models that are available are explained. You can retrieve any record and edit any property of it. Don't forget to call .save() once you are done editing.
Organizations -->
db.OrganizationUsers -->
db.UserRoles and Rules -->
db.Roleanddb.RuleCollaborations -->
db.CollaborationNodes -->
db.NodeTasks -->
db.TaskResults -->
db.Result
Every db. object has a help() method which prints some info on what data is stored in it (e.g. db.Organization.help()).
Organizations
To store an organization you can use the db.Organization model:
Retrieving organizations from the database:
A lot of entities (e.g. users) at the server are connected to an organization. E.g. you can see which (computation) tasks are issued by the organization or see which collaborations it is participating in.
Roles and Rules
A user can have multiple roles and rules assigned to them. These are used to determine if the user has permission to view, edit, create or delete certain resources using the API. A role is a collection of rules.
Users
Users belong to an organization. So if you have not created an organization as of yet, then you should do this first. To create a user you can use the db.User model:
You can retrieve users in the following ways:
To modify a user, simply adjust the properties and save the object.
Collaborations
A collaboration consists of one or more organizations. To create a collaboration you need at least one organization in your database. To create a collaboration you can use the db.Collaboration model:
Tasks, nodes and organizations are directly related to collaborations. We can obtain these by:
Setting the encryption to False at the server does not mean that the nodes will send encrypted results. This is only the case if the nodes also agree on this setting.
Nodes
Before nodes can login, they need to exist in the server's database. A new node can be created as follows:
API keys are hashed before stored in the database. Therefore you need to save the API key immediately. If you lose it, you can reset the API key later via the shell or via the API.
Tasks and Results
Tasks(/results) created from the shell are not picked up by nodes that are already running. The signal to notify them of a new task cannot be emitted this way.
A task is intended for one or more organizations. For each organization the task is intended for, a corresponding (initially empty) result should be created. Each task can have multiple results, for example a result from each organization.
Tasks can have a child/parent relationship. Note that the run_id is for parent and child tasks the same.
Tasks that share a run_id have access to the same temporary folder at the node. This allows for multi-stage algorithms.
Obtaining results:
Last updated
Was this helpful?