CLI Command Overview - containernet/vim-emu GitHub Wiki
This page summarized available CLI (vim-emu) commands.
vim-emu datacenter
positional arguments:
{list,status} Action to be executed.
optional arguments:
-h, --help show this help message and exit
--datacenter DATACENTER, -d DATACENTER
Data center to which the command should be applied.
--endpoint ENDPOINT, -e ENDPOINT
REST API endpoint of vim-emu
(default:http://127.0.0.1:5001)
Command/Example
Description
vim-emu datacenter list
List all data centers of running topology
vim-emu datacenter status -d <dc-label>
Get status data of DC
vim-emu compute
positional arguments:
{start,stop,list,status,xterm}
Action to be executed.
vnf_names vnf names to open an xterm for
optional arguments:
-h, --help show this help message and exit
--datacenter DATACENTER, -d DATACENTER
Data center to which the command should be applied.
--name NAME, -n NAME Name of compute instance e.g. 'vnf1'.
--image IMAGE, -i IMAGE
Name of container image to be used e.g. 'ubuntu:trusty'
--dcmd DOCKER_COMMAND, -c DOCKER_COMMAND
Startup command of the container e.g. './start.sh'
--net NETWORK Network properties of a compute instance
e.g. '(id=input,ip=10.0.10.3/24),(id=output,ip=10.0.10.4/24)'
for multiple interfaces.
--endpoint ENDPOINT, -e ENDPOINT
REST API endpoint of vim-emu (default:http://127.0.0.1:5001)
Command/Example
Description
vim-emu compute start -d DC1 -n vnf1
Start a container vnf1 in DC1, returns the status info of the container
start an xterm window that attaches to the CLI of the vnf docker container (does not work yet when accessing vim-emu running in an isolated VM)
vim-emu network
positional arguments:
{add,remove} Action to be executed.
optional arguments:
-h, --help show this help message and exit
--datacenter DATACENTER, -d DATACENTER
Data center to in which the network action should be
initiated
--source SOURCE, -src SOURCE
vnf name of the source of the chain
--destination DESTINATION, -dst DESTINATION
vnf name of the destination of the chain
--weight WEIGHT, -w WEIGHT
weight edge attribute to calculate the path
--priority PRIORITY, -p PRIORITY
priority of flow rule
--match MATCH, -m MATCH
string holding extra matches for the flow entries
--bidirectional, -b add/remove the flow entries from src to dst and back
--cookie COOKIE, -c COOKIE
cookie for this flow, as easy to use identifier (eg.
per tenant/service)
--endpoint ENDPOINT, -e ENDPOINT
REST API endpoint of vim-emu
(default:http://127.0.0.1:5001)
Setup a directional path from vnf1, interface 1 to vnf2, interface 2. This calculates the shortest path and sets the OpenFlow entries in the datacenters' switches accordingly.
Setup a bidirectional path from vnf1, interface 1 to vnf2, interface 2 (this sets the openflow entries in the datacenters' switches accordingly).
vim-emu monitor (deprecated)
positional arguments:
{setup_metric,stop_metric,setup_flow,stop_flow,prometheus}
setup/stop a metric/flow to be monitored or query
Prometheus
optional arguments:
-h, --help show this help message and exit
--vnf_name VNF_NAME, -vnf VNF_NAME
vnf name:interface to be monitored
--metric METRIC, -m METRIC
tx_bytes, rx_bytes, tx_packets, rx_packets
--cookie COOKIE, -c COOKIE
flow cookie to monitor
--query QUERY, -q QUERY
prometheus query
--datacenter DATACENTER, -d DATACENTER
Data center where the vnf is deployed
--endpoint ENDPOINT, -e ENDPOINT
REST API endpoint of vim-emu
(default:http://127.0.0.1:5001)
Initializes vim-emu to export port statistics of vnf 'vnf1', interface 'intf1' to a Prometheus push gateway. Possible metrics: tx_bytes, rx_bytes, rx_packets, tx_packets
Export to a Prometheus pushgateway the transmitted packets count of the flow with cookie = 10. The monitored flow inputs to the port where the interface 'input' of 'vnf1' is connected to
Stop exporting the transmitted packets count of the flow with cookie = 10. The monitored flow inputs to the port where the interface 'input' of 'vnf1' is connected to