165 Commits

Author SHA1 Message Date
Trinath Somanchi
af2f0f031f Switch to oslo_log
tackerclient is currently using python logging module to
implement logging functionality.
This patch made a switch to oslo.log(logging for openstack projects)

Reference:-
http://docs.openstack.org/developer/oslo.log

Change-Id: Iecab180e605c788bb820c7a628781abf9a4918ea
Closes-Bug: #1656167
2017-03-14 14:37:31 +05:30
Trinath Somanchi
c80b0c7133 vnfd-delete gives ambiguous success message
When a single vnfd is deleted, the following success message is delivered.

$> tacker vnfd-delete cirros-vnfd-multi-vdu

All vnfd(s) deleted successfully

The above success message has to modified to
" All specified %(resource)s(s) %(msg)s successfully? "

Change-Id: I48443622b718a1d6a1476f53c6378b67ce0d82e4
Closes-Bug: #1672302
2017-03-13 15:31:55 +05:30
Jenkins
b3da4a6a7f Merge "Deprecate direct YAML input in tackerclient" 2017-01-24 20:46:38 +00:00
Sridhar Ramaswamy
1dedfd7305 Deprecate direct YAML input in tackerclient
Starting from Ocata tacker payloads will only accept
YAML dict for config and param payload values. Hence
remove the warning when something other than YAML dict
is received by the client. Such a CLI input is no longer
make sense. So, starting Ocata deprecate all direct
YAML input and remove it in Pike.

Change-Id: I03f3ac405e92d7e9fa69fd2b2761c243456fd7e8
Partial-Bug: 1656416
2017-01-24 00:03:58 +00:00
Jenkins
0d47fe20fa Merge "Support VNF creation from inline VNF template" 2017-01-20 20:00:48 +00:00
janki
f66a4e0ccc Support VNF creation from inline VNF template
Allows creating VNF from the VNFD template directly without the need of
VNFD being stored in Tacker VNFD catalog.

Change-Id: I719237dd04dd7fe13fb7e7964402d7074679b2d6
Implements: blueprint vnf-inline-template
2017-01-20 06:58:02 +05:30
Manikantha Srinivas Tadi
7cd2f2cc6a Adds vnfd_id coloumn in vnf-list
Change-Id: I0c11d7c4710da225d8786a8e9cc29693d0cc5434
Closes-Bug: #1592277
2017-01-18 02:27:28 -05:00
Bharath Thiruveedula
b91c8a745e Remove unwanted 'required' parameters
Closes-Bug: #1655419
Change-Id: I7642161a8b8f68c461cbb08520f9e6c6fa8b7863
2017-01-11 12:13:24 +05:30
dharmendra
27a9ed8a35 Remove support for legacy VNFD templates.
From Mitaka version, Tacker supports TOSCA based VNFD templates.
Legacy templates were deprecated in newton. Server side already
commited in https://review.openstack.org/#/c/382786/.
Removing related checks in client side now.

Implements: blueprint deprecate-legacy-template-dsl
Change-Id: I60b683c6d63b6976d438ff6130d16ddbf0656940
2017-01-08 19:39:59 +00:00
Jenkins
aa7249af3e Merge "Improve help text for events-list command options" 2017-01-06 00:22:49 +00:00
Naoya Harada
5cd75e8727 Improve help text for events-list command options
events-list command's help text for some options does not follow common
format. Also, *-events-list commands have similar issues. This patch
fixes help texts for these commands to make them clearer for users.

Change-Id: Icd85d13fee437bf0f83979eb6625377b38ce39ad
Closes-bug: #1628769
2017-01-05 13:09:00 +09:00
Naoya Harada
59ee90791d Fix invalid unit test code in python-tackerclient
Unit tests are not testing the behavior of command-line client
code properly since mox was replaced with mock in [1].

[1] https://review.openstack.org/#/c/313165/

assert_called_once_with() should be called after the target
call of the patched method.

Change-Id: I99873e9cb1d75d1fa2e41c02b9f87dfa4f9ef1f7
Partial-Bug: #1572706
2017-01-05 09:43:47 +09:00
Jenkins
dbc71552f2 Merge "Implement client support for NSD" 2017-01-04 09:18:00 +00:00
Bharath Thiruveedula
1cf8ceb72e Implement client support for NSD
Change-Id: I5653f3bb627b81dfe356e2192c71b13c6cfe6924
Partially-implements: blueprint nsd-support
Co-Authored-By: Dharmendra Kushwaha<dharmendra.kushwaha@nectechnologies.in>
2017-01-04 13:30:18 +05:30
Jenkins
a6a2fa0975 Merge "Support parameter input for vnffg template" 2017-01-03 21:42:24 +00:00
Jenkins
69009d6dad Merge "Remove passing infra and mgmt driver from client" 2016-12-23 01:23:25 +00:00
Jenkins
3b99b49852 Merge "Replaced e.message with str(e)" 2016-12-23 01:22:51 +00:00
gecong1973
3f7cc06aff Replaced e.message with str(e)
For logging the exception message: e.message has been
deprecated. The preferred way is to call str(e).
more details:
https://www.python.org/dev/peps/pep-0352/

Change-Id: Ic22fbd37376843f714d2c1669d2cdc25a3569225
2016-12-23 00:58:02 +00:00
venkatamahesh
d90dac82ca Support parameter input for vnffg template
Change-Id: I93819ff19ae91ca5e24778e220d3d09b63532ddf
Implements: blueprint vnffgd-param-support
2016-12-21 17:19:37 +05:30
Jenkins
592f7d22b3 Merge "Fix oslo.i18n problems in python-tackerclient" 2016-12-21 01:57:51 +00:00
Jenkins
0373528ff3 Merge "Add __ne__ built-in function" 2016-12-21 01:54:07 +00:00
Janki
1e613792fd Remove passing infra and mgmt driver from client
This patch removes passing infra and mgmt driver as part of VNFD body from
client and API.

Change-Id: I4684e69b8993e6c35503317503dd73e2c13f44dd
Partial-Bug: #1630936
2016-12-20 13:25:24 +05:30
Lu lei
ef1585a024 Fix oslo.i18n problems in python-tackerclient
Help msg in tacker project should support oslo.i18n. But
tests directory faces developer, So it needn't support oslo.i18n.

Co-Authored-By: ShuYingya<yingya.shu@easystack.cn>
Change-Id: I60106b106cfd77b46663ff35a2735cfa5ea158f0
2016-12-16 18:46:50 +08:00
venkatamahesh
f673cea49c Changed the help message of --config-file parameter
In this patch the description for --config-file parameter
is modified to be more informative

Change-Id: I61213a675cbb48a89ddb0b2f66fa1bd5bfab6efa
2016-12-06 05:46:37 +00:00
howardlee
2b3b1792d5 Add __ne__ built-in function
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you define
__eq__ for it to work properly [1]. There are no implied relationships
among the comparison operators. The truth of x==y does not imply that
x!=y is false. Accordingly, when defining __eq__(), one should also
define __ne__() so that the operators will behave as expected.

[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

Change-Id: I6adceadb6e3749e34cf847654f28a3b6eea832fd
2016-11-16 16:20:29 +08:00
Naoya Harada
b45904f7a1 Usability improvements of vim-update options
Tacker CLI does not support updating name and description of VIM.
This patch introduces --name and --description options to vim-update.

Also, existing --is-default option's behavior can be improved.
Currently is_default attribute will be set to False when --is-default
is ommited, and will be set to True when --is-default is specified.
So even a user, who wants to update attributes other than is_default,
needs to be aware of current is_default setting. This patch will make
the behavior of --is-default option clearer like below:

 1.When --is-default True is specified, it'll be set to True.
 2.When --is-default False is specified, it'll be set to False.
 3.When --is-default is ommited, it will stay as-is.

In addition, --config-file should be a required option because both
server and client expect it to be given when updating VIM.

Change-Id: Ic19fb6b0efb48bc3486f94836be4f2ff35f8c84b
Partial-Bug: 1637360
2016-11-11 17:35:52 +09:00
Jenkins
10f286989d Merge "Using assertIsInstance() instead of assertEqual(True, isinstance())" 2016-10-18 04:08:29 +00:00
Jenkins
2a62ba447b Merge "Revert "Remove unused import library"" 2016-10-17 05:05:54 +00:00
Luka Krajger
edf203acb8 Revert "Remove unused import library"
Directive "from __future__ import print_function" is not an actual
import, but it enables print statement in py2 to behave like a real
function in py3.

This allows us to use print() function in py2/py3 compatible way.

This reverts commit 9910cbc746380dba2c8dc5f89120f0f48a74ced7.

Change-Id: Ibdef82f0da42e815fd6c9ec632d0fd36c272b094
2016-10-14 09:53:53 +02:00
gong yong sheng
e3f0d522ba make python34 CI job to pass
remove _get_attr_metadata monkey_patch since it is for XML test.
remove iterkeys() call which is not py3.x compatible.

Change-Id: I46df0a3748f470521553793111a21eea72bd7663
Closes-bug: 1632714
2016-10-14 06:39:50 +00:00
Trevor McCasland
65a5198d73 mox to mock refactor
Refactoring unit tests to use mock instead of mox

other mox usages by not run test cases will be dealt with
later.

Co-Authored-By: gong yong sheng <gong.yongsheng@99cloud.net>
Co-Authored-By: Trevor McCasland <TM2086@att.com>

Change-Id: I7e42494b96f1e54f5f04534d3b453422ea1bf4ef
Partial-Bug: #1572706
2016-10-14 14:38:29 +08:00
gong yong sheng
7cbdfabc75 rename vm into vnfm
Change-Id: Ia232eeb94adb190a212e9ec766eeee6dcb63bffd
closes-bug: 1632551
2016-10-12 11:30:04 +08:00
Anh Tran
66c9b13212 Using assertIsInstance() instead of assertEqual(True, isinstance())
Change-Id: I567519f19d415a17a5253d3864031583619586b4
2016-09-30 02:49:34 +00:00
Jenkins
6c78395976 Merge "Fix cString ImportError for py34" 2016-09-30 01:49:58 +00:00
Tony Xu
c3d69c8e22 Remove commented out code in test_shell.py
TrivialFix

This is patch remove pdb in
tackerclient/tests/unit/test_shell.py

Change-Id: Ie13f931b6e914eb511cdc4a073b0577b4bab2767
2016-09-29 09:18:36 +08:00
Lu lei
45ebce43cb Fix cString ImportError for py34
Here cString dose not exist in py3.x. This patch is used to
fix py34 gate errors.

Partial-Bug: #1612071

Change-Id: I0a36777cba8c4602c16be771956d4cd26f7e979f
2016-09-26 12:41:27 +08:00
Jenkins
d810074cda Merge "Body can not be None while creating vnfd" 2016-09-19 04:27:42 +00:00
dharmendra
cb66556390 Body can not be None while creating vnfd
Trivial Fix

Change-Id: I8b2cd1171a530c8cdd0b2a09d87a76ed1a10bd37
2016-09-12 09:17:58 +09:00
Jenkins
1612e2227c Merge "Removing test cases for already removed methods" 2016-09-09 17:47:58 +00:00
dharmendra
495ccbd2aa Add support for multi delete
Currently Tacker client support single resource(i.e VNFD, VNF or
VIM) deletion per call. With this fix, multiple VNFs, VNFDs or
VIMs can be deleted in a single client call.

Change-Id: I0819d94e14637d8e9d8a7b2afb5f948587e00ce0
2016-09-09 14:27:09 +09:00
Jenkins
d8a6fa279a Merge "Allow auth url without port for vim registration" 2016-09-08 19:05:26 +00:00
dharmendra
95733d9eb4 Remove "else" branch in "create_vnfd" function
There is not necessary for "else" branch, so it remove.
Co-Authored-By: dharmendra kushwaha <dharmendra.kushwaha@nectechnologies.in>

Change-Id: Ic4313175518513e583795b84c2725b770eb2888f
2016-09-07 15:20:44 +00:00
gong yong sheng
3b60ab1aaa Allow auth url without port for vim registration
This patch allows vim-register command to register keystone
URL without port.

Change-Id: Ie04a0253aa3f42ef532ccf8a7bddbbd1f88e3e34
Closes-bug: 1618756
2016-08-31 17:14:27 +08:00
Jenkins
48d458d290 Merge "Modify MyURLComparator to handle deep match on URL" 2016-08-27 14:29:16 +00:00
vish
f1eef18974 Moving test files to vm directory
This commit moves the test files from events and nfvo directory
to the vm directory. Currently tests are executed if they are in
the vm directory.

Change-Id: I7ac08fb5686597926ec3b3c62d8221abf2b0f066
Implements: blueprint: audit-support
2016-08-27 03:40:54 +00:00
Jenkins
78b0876baf Merge "cli: modify vnfd, param & config attr. to dict obj" 2016-08-26 23:33:49 +00:00
Sripriya
f6848f0f31 Modify MyURLComparator to handle deep match on URL
MyURLComparator equals method is enhanced to perfom url comparison
based on url parts such as scheme, netloc, path and query instead
of raw string comparison.

pagination methods are modified to wrap the url requests with pagination
params within MyURLComparator objects.

Change-Id: I69b835dce64d662d1af6a14556fb8281e3b04d63
Closes-Bug: #1617480
2016-08-26 16:03:27 -07:00
Jenkins
542a2bb083 Merge "Deprecate infra_driver and mgmt_driver" 2016-08-26 22:34:28 +00:00
digambar
ced23fe6ab Deprecate infra_driver and mgmt_driver
infra_driver will be automatically figured out
in the VNF instantiation based on target VIM type
mgmt_driver is specified in the TOSCA template
per-VDU and the value the client API is ignored

Both these attributes will be removed in Ocata.

Change-Id: Ic59d7f8af6e4b1a27f4125f57d8165dc1011ce9e
Closes-bug: #1524243
2016-08-26 20:26:40 +00:00
Sripriya
aa499bb5f3 Remove list_vnf_resource_pagination unit test
This patch removes the list_vnf_resource_pagination unit test
which tested the pagination support of list_vnf_resources.
Pagination support is not enabled for vnf resources and hence
removed the test case.

Change-Id: I98843a63f6566595ceeb4758926a441fff2ee0ff
2016-08-26 12:54:41 -07:00