Bug 1780246 - Compute resource create with region through CLI does not have validation for invalid region
Summary: Compute resource create with region through CLI does not have validation for ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources - Azure
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.7.0
Assignee: Aditi Puntambekar
QA Contact: vijsingh
URL:
Whiteboard:
Depends On:
Blocks: 1775890
TreeView+ depends on / blocked
 
Reported: 2019-12-05 15:10 UTC by Aditi Puntambekar
Modified: 2020-04-14 13:28 UTC (History)
2 users (show)

Fixed In Version: tfm-rubygem-foreman_azure_rm-2.0.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:27:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28172 0 Normal Closed Compute resource create with region does not has validation for invalid type regions 2020-02-18 09:40:30 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:28:03 UTC

Description Aditi Puntambekar 2019-12-05 15:10:15 UTC
Description of problem:

Compute resource creation with region does not have validation for invalid type of regions in CLI.

i.e. a region could pass as "East_US", "EastUS", "East-US" however, valid one is 'eastus'(lower case)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

 # hammer compute-resource create --name CLI_Test1 --organization-id 1 --location-id 2 --provider AzureRM --app-ident "your-app-id" --secret-key "your_key_details" --sub-id "your_sub_id" --tenant "your_tenat_id" --region "East-US" 
Compute resource created.

 # hammer compute-resource create --name CLI_Test2 --organization-id 1 --location-id 2 --provider AzureRM --app-ident "your-app-id" --secret-key "your_key_details" --sub-id "your_sub_id" --tenant "your_tenat_id" --region "EastUS" 
Compute resource created.

 # hammer compute-resource create --name CLI_Test3 --organization-id 1 --location-id 2 --provider AzureRM --app-ident "your-app-id" --secret-key "your_key_details" --sub-id "your_sub_id" --tenant "your_tenat_id" --region "East_US" 
Compute resource created.

 # hammer compute-resource create --name CLI_Test4 --organization-id 1 --location-id 2 --provider AzureRM --app-ident "your-app-id" --secret-key "your_key_details" --sub-id "your_sub_id" --tenant "your_tenat_id" --region "eastus" 
Compute resource created.

Actual results:
Compute Resource is created.

Expected results:
Compute Resource should not be created. An error should be displayed stating Invalid region type. Please enter region in lowercase.

Additional info:

Comment 3 vijsingh 2019-12-17 10:14:14 UTC
ON_QA failed:

@Satellite 6.7.0 snap 6.0


Steps/Observation:

 - Validation is exists now however return message requires to update for 'special characters' as well along with an example.

 i.e.  
  
   using below:
  
    --region "east-us"  => shows return message  "Could not create the compute resource:  Region east-us must be lowercase."

    --region  "east_us"  => shows return message  "Could not create the compute resource:  Region east_us must be lowercase."

Comment 5 vijsingh 2020-01-17 11:13:10 UTC
ON_QA Verified

@Satellite 6.7.0 snap 8.0

Observation:

 - Validation exists:
   
   """
   Could not create the compute resource:
   Region EAST-east must be lowercase eg. 'eastus'. No special characters allowed.
   """

Comment 8 errata-xmlrpc 2020-04-14 13:27:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454


Note You need to log in before you can comment on or make changes to this bug.