blob: c3e9317df6051529c519718a1c26919d2a06b1ff [file] [log] [blame]
Kiran Kamineniac134cb2018-05-04 16:50:39 -07001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright 2018 Intel Corporation, Inc
4
Kiran Kamineni78d594b2018-05-22 17:38:16 -07005Usage Scenario
Kiran Kaminenid977f322018-05-23 11:05:08 -07006--------------
Kiran Kamineni78d594b2018-05-22 17:38:16 -07007
8**Create a Domain**
9
10This is the root where you will store your secrets.
Kiran Kamineniac134cb2018-05-04 16:50:39 -070011
12.. code-block:: guess
13
Kiran Kamineni78d594b2018-05-22 17:38:16 -070014 curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key
Kiran Kamineniac134cb2018-05-04 16:50:39 -070015 -X POST \
16 -d '{
17 "name": "mysecretdomain"
18 }'
Kiran Kamineni78d594b2018-05-22 17:38:16 -070019 https://aaf-sms.onap:10443/v1/sms/domain
Kiran Kamineniac134cb2018-05-04 16:50:39 -070020
Kiran Kamineni78d594b2018-05-22 17:38:16 -070021.. end
22
23---------------
24
25**Add a new Secret**
26
27Store a new secret in your created Domain.
28Secrets have a name and a map containing key value pairs.
29
30.. code-block:: guess
31
32 curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key
Kiran Kamineniac134cb2018-05-04 16:50:39 -070033 -X POST \
34 -d '{
35 "name": "mysecret",
36 "values": {
37 "name": "rah",
38 "age": 35,
39 "password": "mypassword"
40 }
41 }'
Kiran Kamineni78d594b2018-05-22 17:38:16 -070042 https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret
Kiran Kamineniac134cb2018-05-04 16:50:39 -070043
Kiran Kamineni78d594b2018-05-22 17:38:16 -070044.. end
Kiran Kamineniac134cb2018-05-04 16:50:39 -070045
Kiran Kamineni78d594b2018-05-22 17:38:16 -070046---------------
47
48**List all Secret Names in a Domain**
49
50.. code-block:: guess
51
Kiran Kamineniac134cb2018-05-04 16:50:39 -070052 curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key
53 -X GET \
Kiran Kamineni78d594b2018-05-22 17:38:16 -070054 https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret
Kiran Kamineniac134cb2018-05-04 16:50:39 -070055
Kiran Kamineni78d594b2018-05-22 17:38:16 -070056.. end
57
58---------------
59
60**Get a previously stored Secret from Domain**
61
62.. code-block:: guess
63
Kiran Kamineniac134cb2018-05-04 16:50:39 -070064 curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key
65 -X GET \
Kiran Kamineni78d594b2018-05-22 17:38:16 -070066 https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret/<PREVIOUSLY CREATED SECRET NAME>
Kiran Kamineniac134cb2018-05-04 16:50:39 -070067
Kiran Kamineni78d594b2018-05-22 17:38:16 -070068.. end
69
70---------------
71
72**Delete a Secret in specified Domain**
73
74.. code-block:: guess
75
Kiran Kamineniac134cb2018-05-04 16:50:39 -070076 curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key
77 -X DELETE \
Kiran Kamineni78d594b2018-05-22 17:38:16 -070078 https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>/secret/<PREVIOUSLY CREATED SECRET NAME>
Kiran Kamineniac134cb2018-05-04 16:50:39 -070079
Kiran Kamineni78d594b2018-05-22 17:38:16 -070080.. end
81
82---------------
83
84**Delete a Domain**
85
86.. code-block:: guess
87
Kiran Kamineniac134cb2018-05-04 16:50:39 -070088 curl -H "Accept: application/json" --cacert ca.pem --cert client.cert --key client.key
89 -X DELETE \
Kiran Kamineni78d594b2018-05-22 17:38:16 -070090 https://aaf-sms.onap:10443/v1/sms/domain/<PREVIOUSLY CREATED DOMAIN NAME>
Kiran Kamineniac134cb2018-05-04 16:50:39 -070091.. end