Commit Graph

31 Commits (4fa1445d70ffaa548d1d54ce328fbbd11d9677b9)

Author SHA1 Message Date
Renu 4fa1445d70 Software image path miss in uploading VNF package
Software image path is not stored in DB while
uploading VNF package.

Closes-Bug: 1879872
Change-Id: Ifac069a06009bb28ad7dc717c9562a52f52ed7df
2022-01-21 06:20:02 +00:00
Zuul 03fe8aebed Merge "Modify Network Resource Information used by FT" 2021-09-29 08:58:28 +00:00
Yi Feng db9b91aecc Fix create duplicated subscriptions
When creating a duplicated subscription, according to spec SOL003,
the api should return 303 See Other instead of 201 Created.

To fix this error, the following things is done in this patch:
1.Fix the error when the database virtual field extracts
the value from json in table `vnf_lcm_filters`.
2.Fix the error of sql query statement when querying subscription.
3.The attribute VnfProductsFromProviders should be an array, not an
object. Fix this error in UT, FT and schemas.
4.Fix typos when writing "object" as "objects" in dict "_versions"
in vnf_lcm schemas.
5.Rewrite the throwing and catching of SeeOther exception of this
api to fix the following errors: SeeOther should be thrown instead
of Exception; the return body should be empty instead of
ProblemDetail; the return header should contain location instead
of link.

Closes-Bug: #1933169
Change-Id: I51c198d60001dba94dd369f495cecef526e79800
2021-09-20 17:16:25 +09:00
Zuul c6c8c7b6ba Merge "Support TOSCA route for ChgExternalConnectivity" 2021-09-17 09:45:20 +00:00
ueha.ayumu 110bba1c28 Fix occasional multinode-sol job FT error
The "test_instantiate_terminate_vnf_with_vnflcmnoop" method of
multinode-sol job occasionally fails.
After vnf termination, "instantiationState" becomes "NOT_INSTANTIATED".
However, the "vnflcmOpOccs.operation_state" is not "COMPLETED" at this
point and sleep for 20 seconds before assert operation_state.
If stack deletion is not completed within 20 seconds sleep, reading
"PROCESSING" when asserting operation_state results in misjudgment and
an error.

This patch resolves the error by waiting until "COMPLETED" instead of
sleeping.

Change-Id: I5c5ec2f457d235c95627e2c339b477a191b24945
2021-09-14 06:44:32 +00:00
Yasufumi Ogawa ddf28104a3 Update version of cirros image to 0.5.2
We've been using old cirros-0.4.0 for long time, and don't need to fix
the version of cirros to 0.4.0. This patch is update to the latest
0.5.2.

Most of the changes in this patch is replacing `image`, `hash` and
`version` in TOSCA definition files. The rest of them are:

* Replace images. First one is only an actual image, and rest of them
  are empty text files which is a trick for reducing total size in
  tacker repo. So, text files are not replaced, but renamed simply.
  * tacker/tests/etc/samples/etsi/nfv/common/Files/images/cirros-0.5.2-x86_64-disk.img
  * samples/vnf_packages/Files/images/cirros-0.5.2-x86_64-disk.img
  * tacker/tests/etc/samples/etsi/nfv/test_csar_utils_data/sample_vnfpkg_no_meta_single_vnfd/Files/images/cirros-0.5.2-x86_64-disk.img
  * tacker/tests/etc/samples/sample_vnf_package_csar_in_meta_and_manifest/Files/images/cirros-0.5.2-x86_64-disk.img

* Update functional tests verifying images. A refactor of defining
  package size is included.

* Update devstack script, and helper scripts under `contrib` dir.

* Update API references and documents describing usage of the image.

Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>

Implements: blueprint update-cirros-052
Change-Id: I081b791dc986ab10f4845784b3e19dbb626e3cac
2021-08-30 21:31:12 +09:00
Aldinson Esto a49b445745 Support TOSCA route for ChgExternalConnectivity
Current ChangeExternalConnectivity operation only supports
user data case, we will improve such operation to support
TOSCA route.

Implements: blueprint support-change-external-connectivity
Change-Id: I5f03b27ddcbad883317d9817c08af7e59cb327f0
2021-08-01 11:26:30 +00:00
Aldinson Esto 33cb3ba575 Fix Healing so image is updated after Healing
This patch will fix the issue about Healing not being
able to update to the new image.

Closes-Bug: #1924215
Change-Id: I3de1a532e33ae25638a452db4b9e18626de8df42
2021-07-29 19:28:45 +05:30
Aldinson Esto 36e666cb92 Improvement of Processing Logic for Healing
The following patch will fix the issue wherein if VM name
and AutoScalingGroup name are the same name, unhealthy is
set for both and both are target for healing.

The fix will be in Instantiation part since the root cause
of the issue is that Nova::Server is not included as resource
in vnfcResourceInfo.

Closes-Bug: #1924214
Change-Id: I06849ebb068253e4691b5cfd03caac80bdc16cae
2021-06-21 17:23:11 +00:00
Wataru Juso 533b60741b Modify Network Resource Information used by FT
I have confirmed that the FT results are incorrect.
This is not a problem with the code, but with the test parameters.
This patch will improve the test code so that the correct results are
displayed.
* This patch is not a bug fixed but an improvement.

- Fixed the mismatch between VNFD and HOT resource information.
- Fixed the parameter of the external network resource information
  in Instantiation.

Change-Id: I41462d981caabcd742573748216149e265e8c5c4
2021-05-21 09:01:48 +00:00
Aldinson Esto f731f88532 Improvement of FT cases for Retry LCM Operation
Add Client Notification Endpoint Test assertion in the following
functional tests for Retry LCM Operation:

- test_retry_instantiate
- test_retry_scale_out
- test_retry_chgextconn
- test_inst_chgextconn_term

Closes-Bug: #1921994
Change-Id: Ibc67c97b389f707b67fa59c7e69e536faf88b40d
2021-04-07 05:24:13 +00:00
Aldinson Esto 3859ade824 Support Placement Constraints for Grant
Grant for 3rd-party NFVO is improved. Process related to placement
constraints is supported. This enables interoperability with
3rd-party NFVO which enables them to deploy each VM in the VNF after
setting the zone information based on the grant response from NFVO.

Co-authored-By: Yasufumi Ogawa <yasufum.o@gmail.com>
Implements: blueprint support-placement-constraints
Change-Id: Ibd8c5cae985766d5bd5e73276920fd4c28d6e87f
2021-04-01 08:42:52 +00:00
Aldinson Esto f5f29b34fa Support enhancement for Get Subscription List
- Added support for the following attributes:
       * operationStates
       * vnfInstanceSubscriptionFilter

  - The query information is enhanced by improving
    filtering expressions and operators

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: I3d2abc25370b0a34793a50edffeccc0bc2a2bfe1
2021-03-26 20:19:31 +09:00
Aldinson Esto 8242c132ad Support enhancement for Subscription Post
- Added support for the following attributes:
       *operationStates
       *vnfInstanceSubscriptionFilter

  - The filtering criteria is enhanced by adding the
    above attributes to effectively send_notifications

  - We also updated the following table in DB:
      vnf_lcm_filters

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: Iebe70c43ef1a5b653f8ec204b1b3a79ca882399f
2021-03-26 19:54:35 +09:00
Aldinson Esto ede9755ab5 Support Retry of Change External Connectivity
This feature will enable the client to use this API to initiate
retrying Change VNF External VNF Connectivity operation when it
fails.

It is based on the ETSI NFV specification that retry can be used
when a VNF lifecycle operation is in a FAILED_TEMP state.

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: Ia1d907922cdb701586f15c4840848fa8402ded3b
2021-03-26 09:11:18 +00:00
Aldinson Esto b77c469939 Support for Change External VNF Connectivity
This feature will enable the client to use this API to perform the
following operations:

    - allow client to change the external connectivity of a VNF
      instance
    - VNFM support to change port/network
    - VNFM also supports to change ip address/mac address/
      allowed_address_pair

The operations provided through additional attributes are below:
    - Grant(POST)
    - VNF instances (GET)
    - Individual VNF Instances (GET)
    - Notification Endpoint (POST)

Modified .zuul.yaml to disable image_volume_cache, since cache
Volume remains during Terminate implementation and responds to
Heat Stack deletion failure without erasing volume type.

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: Ie6b8b2b46b6de24e2d2d0a8bccef87bbdfa39191
2021-03-26 17:54:12 +09:00
Zuul 35c9eb233a Merge "Support Client Notification Endpoint Test" 2021-03-26 08:53:16 +00:00
Zuul 62ba0944d7 Merge "Enhancement IpOverEthernet in API Parameter" 2021-03-26 07:45:15 +00:00
Aldinson Esto 943e0b0815 Support Client Notification Endpoint Test
This functionality will enable tacker to test the
notification during register Subscription.

if VNFM cannot  receive success response
(204 no content), VNFM will be failed Subscription
Request

  - As sending management of this API, we apply
    legacy CONF.
    (retry_num,retry_wait, there are defined in
    vnf_lcm group.)

  - As sending control of this API, we add new
    CONF(test_callback_uri)

  - We modify(add) Notification(GET) process to
    current send_notification.

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: I2a1db1b34b687748ad939b0c867b2d78f45622da
2021-03-26 14:19:53 +09:00
Aldinson Esto ef8d4727e8 Enhancement of Fail Response Parameters
- Added support for all necessary response
  parameters for Fail API

- UT and FT assertion is also improved to
  be able to confirm these response params

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: I31b179a9f9703432c4e38eb29da9140311841e2f
2021-03-26 03:04:44 +00:00
Wataru Juso d7669a3e37 Enhancement IpOverEthernet in API Parameter
In this implementation, tacker support only "fixedAddresses" parameter.
This patch support "numDynamicAddresses" parameter in
IpOverEthernetAddress, modify to be accepted API Request.
*In this patch, support for addressRange has been postponed.

It is defined into ipAddress parameter by
ETSI SOL003 -> v2.6.1 -> 4.4.1.10c.

IpOverEthernetAddressData
-> ipAddresses
   -> numDynamicAddresses

And, modify the LCM user data route so that it can use
IpOverEthernetAddressData.

Change-Id: I3f6ba1f4e1bacf1fc5295726afc7ffd8626db444
2021-03-26 03:04:13 +00:00
Aldinson Esto 87ea725784 Enhancement of get VNF LCM operation occurrence
- Added support for getting Individual VNF LCM
operation occurrence by its ID

- The query information is enhanced by improving
filtering expressions and operators

- Attributes are also added including (but not
limited to):
  * grant_id
  * _links
  * >retry
  * >fail
  * changedExtConnectivity

- This patch has 2 BP features (Get VNFM LCM Operation
Occurence and attributes of Change External Connectivity
are also added). Since both features are related, they are
merged to one patch. This is why this patch have 2 BPs.

- 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
Implements: blueprint support-change-external-connectivity
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-fundamental-vnf-lcm-based-on-ETSI-NFV.html
Spec: https://specs.openstack.org/openstack/tacker-specs/specs/wallaby/support-change-external-VNF-connectivity-operation.html
Change-Id: Ie9b07c203807d08857be65298d9128b026a8fd37
2021-03-26 03:01:10 +00:00
Aldinson Esto 02ddbd6310 Support for Retry Operation
This feature will enable the client to use
this API to initiate retrying a VNF lifecycle
operation.

It is based on the ETSI NFV specification that
retry can be used when a VNF lifecycle operation
is in a FAILED_TEMP state.

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: I96546338fba9946d8df3ffc7ab0003c5b44be85b
2021-03-25 23:34:34 +09:00
Aldinson Esto c4db781ebc Support for marking VNF Lifecycle as Failed
This feature will enable the client to use an API
to mark a VNF Lifecycle Management Operation
occurrence as "finally failed".

It is based on the ETSI NFV specification where
"FAILED" is "finally failed". Once the operation
is marked as "finally failed",it can no longer be
retried or rolled back anymore.

  - As defined in SOL003, operation status can
    change from FAILED_TEMP to FAILED.

  - When VNFM receive this API , VNFM send
    Notification(POST) to requested node.

  - Regarding support of Fail Response parameter,
    will provide with separated patch.

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: Ieb221c6e2dd4ed6c873123325efb95f09af4a135
2021-03-19 22:34:12 +09:00
LiangLu f88022cdc2 Implement SOL001 features to MgmtDriver
* Enable VNF vendors to customize configuration methods
  for applications via MgmtDriver
* Load LCM interface from vnfd file
* Call LCM methods from vnflcm_driver
* Fix unitentional mgmt_calls in vnflcm_driver._scale_vnf_pre

Note:
* For UT, sqlalchemy is used, which calls functions in pymysql.py,
  so the dependency module PyMySQL needs to be added.
* The previous implementation of ``cfg.CONF.tacker.infra_driver``
  depends on the default config in legacy ``VNFMPlugin`` class in
  tacker/vnfm/plugin.py, so we need to fix this here.
* Due to drop unitentional mgmt_calls, it makes compatibility breakage
  for some scale actions calls and third party driver support. This
  backward incompatibility was decided to keep since it is not long
  time since last change(Victoria release)

Change-Id: Ib4ad3eb9e0a84d1a5e807d2e6004e6b2c02bf3cf
2021-02-18 17:29:39 +09:00
Zuul 6156cdb328 Merge "Add a k8s cluster for the k8s related FT in zuul" 2021-02-10 01:13:30 +00:00
Zuul ae3beb1fd3 Merge "Increase timeout value of heat stack creation" 2021-02-09 09:45:36 +00:00
Itsuro Oda 06b58b9e00 Increase timeout value of heat stack creation
Sometimes tacker-functional-devstack-multinode-sol-separated-nfvo
fails because of timeout of heat stack creation.

This patch increases timeout value of heat stack creation.

Change-Id: I825a60ac2261c8d47ca4273318f51221be36bb9e
2021-02-09 11:32:48 +09:00
Naoaki Horie fe46bd2612 Add a k8s cluster for the k8s related FT in zuul
This patch add a kubernetes cluster for the kubernetes related
functional tests of the VNF LCM in the zuul environment.

There is no impact to the existing jobs because this patch only
add a new job, however we may need to watch the load on the Zuul
environment due to its parallel jobs.

A new node-set consists of four nodes;

  * Controller: Keystone, Nova, Neutron, Glance, Cinder, Octavia,
                MySQL, MQ, ETCD
  * Controller-tacker: Tacker, Tacker-conductor
  * Controller-k8s: kuryr-k8s, kuryr-CNI, k8s-api, kubelet
  * Compute: Nova-compute

All kubernetes resources are created on the controller-k8s node.

This patch includes the following changes:

  * Added a execution command for the functional test of related
    k8s for the VNF LCM in tox.ini.
  * Registered a vim of the `kubernetes` type by ansible. Also
    added related materials.
  * Moved the functional test files for k8s to other new directory.
  * Fixed a minor invalid definition in the definition file used
    for functional testing.

Change-Id: I1621b904450e94d6793b4c524de6785520f2e805
2021-02-08 13:11:16 +00:00
Naoaki Horie 70ec11e113 Workaround for the ControllerRevision FT
This patch is provisional workaround for bug [1].

I think possible ways to fix the bug are using the kubernetes
python client v11.0.0. However, as a other issue, the
ControllerRevision resources is not delete and remain. The
problem of resources remaining cannot be solved immediately.
Therefore, add a skip decorator to skip the Functional Test of
ControllerRevision as a workaround.

The added skip decorator will be removed after this issue
completely resolved.

[1] https://bugs.launchpad.net/tacker/+bug/1910327

Partial-Bug: #1910327
Change-Id: I6bedc5c8c712c9cf7d95ae5cb7384c4dea187108
2021-02-05 10:10:05 +00:00
Yoshito Ito ba813054a4 Split FT to Legacy and SOL implementation
FT execution time in Zuul is about to exceed its timeout. This patch
make the existing dsvm-functional FT job to be separated to two jobs;
* dsvm-functional-legacy
* dsvm-functional-sol

This patch fixes the unstable FT results in zuul FT jobs:
* test_rollback_instantiate:
  ``depends_on`` in BaseHOT makes stable deletion of stacks, otherwise
  Heat fails to delete subnets due to missing dependency with ports.
* test_vnf_alarm_scale_with_instance_reservation:
   "--concurrency 1" enables to run test without any VMs on hosts,
  otherwise Blazar fails to add hosts into the freepool.

Changes:
* Split the FT directory to legacy and sol
* Create new tox envs for FT of legacy and of SOL
* Relative path are changed due to the new directory structure
* Add ``depends_on` parameter in BaseHOT
* Set "--concurrency 1" for both of the new FT jobs

Change-Id: I4c66353eada16f7e51d7ed1c1999cf50635b9dce
2021-01-19 15:47:41 +09:00