Py3.7 unit test failures
Bug #1785283 reported by
Corey Bryant
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-manilaclient |
Fix Released
|
Undecided
|
Goutham Pacha Ravi |
Bug Description
The following unit tests are failing with Py3.7:
https:/
https:/
https:/
description: | updated |
Changed in python-manilaclient: | |
assignee: | nobody → Goutham Pacha Ravi (gouthamr) |
To post a comment you must log in.
Interesting, in 3.7, urllib.parse's behavior changed [2] in-line with RFC 3986 [2], making these unit tests break in 3.7.
[1] https:/ /tools. ietf.org/ html/rfc3986. html /docs.python. org/3/library/ urllib. parse.html# url-quoting
[2] https:/
Manila's url parsing accepts "~" as a safe character, see tests below. So, I think we can stop encoding the "~" character - however, "six.moves. parse.urlencode " in python2 is urllib.urlencode which doesn't allow specifying "safe" characters that it can ignore in the encoding.. So I suspect the fix will be ugly.
(overcloud) [stack@undercloud-0 ~]$ manila list --all-tenants ------- ------- ------- ------- ----+-- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ------- ------- ------- ------- -----+- ------- ------- ----+-- ------- ------- ------- ------- ----+ ------- ------- ------- ------- ----+-- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ------- ------- ------- ------- -----+- ------- ------- ----+-- ------- ------- ------- ------- ----+ ffb6-4b18- 9d14-3a14ad70db 7b | test | 1 | NFS | available | False | default | hostgroup@ tripleo_ netapp# aggr1_n1 | nova | 03ec49a9757e4b5 39257d10e86f9fe da | ------- ------- ------- ------- ----+-- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ------- ------- ------- ------- -----+- ------- ------- ----+-- ------- ------- ------- ------- ----+
+------
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | Project ID |
+------
| 0f706d5a-
+------
# Let's see if we get the same result with cURL:
(overcloud) [stack@undercloud-0 ~]$ curl -i -X GET http:// 10.0.0. 101:8786/ v2/03ec49a9757e 4b539257d10e86f 9feda/shares/ detail? name~=test -H "X-Openstack- Manila- Api-Version: 2.42" -H "X-Auth-Token: gAAAAABbbeiM1ew UBQQDo51WGK43wG 1WESUvyL_ pbJxWAk6Trf2jHk wupM-W66a9LKfAt LEvDLktUMN6n0AK yhEOdPGlFq0OMMZ filP5kDlFDus7QL DxqgSLbn6B7N_ JBjYmEHIWCnDa4y qctpo_pPOXEhPWZ _qNkJWVs6mevnwx gHOj3fHPGNQ" -H "Accept: application/json" -H "User-Agent: python- manilaclient" Request- Id: req-5d09fef2- 87ca-4759- a683-1df203f6c4 fc Manila- Api-Version: 2.42 Manila- API-Version
HTTP/1.1 200 OK
X-Compute-
Content-Type: application/json
Content-Length: 1173
X-Openstack-
Vary: X-OpenStack-
Date: Fri, 10 Aug 2018 19:34:15 GMT
{"shares": [{"status": "available", "share_type_name": "default", "description": null, "links": [{"href": "http:// 10.0.0. 101:8786/ v2/03ec49a9757e 4b539257d10e86f 9feda/shares/ 0f706d5a- ffb6-4b18- 9d14-3a14ad70db 7b", "rel": "self"}, {"href": "http:// 10.0.0. 101:8786/ 03ec49a9757e4b5 39257d10e86f9fe da/shares/ 0f706d5a- ffb6-4b18- 9d14-3a14ad70db 7b", "rel": "bookmark"}], "availability_ zone": "nova", "share_network_id": null, "share_server_id": null, "share_group_id": null, "host": "hostgroup@ tripleo_ netapp# aggr1_n1" , "revert_ to_snapshot_ support" : false, "access_ rules_status" : "active", "snapshot_id": null, "create_ share_from_ snapshot_ support" : true, "is_public": false, "task_state": null, "snapshot_support": true, "id": "0f706d5a- ffb6-4b18- 9d14-3a14ad70db 7b", "size": 1, "source_ share_group_ snapshot_ member_ id": null, "user_id": "b09f...