Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snapshot fixes #1086

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

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%) ⬆️

pkg/utils/utils.go Outdated Show resolved Hide resolved
testutils/collection/data.go Outdated Show resolved Hide resolved
@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

@skdwriting skdwriting removed this from In progress in Hotpot API Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants