Skip to content

Commit 12f6255

Browse files
shalemanshaleman
authored and
shaleman
committed
Update contivctl.md
Review comments
1 parent b2367a9 commit 12f6255

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

docs/contivctl.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
contivctl command line tool lets you add/modify/delete objects into contiv object model using REST api.
44

5-
Command can be found under $GOPATH/bin directory (/opt/gopath/bin in vagrant VMs) after a build.
6-
Currently, contivctl needs to be run on the same host where netmaster is running
5+
*Note:*
6+
`contivctl` Command can be found under `$GOPATH/bin` directory (`/opt/gopath/bin` in vagrant VMs) after a build.
7+
Currently, `contivctl` needs to be run on the same host where `netmaster` is running
78

89
## Usage
910

@@ -23,7 +24,7 @@ optional arguments:
2324
--version show program's version number and exit
2425
```
2526

26-
### Creating networks
27+
### Networks
2728

2829
```
2930
vagrant@netplugin-node1:~$ contivctl network create --help
@@ -46,15 +47,15 @@ optional arguments:
4647

4748
#### Examples
4849

49-
Following creates a vxlan network called production under default tenant and assigns a subnet to it
50+
Following creates a vxlan network called `production` under `default` tenant and assigns a subnet to it
5051

5152
```
5253
vagrant@netplugin-node1:~$ contivctl network create production -encap=vxlan -subnet=20.20.20.0/24 -defaultGw=20.20.20.254
5354
Creating network default:production
5455
Network Create response is: {"key":"default:production","defaultGw":"20.20.20.254","encap":"vxlan","isPrivate":true,"networkName":"production","subnet":"20.20.20.0/24","tenantName":"default","link-sets":{},"links":{"Tenant":{"type":"tenant","key":"default"}}}
5556
```
5657

57-
Following lists all networks under default tenant
58+
Following lists all networks under `default` tenant
5859

5960
```
6061
vagrant@netplugin-node1:~$ contivctl network list
@@ -65,14 +66,14 @@ public Yes vlan 192.168.1.0/24 192.168.1.254
6566
production No vxlan 20.20.20.0/24 20.20.20.254
6667
```
6768

68-
Following deletes a network from default tenant
69+
Following deletes a network from `default` tenant
6970

7071
```
7172
vagrant@netplugin-node1:~$ contivctl network delete production
7273
Deleting network default:production
7374
```
7475

75-
### Creating a policy
76+
### Policies
7677

7778
#### Usage
7879

@@ -91,14 +92,14 @@ optional arguments:
9192

9293
#### Example
9394

94-
Following creates a policy names 'webTier'
95+
Following creates a policy named `webTier`
9596
```
9697
vagrant@netplugin-node1:~$ contivctl policy create webTier
9798
Creating policy default:webTier
9899
Create policy response is: {"key":"default:webTier","policyName":"webTier","tenantName":"default","link-sets":{},"links":{"Tenant":{}}}
99100
```
100101

101-
Following lists all policies under default tenant
102+
Following lists all policies under `default` tenant
102103

103104
```
104105
vagrant@netplugin-node1:~$ contivctl policy list
@@ -109,7 +110,7 @@ default first
109110
default webTier
110111
```
111112

112-
### Adding rules to a policy
113+
### Rules
113114

114115
#### Usage
115116
```
@@ -142,7 +143,7 @@ optional arguments:
142143
Accept or deny
143144
```
144145

145-
All rules have a rule Id which uniquely identifies the rule under a policy. Rule Id is a string that can be anything user chooses. Rule id does not specify the order in which rules are applied. User has to specify the priority for the rule. Higher the priority, higher preference a rule gets. In following example, we add a default deny rule which uses default priority 1 and a allow web traffic rule which is at higher priority 10.
146+
All rules have a rule Id which uniquely identifies the rule under a policy. Rule Id is a string that can be anything user chooses. Rule id does not specify the order in which rules are applied. User has to specify the priority for the rule. Higher the priority, higher preference a rule gets. In following example, we add a default deny rule which uses default priority 1 and a allow web traffic rule which is at higher priority 10.
146147

147148
#### Examples
148149

@@ -164,7 +165,7 @@ rule create, sending: {"direction": "in", "protocol": "tcp", "ruleId": "2", "por
164165
Rule add response is: {"key":"default:webTier:2","action":"accept","direction":"in","policyName":"webTier","port":80,"priority":10,"protocol":"tcp","ruleId":"2","tenantName":"default","link-sets":{"Policies":{"default:webTier":{"type":"policy","key":"default:webTier"}}}}
165166
```
166167

167-
Following lists all the rules under 'webTier' policy
168+
Following lists all the rules under `webTier` policy
168169

169170
```
170171
vagrant@netplugin-node1:~$ contivctl rule list webTier
@@ -175,14 +176,14 @@ Rule, direction, priority, endpointGroup, network, ipAddress, protocol, port, ac
175176
2, in, 10, --, --, --, tcp, 80, accept
176177
```
177178

178-
Following deletes a rule from webTier policy
179+
Following deletes a rule from `webTier` policy
179180

180181
```
181182
vagrant@netplugin-node1:~$ contivctl rule delete webTier 2
182183
Deleting rule default:webTier:2
183184
```
184185

185-
### Creating EPGs
186+
### Endpoint Groups
186187

187188
```
188189
vagrant@netplugin-node1:~$ contivctl group create --help

0 commit comments

Comments
 (0)