Documentation Repositories¶
-
class
motey.repositories.base_repository.
BaseRepository
[source]¶ Base repository to wrapp database handling.
-
class
motey.repositories.capability_repository.
CapabilityRepository
[source]¶ Repository for all capability specific actions.
-
add
(capability, capability_type)[source]¶ Add a new capability to the database.
Parameters: - capability – the capability to be added.
- capability_type – the capability type of the capability.
-
has
(capability)[source]¶ Checks if the given
capability
exist in the database.Parameters: capability – the capability to search for. Returns: True if the lable exists, otherwise False
-
-
class
motey.repositories.nodes_repository.
NodesRepository
[source]¶ Repository for all node specific actions.
-
add
(ip)[source]¶ Add a new node to the database if they not exist yet.
Parameters: ip – the ip of the new node.
-
-
class
motey.repositories.service_repository.
ServiceRepository
[source]¶ Repository for all service specific actions.
-
add
(service)[source]¶ Add a new service to the database if they not exist yet.
Parameters: service (dict) – a service model to be stored
-
has
(service_id)[source]¶ Checks if the given
id
exist in the database.Parameters: service_id – the id of the service to search for. Returns: True if the service exists, otherwise False
-