Skip to content

Conversation

@Shruthi-1MN
Copy link
Contributor

@Shruthi-1MN Shruthi-1MN commented Nov 23, 2019

What this PR does / why we need it:
This PR has fix for the following bug #1066, #1067, #1069, #1070, #1071

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes # #1066, #1067, #1069, #1070, #1071

Special notes for your reviewer:
Following criteria's are covered
#1066 Creating file share snapshot name with other encoding characters(except utf-8)

root@shruthi-VirtualBox:~/go/github.com/opensds/opensds# osdsctl fileshare list
+--------------------------------------+------+-----------+-------------+------+-----------+--------------------------------------+---------------------+
| Id                                   | Name | Protocols | Description | Size | Status    | ProfileId                            | ExportLocations     |
+--------------------------------------+------+-----------+-------------+------+-----------+--------------------------------------+---------------------+
| 80968855-23cf-415e-825d-5de9301e58f0 | lp   | [nfs]     |             | 1    | available | a5600eae-3cc2-4534-8cce-757183e79017 | [10.0.2.15:/mnt/lp] |
+--------------------------------------+------+-----------+-------------+------+-----------+--------------------------------------+---------------------+
root@shruthi-VirtualBox:~/go/github.com/opensds/opensds# osdsctl fileshare snapshot create -n "İnanç Esasları" 80968855-23cf-415e-825d-5de9301e58f0
WARNING: OPENSDS_ENDPOINT is not specified, use default(http://localhost:50040)
WARNING: Not found Env OPENSDS_AUTH_STRATEGY, use default(noauth)
ERROR: Request body has an error: doesn't match the schema: Error at "/name":JSON string doesn't match the regular expression '^[\w\- ]+$'

#1067 Creating file share snapshot name having special characters

root@shruthi-VirtualBox:~/go/github.com/opensds/opensds# osdsctl fileshare snapshot create -n "snap&@test" 80968855-23cf-415e-825d-5de9301e58f0
WARNING: OPENSDS_ENDPOINT is not specified, use default(http://localhost:50040)
WARNING: Not found Env OPENSDS_AUTH_STRATEGY, use default(noauth)
ERROR: Request body has an error: doesn't match the schema: Error at "/name":JSON string doesn't match the regular expression '^[\w\- ]+$'

#1069 Creating file share snapshot name length more than 99 characters

root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# osdsctl fileshare snapshot create 49020c02-e172-4528-974a-ec81ddcc9372 -n "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkabcdefghighgh"
WARNING: OPENSDS_ENDPOINT is not specified, use default(http://localhost:50040)
WARNING: Not found Env OPENSDS_AUTH_STRATEGY, use default(noauth)
ERROR: Request body has an error: doesn't match the schema: Error at "/name":Maximum string length is 99

#1070 updating snapshot name special characters are not allowed

root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# osdsctl fileshare snapshot create 4a7c5888-1187-4b55-b804-4197cf99fc0a -n "test@sap$%"
ERROR: Request body has an error: doesn't match the schema: Error at "/name":JSON string doesn't match the regular expression '^[\w\- ]+$'

#1071 updating snapshot name should not be more than 99 characters

root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# osdsctl fileshare snapshot update c7a11193-1c46-4074-8cea-e0f4da52b60a -n "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkabcdefghighgh"
ERROR: Request body has an error: doesn't match the schema: Error at "/name":Maximum string length is 99

Release note:

@Shruthi-1MN Shruthi-1MN force-pushed the fileshare_snapshot_fixes branch 3 times, most recently from e635228 to bed645d Compare November 25, 2019 07:32
@codecov
Copy link

codecov bot commented Nov 25, 2019

Codecov Report

Merging #1086 into development will increase coverage by <.01%.
The diff coverage is n/a.

@@               Coverage Diff               @@
##           development    #1086      +/-   ##
===============================================
+ Coverage        34.92%   34.92%   +<.01%     
===============================================
  Files               97       97              
  Lines            17563    17551      -12     
===============================================
- Hits              6133     6129       -4     
+ Misses           10561    10555       -6     
+ Partials           869      867       -2
Impacted Files Coverage Δ
pkg/api/util/db.go 36.95% <ø> (+0.07%) ⬆️
@Shruthi-1MN Shruthi-1MN force-pushed the fileshare_snapshot_fixes branch 3 times, most recently from a21c1af to e5f63c2 Compare November 26, 2019 11:27
NajmudheenCT
NajmudheenCT previously approved these changes Nov 28, 2019
Copy link
Member

@NajmudheenCT NajmudheenCT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Shruthi-1MN Shruthi-1MN force-pushed the fileshare_snapshot_fixes branch from 866e3f8 to 71a0cc7 Compare December 11, 2019 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants