|
|
(17 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| = osmclient =
| | {{MARKDOWN}} |
|
| |
|
| The osmclient was introduced with OSM Release Two to provide a python-based API and CLI to OSM.
| | **THIS PAGE IS DEPRECATED**. OSM User Guide has been moved to a new location: **<https://osm.etsi.org/docs/user-guide/>** |
| | |
| sudo apt install python-pip libcurl4-gnutls-dev libgnutls-dev
| |
| sudo pip install python-magic
| |
| sudo pip install git+https://osm.etsi.org/gerrit/osm/osmclient
| |
|
| |
| Once installed, type “osm” to see a list of commands. At minimum, you will need to specify the OSM host, either via an environment variable or via the osm command line (see “osm –help” for info).
| |
|
| |
| The client gives you a number of APIs to upload, onboard, instantiate, terminate, including a recent addition to scale the network service. Feel free to use this to learn the REST api, or even better feel free to extend and improve it to make it more feature rich.
| |
|
| |
| Via the CLI, you can do the following:
| |
|
| |
| config-agent-add
| |
| config-agent-delete
| |
| config-agent-list
| |
| ns-create
| |
| ns-delete
| |
| ns-list
| |
| ns-monitoring-show
| |
| ns-scale
| |
| ns-scaling-show
| |
| ns-show
| |
| nsd-delete
| |
| nsd-list
| |
| ro-dump
| |
| upload-package
| |
| vcs-list
| |
| vim-create
| |
| vim-delete
| |
| vim-list
| |
| vim-show
| |
| vnf-list
| |
| vnf-monitoring-show
| |
| vnf-show
| |
| vnfd-delete
| |
| vnfd-list
| |
| | |
| ==Enable autocompletion==
| |
| | |
| You can enable autocompletion in OSM client by creating a file osm-complete.sh in the following way:
| |
| mkdir -p $HOME/.bash_completion.d
| |
| _OSM_COMPLETE=source osm > $HOME/.bash_completion.d/osm-complete.sh
| |
| | |
| Then you can add it to your $HOME/.bashrc file:
| |
| . .bash_completion.d/osm-complete.sh
| |