RIFT-16848:RIFT-333: Test Multi-disk (Volumes) with OpenStack (2 Image volumes, 1...
[osm/UI.git] / python-osmclient / README.md
1 # python-osmclient
2 A python client for osm orchestration
3
4 # Installation
5
6 ## Install dependencies
7 ```bash
8 sudo apt-get install python-dev libcurl4-gnutls-dev python-pip libgnutls-dev python-prettytable   
9 sudo pip install pycurl
10 ```
11
12 # Setup
13 Set the OSM_HOSTNAME variable to the host of the osm server.
14
15 Example
16 ```bash
17 localhost$ export OSM_HOSTNAME=<hostname>:8008
18 ```
19
20 # Examples 
21
22 ## upload vnfd
23 ```bash
24 localhost$ osm upload-package ubuntu_xenial_vnf.tar.gz
25 {'transaction_id': 'ec12af77-1b91-4c84-b233-60f2c2c16d14'}
26 localhost$ osm vnfd-list
27 +--------------------+--------------------+
28 | vnfd name          | id                 |
29 +--------------------+--------------------+
30 | ubuntu_xenial_vnfd | ubuntu_xenial_vnfd |
31 +--------------------+--------------------+
32 ```
33
34 ## upload nsd
35 ```bash
36 localhost$ osm upload-package ubuntu_xenial_ns.tar.gz
37 {'transaction_id': 'b560c9cb-43e1-49ef-a2da-af7aab24ce9d'}
38 localhost$ osm nsd-list
39 +-------------------+-------------------+
40 | nsd name          | id                |
41 +-------------------+-------------------+
42 | ubuntu_xenial_nsd | ubuntu_xenial_nsd |
43 +-------------------+-------------------+
44 ```
45 ## vim-list
46
47 ```bash
48 localhost$ osm vim-list
49 +-------------+-----------------+--------------------------------------+
50 | ro-account  | datacenter name | uuid                                 |
51 +-------------+-----------------+--------------------------------------+
52 | osmopenmano | openstack-site  | 2ea04690-0e4a-11e7-89bc-00163e59ff0c |
53 +-------------+-----------------+--------------------------------------+
54 ```
55
56
57 ## instantiate ns
58 ```bash
59 localhost$ osm ns-create ubuntu_xenial_nsd testns openstack-site
60 {'success': ''}
61 localhost$ osm ns-list
62 +------------------+--------------------------------------+-------------------+--------------------+---------------+
63 | ns instance name | id                                   | catalog name      | operational status | config status |
64 +------------------+--------------------------------------+-------------------+--------------------+---------------+
65 | testns           | 6b0d2906-13d4-11e7-aa01-b8ac6f7d0c77 | ubuntu_xenial_nsd | running            | configured    |
66 +------------------+--------------------------------------+-------------------+--------------------+---------------+
67 ```
68
69 # Bash Completion
70 python-osmclient uses [click](http://click.pocoo.org/5/).  You can setup bash completion by putting this in your .bashrc:
71     
72     eval "$(_OSM_COMPLETE=source osm)"
73