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