remove contributors
[parser.git] / docs / userguide / policy2tosca.rst
1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
4 #
5 #    http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
10 # implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 Execution
15 ===========================
16
17 Step 1: To see a list of commands available.
18
19 .. code-block:: bash
20
21     policy2tosca --help
22
23 Step 2: To see help for an individual command, include the command name on the command line
24
25 .. code-block:: bash
26
27     policy2tosca help <service>
28
29 Step 3: To inject/remove policy types/policy definitions provide the TOSCA file as input to policy2tosca command line.
30
31 .. code-block:: bash
32
33     policy2tosca <service> [arguments]
34
35 Example:
36
37 .. code-block:: bash
38
39     policy2tosca add-definition --policy_name rule2 --policy_type  tosca.policies.Placement.Geolocation --description "test description" --properties region:us-north-1,region:us-north-2,min_inst:2 --targets VNF2,VNF4 --metadata "map of strings" --triggers "1,2,3,4" --source example.yaml
40
41
42 Step 4: Verify the TOSCA YAMl updated with the injection/removal executed.
43
44 .. code-block:: bash
45
46     cat "<source tosca file>"
47
48 Example:
49
50 .. code-block:: bash
51
52     cat example_tosca.yaml