Upload VNF Package from uri REST API accepts userName and password
parameter but internally these parameters are not used while getting
the csar zip file from the URI as specified in the addressInformation.
If the server serving the CSAR zip requires authentication, it would
return 401 error and the uploading vnf package will fail to set the VNF
package to onboarded status.
This patch uses userName and password parameters to set "Authorization"
header as shown below if these parameters are passed in the request body.
* The userName and password are combined with a single colon (:).
This means that the username itself cannot contain a colon.
* The resulting string is encoded using a variant of Base64.
* The authorization method (Basic and a space (e.g. "Basic ") is then
prepended to the encoded string.
For example, if userName and password is "xyz" and "xyzpassword", then
the field's value is the base64-encoding of xyz:xyzpassword, or
eHl6Onh5enBhc3N3b3Jk. Then the Authorization header will appear as:
Authorization: Basic eHl6Onh5enBhc3N3b3Jk
Change-Id: Ie79d5e4659951f41db4a1003950c649acab8b439
The GET method fetches the content of a VNF package identified by
the VNF package identifier allocated by the NFVO.
The 'HTTP_RANGE' header is inspected for a valid value.
If it is present and valid, then the package content within
the range is fetched.If not present the entire content is
fetched
A 'size' column has been added to vnf_packages db table.
When the VNF package content is uploaded, the size of the
csar zip is persisted in this newly added 'size' column of
vnf_packages db table.
When VNF_Package content is fetched for the first time, its size is
retrieved from glance store and the size column in vnf packages table
is populated with this value. For subsequent fetch calls the size of
csar file content is retrieved from 'size' column in vnf_packages
table.
A lot of the content fetching code has been reused from
glance/api/v2/image_data.py ResponseSerializer class
download function
Blueprint: bp/enhance-vnf-package-support-part1
Change-Id: Ib49ef8b1e81ca4a4b7e3ac4a0836c111ce7da4a3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Update local hacking checks for new flake8.
Remove hacking and friends from lower-constraints, they are not
needed in installations.
Change-Id: If787d610315be6c973b4335e047242c3aa3caf2a
As per ETSI GS NFV-SOL 005 V2.4.1 (2018-02) table 9.4.2.3.2-2, GET Vnf
Packages should return list of all Vnf packages, but as per current
implemention this api is returning dictionory with resource name as key
i.e {'vnf_packages': [{vnf_package1}, {vnf_package2},...]}. Hence
removing the resource key and returning api response as a list.
As per process to fix this issue we need to provide micro version
support in tacker as well as in python-tackerclient for command.
The list api was part of VNF package api which released in train cycle.
But we can not instantiate, terminate and Heal VNF as these feature is
not released yet and about to release in U cycle. The changes we have
proposed will be useful after U release and that is why we think we
should do these change without micro version support.
Closes-bug: #1871054
Change-Id: I7f5105fc7a49f9d31fb32119c725dae0421cfde7
Implement new method of VNF lifecycle management using LCM operation
user data.
Change-Id: Ib2fbe341b5d26758f0b48dc19e3e05810c2c830f
Blueprint: support-etsi-nfv-specs
Certain resource representations can become quite big, in particular
``GET /vnfpackages`` API which is a container for multiple sub-resources.
In these cases, it can be desired to reduce the amount of data exchanged
over the interface and processed by the API consumer application.
An attribute selector i.e filter, allows the API consumer to choose
which attributes it wants to be contained in the response. Only
attributes that are not required to be present, i.e. those with
a lower bound of zero on their cardinality (e.g. 0..1, 0..N)
and that are not conditionally mandatory, are allowed to be omitted
as part of the selection process.
This patch implements attribute filtering for ``GET /vnfpackages`` API.
It will support following query parameters:-
* filter: Filter criterion built with attributes of VNF Package and
REST operators.
* all_fields: Return all fields
* fields=<list> : Return fields specified in the <list>
* exclude_fields=<list>: Return fields not specified in the <list>
* exclude_default parameters: Return all fields except default fields
* exclude_default and fields=<list>: Return all fields except default
fields and fields in the <list>
* When no parameter is specified it is treated as exclude_default.
You can find more details about supported query parameters in document:
ETSI GS NFV-SOL 013 V2.6.1 (2019-03 in section 5.2 and 5.3
Co-Authored-By: Prashant Bhole <prashant.bhole@nttdata.com>
Change-Id: I1513d7d87967de5248787cd298c3bec65c2dde9d
Implements: bp/enhance-vnf-package-support-part1
Added functional tests for all support vnflcm APIs:-
1. Create Vnf instance API
2. Instantiate Vnf API
3. Heal Vnf API
4. Terminate Vnf API
5. List Vnf API
6. Show API
7. Delete API
Change-Id: Id8aff0f41caed6d52b20e7e5604dc28d8c56c567
blueprint: bp/support-etsi-nfv-specs
test_upload_from_file_and_delete functional test is failing
as the vnf package 'operationalState' is not DISABLED
before deletion.
To fix this issue, I have merged two existing FTs into new one
which will test the flow - create, upload, update, show and delete.
* Deleted existing FT
test_upload_from_file_and_delete
test_patch_in_onboarded_state
* Added new FT
test_upload_from_file_update_show_and_delete.
* Fixed get vnfd related functional tests by setting package
operational state to DISABLED before deleting
* assert_resp_contents method now uses assertCountEqual to compare
list of string as it ignores order of items in the list.
Closes-bug: #1866776
Change-Id: I310f4206527cfe215116f8d85acdb1f519d67a97
The VNFD can be implemented as a single file or as a collection of
multiple files. If the VNFD is implemented in the form of multiple
files, a ZIP file embedding these files shall be returned. If the VNFD
is implemented as a single file, either that file or a ZIP file
embedding that file shall be returned.
Implemented below API:-
* GET /vnf_packages/{vnfPkgId}/vnfd
Change-Id: I4af9c8126fb7478da294bc99a176eabba3944564
Implements: bp enhance-vnf-package-support-part1
Added API to update information of VNF package.
Implemented below API:-
* PATCH /vnf_packages/{vnfPkgId}
Co-authored-by: Shubham Potale <shubham.potale@nttdata.com>
Change-Id: I6d60e87b48a6703362dcd30975f300f524f8ca7a
Implements: bp enhance-vnf-package-support-part1
In functional test test_vnf_param_with_artifacts_image_tosca_template, heat create
task to fetch GlanceWebImage from param url value, and stuck in infinite loop of running
and sleeping task, due to which vnf creation could not be completed and VNF failed with
PENDING_CREATE. This issue occured due to bug #1847188, skipping test until bug fixed.
Change-Id: Ifeb3d46b8b78688687f53e2f17fecddef1ed4b3b
Adding functional test case for cmd_executer.py to check SSH
access after VNF is created.
Closes-Bug:#1592235
Change-Id: I4e5e677aad59fc3fe6ea37ef339044b10e5792da
If users specify parameters in 'flavor' or 'image' properties
of a VDU, HOT template can not be processed properly because
there is a missmatch between TOSCA and HOT template.
This patch will change 'get_input' to 'get_param' to fix that
issue.
Change-Id: I353e9d9d70dc6249a62dcdd1281b7b60d28d7d30
Closes-Bug: #1813135
Depends-On: Ib95ed31c70073cb732d41defe5bdc8027eadfeec
Currently Tacker usage a misxture of v2 v3 api, which is suboptimal
from both a performance and code-elegance perspective. In this patch
we refactor v2 apis from code.
Change-Id: I981887f3f5af6356aba45a6d128d3e4b23b10286
Implements: blueprint keystone-v3
In order to achieve py3-first goals, upgrading code base that will be
compatible with py3 as well as py2.
Change-Id: I562c63c576cc2f5dc5d93b5ec6741152e1f80466
As yaml strings had been depricated. In this patch redactor
functional test cases for depricated yaml strings and provide
tosca dict as input for create_vnfd.
Change-Id: I5d7411200c2cbff5a002dfa2d5e36a65d6b39332
Partial-Bug: #1634376
At present the VNF mgmt IP address is assigned to parameter name
of "mgmt_url". In this patch it is changed to "mgmt_ip_address"
which will be relevant one
Co-Authored-By: Dharmendra Kushwaha <dharmendra.kushwaha@india.nec.com>
Change-Id: I621b71d4af96a4bfa0f27442efe4d302c5afa96d
Partial-Bug: #1648327
This patch adds below functionality:
- New policy action ``vdu_autoheal`` for recovering failed VDUs
as reported by the respective monitoring driver configured in
the monitoring policy of the VNFD template.
- Add unit/functional tests.
- Added oslo_versioned library to implement HealVnfRequest object.
Note: The implementation of vdu_autoheal policy action will support
HealVnfRequest interface as mentioned in the ETSI standard [1]
[1]: https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/02.05.01_60/gs_NFV-SOL003v020501p.pdf
Implements: blueprint vdu-auto-healing
Change-Id: If62acbdac41c92842de0ae3b7dedcda9fd1f86e6
This removes usage of deprecated Ceilometer API
1. Changing trigger type from "OS::Ceilometer::Alarm"
to "OS::Aodh::GnocchiAggregationByResourcesAlarm"
2. Add "resource_type" fixed with value "instance"
3. Change some paramters (meter_name-> metric,
statistic ->aggregation_method, period-> granularity)
4. Change value from "average" to "mean" in method to
compare to the threshold
Change-Id: I486c14cbc9d05a0e826bbef1ad181bdcb2d8c951
Closes-Bug: #1735484
- This patch aims to add support for following placement policies in
addition to the default 'affinity' policy:
anti-affinity
soft-affinity
soft-anti-affinity
- This patch adds respective functional/unit test cases. To test
"anti-affinity" policy on the gate, changed the devstack functional
jobs `nodeset` from the default single node to "openstack-two-node".
- This patch also adds respective documentation and usage guide for
the above added policies.
Depends-On: I56a9cf4bb553c8026eec73212a3742d5eab17420
Co-Author: tpatil <tushar.vitthal.patil@gmail.com>
Implements: blueprint vdu-affinity-policy
Change-Id: I18aaa9d00c8539ccc60cb6e70570dee124df70a3
devstack is using apache as a ssl proxy for wsgi api service.
Current tacker does not support it. We remove it for the time being
This patch also skip scale unit tests which failed due to
heat translator change. The unit test will be enabled at
another patch.
Change-Id: If767d05a0241888663f0ff21282cebfd256efb49
Closes-bug: 1755664
While deploying a vnf with autoscaling, heat translator failed with
premission denied error. This issue occured because [1] opening file
in root dir (i.e. '/'), due to which it giving permission denied.
Fixing it by setting current working dir as '/temp'
[1]: https://github.com/openstack/heat-translator/blob/master/translator/hot/tosca_translator.py#L69
Change-Id: Ib2b0fd6c4c32a523b9fb25f47eae19225b84439f
Closes-bug: #1749394
Tacker uses the class path+file name+uuid as stack names to
uniquely identify the stacks for vnf create and vnf respawn workflow.
Tacker now mandates VNF names to be provided in API layer and will be
made unique. It is useful to base stack names based on vnf names for
debugging purposes. This affects the naming of nova instances as well.
Change-Id: If043ad8c6c356f3fa1d2f5648d3d861ff5006602
Closes-Bug: #1590215
This patch adds support to attach volumes to VDU.
This patch does not deal with boot from volume case.
Change-Id: I4bee80610eaa4e2ec8a1ccb2a5d36fb723a09806
Implements: persistent-block-storage
1. scaling and monitoring policy nodes got failed
From tosca-parser 0.8.0, tosca nodes required to be validated.
Unfortunately, the scaling and monitoring policies are not fully
leveraged tosca-parser. This patch will fix this issue.
2. Multiple alarm actions support
Closes-bug: #1682098
Change-Id: I29cb35edfe2447628fa93c64583e5cb4f7bee2f8
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: I4e8ec8405a291300aa6749cf814ad582786c285d
Closes-bug: #1681032
1. Add new option 'use_barbican' in config file [vim_keys] section,
default value is False for Pike.
2. Use fernet to encrypt vim password, and save the fernet key into
barbican as a secret.
3. Add new fields 'key_type', 'secret_uuid' into VimAuth.auth_cred
json string. secret_uuid is masked in vim-show or vim-list response.
4. Set the vim's default 'shared' value to False,
vim can only be used by who created it.
5. Add a devref to show how to test.
6. Add a release note.
Implements: blueprint encryption-with-barbican
Partial-bug: #1667652
Change-Id: I5c779041df5a08a361b9aaefac7d241369732551
This replaces the deprecated (in python 3.2) unittest.TestCase
method assertRaisesRegexp() with assertRaisesRegex().
Change-Id: Ic04e7406610a3b3f1232bc08c0b1ce94adb06827
Closes-Bug: #1436957
After deleting a resource, while trying to create again with same
name, it was throwing error as DuplicateEntity.
Fixing this issue by adding unique constraint on deleted_at.
Change-Id: I0e31346a471556f08c4fc5a6cc7bc130a133c24d
Closes-bug: #1680689
update to VIM attributes like, 'name', 'description' and 'is_default'
must not require config file.
This change addresses this issue.
client-side-fix: https://review.openstack.org/#/c/450100/
Closes-Bug: #1637360
Change-Id: I12b57f3a60e5a771f607de965f2ea8f4f37cdbf6
and monitoring policcies
Tosca-parser was released. This made scaling policy node and
monitoring policy node failed.
Change-Id: I617f34ffeb68f24899786345e823bb022f1aaf13
This patch is expected to have the separation of tosca driver
in the future.
Implements blueprint: #tosca-engine
Change-Id: Ieab0964f9a5936611a9b2288f2d6d44a42a725de
Replace yaml.dump with yaml.safe_dump;
In the file
/vnfm/infra_drivers/openstack/translate_template.py#L453
/vnfm/tosca/utils.py#L267
The default yaml.safe_dump does not support OrderedDict,
So Add one function for the yaml.safe_dump in the files above
yaml.safe_load is more safer than yaml.load, that's the patch meaning
Change-Id: Iab0e976b1163220bd78c2ceda83243c2da4c6624
Closes-Bug: #1673294
The heat OS::Glance::Image is relying on glance v1, and
the heat resource type is deprecated.
Devstack disables glance v1 API at https://review.openstack.org/#/c/343129/.
Skip this test until heat has new glance image resource type.
Change-Id: I4b1b127fc804fa9b93fff6b835bc2d5b8fa9aa4f
Closes-bug: 1673099