aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorAsteroide <thomas.duval@orange.com>2018-03-08 14:25:17 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-08 14:25:17 +0000
commit0f97a918f583edfe1c2e92ce4abadd7aef3b1c4f (patch)
treec1f13b9fdca36be3f371442bb5bb11f875239a6f /README.md
parent9a2e6721376547244e53dbb92ea596f526a9c865 (diff)
parent7343cf25ad890e18b2f5b8d35c6acfc821dfd5ec (diff)
Merge "Add import and export pdps"
Diffstat (limited to 'README.md')
-rw-r--r--README.md11
1 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0bf6e8f2..51e5077f 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,15 @@ moon slave delete <name_of_the_slave>
```
If you don't put a name here, by default, the script will use `kubernetes-admin@kubernetes`.
+### inport/export of the moon database
+Using the moon python client, it is possible to export and import the content of the moon database. The format of the file must be json. Examples of files that can be imported are found in the moon_manager package (rbac.json and mls.json)
+
+The relations between different elements of the json in made using their names. Therefore, the name acts, for now, as a unique identifier in the json files. Importing several times the same json file can lead to unexpected behavior. It is advised to import json file in an empty database.
+
+Two particular entries in the json description are used to specify the way of performing the import:
+ - "mandatory": it can be true or false. This field is only valid for policies description. The policy having this field set to true, will be automatically added to the other elements of the json file that have an empty "policy" field (subject data for instance) or that have a "policies" field which does not already contain the mandatory policy name (such as subjects).
+ - "override" : it can be true or false. This field is only valid for policies and models. If set to true and a policy/model with an identical name already exists in the database, it will be overwritten.
+
## Tests
- [Python Unit Test](tests/python_unit/README.md)
@@ -106,4 +115,4 @@ curl -i \
curl --header "X-Auth-Token: <token_retrieve_from_keystone>" http://moon_hostname:30001
curl --header "X-Auth-Token: <token_retrieve_from_keystone>" http://moon_hostname:30001/pdp
curl --header "X-Auth-Token: <token_retrieve_from_keystone>" http://moon_hostname:30001/policies
-``` \ No newline at end of file
+```