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

Fixed validation of configuration parameters. #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repositories {

group = "com.electriccloud"
description = "Plugins : EC-OpenStack"
version = "1.3.3"
version = "1.3.4"

apply plugin: 'groovy'
apply plugin: 'flow-gradle-plugin'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,9 @@ def doValidations(args) {
COMPUTE_SERVICE_URL, 'Compute Service URL',
COMPUTE_SERVICE_VERSION, 'Compute API Version', 'compute', errorList)

debug("Block storage url: " + BLOCK_STORAGE_URL + "\n");
debug("Block storage version: " + BLOCK_STORAGE_VERSION + "\n");

validateServiceURLAndVersion(args, serviceEndPoints,
BLOCK_STORAGE_URL, 'Block Storage URL',
BLOCK_STORAGE_VERSION, 'Block Storage API Version', 'volume', errorList)
Expand Down Expand Up @@ -379,7 +382,7 @@ private void validateServiceEndpoint(Map serviceEndPoints,
if (!serviceUrlValue || !serviceVersionValue) {
return
}

debug("ServiceEndPoints: " + serviceEndPoints);
def endpointUrls = serviceEndPoints.get(serviceType)
if (!endpointUrls) {
def error = [:]
Expand All @@ -390,8 +393,9 @@ private void validateServiceEndpoint(Map serviceEndPoints,
} else {
//check the specified end-point url and version against the endPointUrls from OpenStack
// find the end-point with the version passed in.
debug("Endpoints: " + endpointUrls);
String serviceUrlWithMatchingVersion = endpointUrls.find {
it.endsWith("/v$serviceVersionValue")
it == serviceUrlValue + '/v' + serviceVersionValue;
}
if (!serviceUrlWithMatchingVersion) {
//Specified version is not supported
Expand Down