86 Commits

Author SHA1 Message Date
Shivam Shukla
00d6e14b73 Replace Legacy Callable Formatter Functions
osc-lib 4.x introduced a change that removed support for legacy
callable functions used as formatters in CLI output.
The python-tackerclient code still uses such deprecated formatters,
which leads to the Invalid Formatter Provided error when used with
osc-lib>=4.0.0.

Replace these legacy callable formatters with compatible formatter
classes provided by osc_lib.cli.format_columns.

Closes-Bug: https://bugs.launchpad.net/tacker/+bug/2118585
Change-Id: Idc2a3be9fe709942904f472b7728e095ded92b19
Signed-off-by: Shivam Shukla <shivam.shukla3@india.nec.com>
2025-07-25 10:37:54 +00:00
Ai Hamano
0a8dced06e Improved display of vnfPkgId for v2 Tacker
This patch fixes the output of v2 Tacker so that vnfPkgId of
VnfInstance that are only used in v1 Tacker are not displayed
as CLI output.
This is because it is confusing for v2 users that unused vnfPkgId
(VNF Package ID) is always displayed as empty.

The vnfPkgId (VNF Package ID) remain displayed in the v1 Tacker
CLI output.

Change-Id: I4adea34e9c2c7fc51e087d2a00f47db77d67fe4a
2024-12-09 14:02:02 +09:00
Kyaw Myo Thant
7761e073aa Add VNF Package ID to output of SHOW VNFLCM
Tacker API add VNF Package ID to the Tacker V1 VNFLCM API.
This patch adds `VNF Package ID` to the output of
`openstack vnflcm show` command.

Fixes-bug: #2078757
Change-Id: I6edd3b5c080aff350cc6e1c8cab4f25bafe02890
2024-09-10 14:27:06 +09:00
Kaori Mitani
0bae79f913 Fix output regarding PM Job response
According to SOL003, "authentication" should not appear
in the PmJobModifications response.
Therefore, it has been removed from the output obtained
when running "openstack vnfpm job update".

Closes-Bug: #2054420
Change-Id: I14b415a161983e682a4415d11d1fdad5792be3f8
2024-02-22 09:29:32 +00:00
Ayumu Ueha
e1cd39fa41 Obsolete Legacy APIs excluding VIM feature
This patch obsoletes CLI for Legacy APIs excluding VIM feature.

Implements: blueprint deprecate-legacy-apis
Change-Id: I9be376a660c6f7c34c0abe7e327dec7a91d49ee2
2023-12-08 02:29:05 +00:00
Zuul
0f9b6f5c52 Merge "Add support cnf auto scale via threshold interface" 2023-02-16 10:32:17 +00:00
Yi Feng
8b45c8082b Add support cnf auto scale via threshold interface
Add the Performance Management Threshold CLI to support AutoScale.
The Performance Management Threshold API is based on ETSI NFV-SOL
002 v3.3.1 and ETSI NFV-SOL 003 v3.3.1, which is Version "2.0.0"
API of Tacker.

Implements: blueprint support-auto-lcm
Change-Id: Idd313d6abe47dfa41fc86ddc614d00f99f3fc3b2
2023-02-16 10:36:47 +09:00
Ayumu Ueha
156deea66c Add deprecation notice for Legacy APIs
This patch deprecates CLI for Legacy APIs excluding VIM feature.

Implements: blueprint deprecate-legacy-apis
Change-Id: Ib74db43b4a3de4676e61f4f9ce6d3d2095a11ddf
2023-01-27 00:38:21 +00:00
Koji Shimizu
64d7a87670 Add support cnf auto heal and scale
Support container based VNF AutoHeal and AutoScale operation with
External Monitoring Tools.

Add the Fault Management interfaces and CLI to support AutoHeal.
Add the Performance Management interfaces and CLI to support
AutoScale. The Fault Management and Performance Management
interfaces are based on ETSI NFV-SOL 002 v3.3.1 and ETSI NFV-SOL
003 v3.3.1, which are Version "2.0.0" API of Tacker. Add the
Prometheus Plugin that has a interface between tacker and the
External Monitoring Tool.

Implements: blueprint support-auto-lcm
Change-Id: I7023a72b73f17f3746c74d311919497c7c4e8b3f
2022-09-01 12:16:57 +00:00
Ai Hamano
21f60be225 Add vnflcm subscriptions APIs
This patch supports CLI of vnflcm subscriptions APIs.

They are as follows.
* vnflcm subsc create
* vnflcm subsc delete
* vnflcm subsc list
* vnflcm subsc show

The output message of "vnflcm delete" was also modified
to match "vnflcm subsc delete".

Implements: blueprint support-nfv-solv3-subscriptions
Implements: blueprint support-etsi-nfv-specs
Change-Id: I9a839a3d131afc80fec0c2bbaa30443798117e0d
2022-07-21 14:56:56 +09:00
Zuul
417f27b9b8 Merge "Support ChangeVNFPackage command in tackerclient" 2022-02-25 02:32:22 +00:00
Yi Feng
ab901b6466 Support ChangeVNFPackage command in tackerclient
Add ``openstack vnflcm change_vnfpkg`` to python-tackerclient. This
command can execute change current vnf package operation [1].

[1]
https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_NFV-SOL003v030301p.pdf

Implements: blueprint upgrade-vnf-package
Change-Id: I0d9c88147dee3a273cb27224db6be6c91cf7fe55
2022-02-25 09:51:40 +09:00
Itsuro Oda
3724240344 Add vnflcm v2 APIs
This patch supports CLI of vnflcm v2 APIs which are added in Yoga
release.

They are as follows.
* vnflcm update
* vnflcm scale
* vnflcm heal
* vnflcm change-ext-conn
* vnflcm op fail
* vnflcm op retry
* vnflcm op rollback

They are common with v1 except heal. An optional parameter
'--additional-param-file' is added to heal CLI.

Implements: blueprint support-nfv-solv3-heal-vnf
Implements: blueprint support-nfv-solv3-change-external-connectivity
Implements: blueprint support-nfv-solv3-modify-vnf
Implements: blueprint support-nfv-solv3-scale-vnf
Implements: blueprint support-nfv-solv3-error-handling
Change-Id: If4acd9c4d35ce7a5bf6c23db1a8238654d536c87
2022-02-22 03:01:25 +00:00
Zuul
45412f63f0 Merge "Help message of heal cli modified" 2022-02-22 00:09:08 +00:00
Pooja Singla
cc73d9d099 Help message of heal cli modified
Usage message of all cli commands of tacker is constructed by
argument parser by default. It includes optional parameter
first and insert mandatory parameter at end.

All cli commands are implemented with this design only
except heal cli.

Heal cli is a special case in which optional parameter is
coming at end and mandatory parameter is coming before optional.
To fix this issue usage parameter of argument parser is set
in heal cli.

Closes-Bug: #1954744

Change-Id: I3b1d04df210ad07d4b9a99f300017d49e2b56f0b
2022-02-18 16:37:12 +05:30
Renu
1c73f54664 Fix in "vnflcm op list" CLI with exclude-fields
"vnflcm op list" with "--exclude-fields" is not
excluding parameters from CLI result.

Closes-Bug: 1953377
Change-Id: If47beccfbab4b85173bbe159905d0605e721cedd
2022-01-27 04:53:39 +00:00
Zuul
ccda0487d7 Merge "Support of Cancel VNF command in openstackclient" 2021-12-13 18:35:34 +00:00
Hiromu Asahina
6834454309 Support of Cancel VNF command in openstackclient
Add ``openstack vnflcm op cancel`` to python-tackerclient. This
command can execute Cancel operation [1]. This API makes a transition a
LCM that is stopped in the PROCESSING state to the FAILED_TEMP state.

[1]
https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.03.01_60/gs_NFV-SOL003v030301p.pdf

Implements: blueprint support-cancel
Change-Id: Id957f6a7992f9fd5b04806aff3d76680d8d63a8d
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
2021-12-10 18:09:33 +09:00
Itsuro Oda
98789f8f9a Multi version API support
Add version '2' for support version of --os-tacker-api-version to
'openstack vnflcm' CLI.

If '--os-tacker-api-version 2' is specified, REST API url
'/vnflcm/v2' is used instead of '/vnflcm/v1'.

New CLI 'openstack vnflcm versions' is added too.

Implements: blueprint multi-version-api
Change-Id: I256a4010043d0b84ffe43b055c6a6a67a2d5d661
2021-08-31 22:24:52 +00:00
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
Renu
c20ef24533 vnfConfigurableProperties missing in VNF show
This patch will resolve this issue and display the parameter
vnfConfigurableProperties in Query VNF. This parameter will be visible
in output of CLI like "openstack vnflcm show".

Closes-Bug: #1930571
Change-Id: I67b9bf854000ae52d2e1df40e4edf437713162b5
2021-06-21 12:08:55 +00:00
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
Aldinson Esto
4e6dc4c031 CLI for Individual VNF LCM Operation Occurrence
Add ``openstack vnflcm op show <vnf-lcm-op-occ-id>``
to python-tackerclient. This command can execute the
get Individual VNF LCM Operation Occurrence by
specifying vnf-lcm-op-occ-id as parameter.

Implements: blueprint support-fundamental-lcm
https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-fundamental-vnf-lcm-based-on-ETSI-NFV.html
Change-Id: Ibd24a2aa3ec90fbca4caabbcfb3c8a3883e4eae8
2021-03-11 09:54:10 +09:00
Aldinson Esto
6b29bb78b1 Support CLI for Getting List of VNF LCM Operation Occurrences
Add ``openstack vnflcm op list`` to python-tackerclient.
This command can execute getting the list of VNF LCM
Operation Occurrences. User can specify filters for more
specific results.

Note:
- Filtering for the following attributes:
  operationParams, error, resourceChanges and
  changedInfo is only limited to the parent
  attribute. Currently, child attributes/nested
  attributes are not searchable.

Implements: blueprint support-fundamental-lcm
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-fundamental-vnf-lcm-based-on-ETSI-NFV.html
Change-Id: Ie0b3399946d2a705011269025102d9380102ca92
2021-03-10 22:24:11 +09:00
Wataru Juso
1299e15f35 Support of Retry VNF command in openstackclient
Add ``openstack vnflcm op retry`` to python-tackerclient.
This command can execute Retry operation.
This API re-executes an LCM that is stopped in the FAILED_TEMP state
from where it was interrupted.

Implements: blueprint support-error-handling
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-error-handling-based-on-ETSI-NFV.html
Change-Id: I6731d0bcbcd5a4e597596e63c2cd883b3897a145
2021-03-10 11:14:11 +09:00
Wataru Juso
cfe14110d1 Support CLI of Change External VNF Connectivity
Add ``openstack vnflcm op chg-ext-conn`` to python-tackerclient.
This command can execute Change external VNF Connectivity operation.
This API can change VL setting.

Implements: blueprint support-change-external-connectivity
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-change-external-VNF-connectivity-operation.html
Change-Id: I3a935296646361032665082a4060bc21ff51c1b1
2021-03-10 09:54:49 +09:00
Wataru Juso
58167535c7 Support of Fail VNF command in openstackclient
Add ``openstack vnflcm op fail`` to python-tackerclient.
This command can execute Fail operation.
The API can change operationStatus from "FAILED_TEMP" to "FAILED".

Implements: blueprint support-error-handling
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-error-handling-based-on-ETSI-NFV.html
Change-Id: I83395e159e28c7e831dfe0ecd90435b3fb18c196
2021-03-08 09:26:29 +09:00
zhangboye
68df82918a Dropping explicit unicode literal
In python 3, all strings are considered as unicode string.

This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.

Note: The scope of the patch is to drop unicode literal prefix
from python source code files, documentation and comment are overlook.

Co-Authored-By: Manpreet Kaur kaurmanpreet2620@gmail.com
Change-Id: I5316037871109838a03ff4561b7b38dcc56bc447
2021-02-26 10:41:44 +05:30
Wataru Juso
bbe6d2c7e0 Modify operation of scale parameters
Scale command cannot be executed without '--additional-param-file'
option, because there is a problem with branch process. Modify branch
process when using this parameter.

And, I uniform cardinality mismatches of specification definition [1]
in some arguments are resolved. This change has no impact of the order
of setting.

[1]https://specs.openstack.org/openstack/tacker-specs/specs/victoria/support-scale-api-based-on-etsi-nfv-sol.html

Closes-Bug: #1903280
Change-Id: I1dd2c71760112982abd2b4b7da6dbaafd7077614
2021-01-05 14:48:27 +09:00
LiangLu
6bdb64f464 Modify the description of the command --help
The description of the "openstack vnf package artifact download --help"
command is incorrect.Modify VNF Package or VNFD data to VNF Package
artifact file data.

Change-Id: Ib70efb7eefdb6eacea24dec67bb4ff996b6178d3
Closes-Bug: #1901103
2020-10-28 02:54:27 -04:00
Koichi Edagawa
8ff2f35476 Support of RollbackVNF command in openstackclient
Supported RollbackVNF command in OpenStack Tacker Client.

Co-Authored-By: Yasufumi Ogawa <yasufum.o@gmail.com>
Implements: blueprint support-etsi-nfv-specs
Change-Id: If3d717b487f653ef98196149c4c849ddac69ec95
2020-09-15 18:35:09 +00:00
Zuul
2a95e61abf Merge "Implementation Artifacts support in Tacker" 2020-09-15 18:04:29 +00:00
Zuul
0d34669e12 Merge "Add missing argument in UpdateVNFFG at ../nfvo/vnffg.py" 2020-09-15 17:58:14 +00:00
LiangLu
9cd8f11d83 Implementation Artifacts support in Tacker
Implements: bp/add-artifacts-vnf-packages

* python-tackerclient

  * Modify ``vnf package show`` command to display ``additionalArtifacts``
    information.
  * Add new OSC command ``vnf package artifact`` to fetch individual artifact
    in an on-boarded VNF package.

Change-Id: Id0694724f2f2e335c14824bc5ca5bf2e67ac4b96
2020-09-14 07:35:55 -04:00
Aldinson Esto
d7f7ea35d2 Support of Scale command in openstackclient
Supported Scale command in Openstack Tacker Client.

Implements: blueprint support-etsi-nfv-specs

Change-Id: I27b670c0aaa0c9b9cbce6ae44e03e5ba6234beb5
2020-09-14 12:13:31 +09:00
Donghun Cha
64a21f3995 Add missing argument in UpdateVNFFG at ../nfvo/vnffg.py
Currently in tacker, updating the VNFFG that already exist
has a problem like below Closes-Bug #1894945. To fix it,
add argument of '--param-file' and it works properly

Change-Id: I3f71c187fade9cd8b69a7131f274872975adf17c
Closes-Bug: #1894945
2020-09-09 06:11:59 +00:00
Koichi Edagawa
60c268f04d Support of UpdateVNF command in openstackclient
Supported UpdateVNF command in OpenStack Tacker Client.

Change-Id: I20435547e6072c4ca14a5d2cccd7ab77bfea08f8
2020-09-03 11:17:27 +09: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
Zuul
0af84c52cd Merge "Cleanup deprecated iteritems of dict" 2020-05-18 17:38:22 +00:00
Zuul
d720f3203f Merge "Improve readability of vnflcm show command" 2020-05-13 06:51:10 +00: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
Shubham
4ec52e30b2 Display correct fields in output for list command
If user list vnf packages with --exclude_default option, it should
display all attributes except default set of complex.

$ openstack vnf package list --exclude_default
Expected fields:
  'id', 'vnfProductName', 'onboardingState', 'usageState',
  'operationalState', '_links', 'vnfdVersion', 'vnfProvider',
  'vnfSoftwareVersion', 'vnfdId'

Actual fields displayed are:
   'id', 'vnfProductName', 'onboardingState', 'usageState',
   'operationalState'

Fixed this issue and now it will display fields as mentioned above in
expected fields.

Closes-Bug: 1875330

Change-Id: I61da40d2e6e7e42999b7ab2d2441cddde64118d9
2020-05-08 12:29:30 +05:30
Shubham
c6887750f0 Improve readability of vnflcm show command
Display show command data in human_readable format for better
readability for complex attributes of vnf instance like
'vimConnectionInfo', 'instantiatedVnfInfo', '_links'.

Please checkout below link to see the difference in vnflcm show
response data before and after resolving the issue.
http://paste.openstack.org/show/792866

Change-Id: I52684618f7042f5566ea3bed7255d17d2fd61df2
2020-05-08 12:28:25 +05:30
Shubham
e030c9019a Improve readability of vnf package show command
Display show command data in human_readable format for better
readability for complex attributes of vnf package like 'softwareImages',
'checksum', '_links' and 'useDefinedData'.

Please checkout below link to see the difference in vnf package show
response data before and after resolving the issue.
http://paste.openstack.org/show/792305/

Change-Id: I4827437461fd42b4da8a90d7f8ef703625c78cf5
2020-05-08 12:10:46 +05:30
Shubham
74cfe26551 Enhance vnf package list command to support filtering of vnf packages
Added support for below arguments.

1)--filter
2)--all_fields
3)--fields
4)--exclude_fields
5)--exclude_default

Change-Id: I2bac92581bb4be3f138107d108ecf9b38605f5cc
2020-04-10 00:23:59 +00:00
Shubham Potale
1736ae7895 Add command for Fetch VNF package API
Added command support for downloading csar vnf package contents.

Change-Id: I6371ebdf0dd9d127ca88bcd721a31036d11ea5fc
Implements: bp enhance-vnf-package-support-part1
2020-04-09 07:21:19 +00:00
Shubham Potale
ac02653f21 Add command to read vnfd of vnf package API
Added command support for fetching VNFD of the vnf package.

Please see results here:-
http://paste.openstack.org/show/789212/

Change-Id: Ifa15ddf7ff306ed2705cf7a170d9e9f512491fba
Implements: bp enhance-vnf-package-support-part1
2020-04-09 07:21:06 +00:00
Shubham Potale
af4d8343ad Add command for update vnf package API
Added command support for updating vnf package.

Please see results here:-
http://paste.openstack.org/show/788463

Change-Id: I0cd32d531db569b7013332fcfaaaefde403e7aed
Implements: bp enhance-vnf-package-support-part1
2020-04-09 07:05:54 +00:00
Zuul
b8f2b39fee Merge "OSC support to heal vnf" 2020-04-01 10:55:49 +00:00
Zuul
05f5fecead Merge "OSC support to list vnfs" 2020-04-01 10:55:35 +00:00