153 Commits

Author SHA1 Message Date
Manpreet Kaur
94e28fc28f Correct YAML load warning
The use of `yaml.load` without Loader is deprecated and
considered unsafe.

The warning notice:
/opt/stack/python-tackerclient/tackerclient/tacker/v1_0/nfvo/vim.py:
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe.
Please read https://msg.pyyaml.org/load for full details.
config_param = yaml.load(config_yaml)

This change adds (Loader=yaml.SafeLoader) to remove the warning.

Change-Id: Idc77d855b41801777d57cfe92d1c448b6e72feaa
2021-07-02 20:44:45 +05:30
Nguyen Hai
785c6dbfda Adds support force delete VNFFG
This patch adds '--force' parameter to vnffg delete command,
to force delete VNFFG.

e.g: openstack vnf graph delete --force VNFFG1

blueprint force-delete-resources

Change-Id: I642ddcdb7a1167f25553ef26df6102bb2be22c3f
2021-04-07 02:12:24 +00:00
Yasufumi Ogawa
754f6df5a7 Drop six support
This update is to drop all of six support to move

Closes-bug: #1900389

Change-Id: Ia6c61751203e98d432344dc9a52fe65bdb062af0
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
2020-11-01 18:43:00 +00:00
wangzihao
97f0903242 Remove six.moves.urllib
Remove six.moves.urllib replace with python3 urllib.

Change-Id: Ifd9d1dadfdc78ab7ef21bb648f71ca0e62830264
2020-09-23 19:33:29 +08:00
Zuul
55ea58fea8 Merge "Stop to use the __future__ module." 2020-07-22 14:44:35 +00:00
Hervé Beraud
2389e7466c Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I600e3aaace42f7e185c408af02279e6374282e5f
2020-06-02 20:52:53 +02:00
Hiroo Kitamura
1d033f9053 Fix exception message
Fix some exception messages because some exception messages are not
outputed as expected.
In addition, the codes that seems to improve readability by explicitly
specifying the arguments are also modified.

Change-Id: I425d15ea9f5a3d0b6132ffd03cb577e583239c3a
Closes-Bug: #1881510
2020-06-01 09:57:28 +09:00
Yasufumi Ogawa
741fd38741 Cleanup deprecated iteritems of dict
To fix the issue because of using deprecated method in python3, replace
iteritems() with items().

Change-Id: If3136a5ba471d2cd7ea9420b599567a2fa532cad
Partial-Bug: 1872120
2020-05-12 06:07:22 +00:00
Andreas Jaeger
d2f4c1748c Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I7a43ff6d91bad919dcaa450e66ef492a1d3a03ef
2020-04-09 19:55:03 +02:00
Hiroo Kitamura
a4c2b291b2 Support updating VNF parameters in tackerclient
Implementation to update parameters of created VNF in python-tackerclient.

Change-Id: Ifd5b07bdd1445639db4c23f6b92a3350d4ae22a5
Blueprint: https://blueprints.launchpad.net/tacker/+spec/reservation-vnfm
2020-02-27 09:13:48 +00:00
dharmendra
1e280fb1fe Adds support force delete for NS.
This patch adds '--force' parameter to NS delete command, to delete NS
forcefully.

blueprint force-delete-resources

Change-Id: I7d8eb7ae63f9e43da37701e3e8312e650ea5bd3c
2019-07-30 11:05:30 +00:00
Zuul
f4839f308a Merge "Adds support force delete resources" 2019-02-12 08:35:42 +00:00
dharmendra
1fdf521ba9 Parameter changed from mgmt_url to mgmt_ip_address
In continuation of [1], fixing the same in tackerclient.
[1]: https://review.openstack.org/#/c/490471

Change-Id: I45dfe784e20f96cff12e346d34b1cce856a564db
2019-02-04 09:20:48 +00:00
Cong Phuoc Hoang
66794e007b Adds support force delete resources
This patch adds '--force' parameter to vnf delete command,
to force delete VNF instances.

e.g: openstack vnf delete --force VNF1

blueprint force-delete-resources

Change-Id: I20aee4ecb66643dfa5fad490956d898f7e851411
2018-11-28 10:25:44 +09:00
Cong Phuoc Hoang
ba372bfcfd Updates in NS and VNFFG list commands
This patch will do 2 things:
1. Add 'vnf_ids' and 'vnffg_ids' fields as outputs from network
service list command. Users can know which VNFs or VNFFG, that
belongs to specific NS.
2. Add 'ns_id' fields to VNFFG list command, that shows which
network service the current VNFFG belongs to it.

Partially-implements: blueprint vnffg-ns

Change-Id: If6c5550f94e676fb2062e32ddc069acd5dfb6490
2018-07-11 16:28:56 +09:00
Zuul
2ddc24c60e Merge "Fix cannot show the VNFFGD template" 2018-03-17 00:43:36 +00:00
Trinh Nguyen
17d108e146 Do not have to mention ssl_ca_cert in vim config file (client)
Current tacker client requires us to mention ssl_ca_cert
and set it to None if we don't want to use ssl cert. This
patch along with another patch on the tacker server side
will make ssl_ca_cert a truly optional config. And, only
the correct ssl_ca_cert will be able to authenticate.

Tacker Server changes: https://review.openstack.org/#/c/546580/

Change-Id: Ic87fe3382e100183c685c3b34768a5a5de889982
2018-02-26 16:17:40 +09:00
Nguyen Hai
82c70bd5a1 Fix cannot show the VNFFGD template
There is the wrong index of the vnffgd data in the code.

Change-Id: I72050c8afa8f549a4ac35036ccd969b14d5f3f81
Closes-Bug: #1750865
2018-02-22 02:16:05 +09:00
Zuul
5d338b8a75 Merge "Implement Tacker Client to support VNF cluster features" 2018-02-07 08:13:35 +00:00
LongKB
4d0cd3b7f2 Implement Tacker Client to support VNF cluster features
Adding a new CLI commands to support VNF cluster and VNF cluster
member CRUD operations:
      tacker cluster-create
      tacker cluster-show
      tacker cluster-list
      tacker cluster-delete

      tacker cluster-create
      tacker cluster-show
      tacker cluster-list
      tacker cluster-delete

Implements: blueprint policy-based-vnf-cluster
Change-Id: I76537566000f3d1724c9f566910389ede23f49b7
Co-Authored-By: xuan0802 <thespring1989@gmail.com>
2018-02-07 15:57:16 +08:00
Zuul
8509a590aa Merge "Show classifier's name" 2018-01-31 15:16:26 +00:00
Dimitrios Markou
99fc9b7bda Show classifier's name
In continuation of this patch [0] we are adding the functionality
of showing the names of the existing classifiers when the classifier-list
command is getting executed.

[0]: https://review.openstack.org/#/c/532203/

Depends-On: Ia586061c578a99662d49ad284d1ff313c350e1f3

Change-Id: If6d76a66ab0d37662d1b28fe1786b6e0ffc8171d
Signed-off-by: Dimitrios Markou <mardim@intracom-telecom.com>
2018-01-31 16:37:42 +02:00
gongysh
573de86f7f Complete VIM osc commands
Change-Id: I3cb21b0583020db8a91789e2168d2a51d45d0cf4
Implements: blueprint tacker-support-python-openstackclient
2018-01-23 08:44:12 +08:00
Cong Phuoc Hoang
b6ef835d89 Add "cert_verify" in vim_config file to support insecure VIM
Currently, Tacker can not communicate with VIM endpoints that
use SSL. This patch will add cert_verify parameter, user can
set "cert_verify" to False (default value is True) to disable
verifying SSL.

Change-Id: I0af2a0f91ecda2a63cf6233d780e1dd7c064513c
2018-01-13 09:35:13 +00:00
Cong Phuoc Hoang
e026ae17e5 Add "--vnffgd-template" to vnffg-update command
This patch will add "--vnffgd-template" to vnffg-update command to support
update VNFFG from file. User can run:
    tacker vnffg-update --vnffgd-template <vnffgd-file-name> vnffg_name
to update the existing VNFFG.

Partially Implements: blueprint update-vnffg

Change-Id: Ief0469d870530693798f798ecd2f52782318795b
2018-01-06 11:39:06 +09:00
Zuul
73592154f1 Merge "Implement client to support Kubernetes as VIM" 2017-11-22 01:54:54 +00:00
Cong Phuoc Hoang
6f1792b490 Implement client to support Kubernetes as VIM
This patch will add changes to support Kubernetes as VIM feature
in python-tackerclient.

After this change, user have to provide VIM type in VIM config file
when creating or updating VIM. The default VIM type is openstack.

Partially Implements: blueprint kubernetes-as-vim

Change-Id: I1b1610cb89a78a2a8fe134265b83dd469d72fdcd
2017-10-30 17:13:40 +09:00
Tim Rozet
584b44c8e7 Fixes symmetrical for vnffg update
Missed this with create fix:
Ide2aeab73b1dd88beb6e491e6b07cdee9fb7e48a

Change-Id: Ia983150de322d1ffbd7eeedc2048c19c095afefb
Signed-off-by: Tim Rozet <trozet@redhat.com>
2017-10-10 10:14:32 -04:00
Jenkins
bab4900db2 Merge "Update creating directly VNFFG and NS from descriptor template" 2017-09-28 12:16:36 +00:00
Tim Rozet
9630f711a8 Fixes passing boolean as string for symmetrical
Bug where 'True'/'False' strings were being passed in REST to Tacker
service which would end up throwing an exception because the DB type for
symmetrical is boolean/small int.  This converts it to boolean in the
client.

Closes-Bug: 1711550

Change-Id: Ide2aeab73b1dd88beb6e491e6b07cdee9fb7e48a
Signed-off-by: Tim Rozet <trozet@redhat.com>
2017-09-25 12:59:28 -04:00
Cong Phuoc Hoang
d8b0dbcbb7 Update creating directly VNFFG and NS from descriptor template
Currently, Tacker only support creating VNFFG and NS from VNFFG descriptor
and NS descriptor. This patch will support creating directy VNFFG and NS
from template file without initiating VNFFG and NS descriptors before.

Change-Id: If7554287bbe1184d9b84609f81e53f17d7b5fdfe
Closes-bug: #1681032
2017-08-10 06:37:45 +00:00
Jenkins
bfed79e1b0 Merge "Error handling for vnfd-create with empty vnfd-file" 2017-07-05 09:33:49 +00:00
vagrant
a11344c318 Error handling for vnfd-create with empty vnfd-file
Error handling for empty vnfd-file and yaml load.

Closes-Bug: #1490067
Change-Id: I48c21d193251a95c8fc7b10d3c6549b74c5287df
2017-07-03 08:13:26 +00:00
rajat29
b7a494e7d4 Replace six.iteritems() with .items()
1.As mentioned in [1], we should avoid usingg
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: I988ff08fe1d6bc52c4a601641c564db7881accf4
2017-06-14 12:08:54 +05:30
Jenkins
ed54224b6f Merge "Auth_creds should show the user specified values" 2017-05-29 05:05:35 +00:00
venkatamahesh
506f4cc4b9 Auth_creds should show the user specified values
Make auth_creds display the user specified credentials
which are project_name and username. Normally
vim configuration yaml file has no project_id and user_id

Change-Id: I987ad7bda04b0a161c56284f77964063490a18e0
Closes-Bug: #1629169
2017-05-27 06:44:22 +00:00
claire1006
978bb7cbbd Add "is_default" attribute in vim-list,and remove some unnecessary
info.

Change-Id: Ib78d16f9674623b288e693014e9abcbc976283e2
Closes-bug: #1692390
2017-05-24 00:52:19 +00:00
Trinath Somanchi
10b06eb2ff 'update-vim' to update params without config file.
Change-Id: Icb869f26a212776c453313642faefb31eb921ccf
Closes-Bug: #1674906
2017-05-02 17:04:51 +08:00
Dharmendra Kushwaha
845a5e1439 direct input for config was deprecated in ocata. Removing now.
Change-Id: I2dc08c37150eb00364c307c55c94bb3c51174886
2017-03-30 09:48:48 +00:00
gongysh
919dca0855 Revert "Switch to oslo_log"
it caused No handlers could be found for logger "tackerclient.shell"
This reverts commit af2f0f031f.

Change-Id: I8556dbf7ea45a268daa900e00c5334f11cd106d0
2017-03-18 06:12:33 +00:00
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
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