Skip to content

Commit

Permalink
Update validate_credentials args doc
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Aug 15, 2019
1 parent ecbbb4b commit 43d34bb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
40 changes: 20 additions & 20 deletions app/models/manageiq/providers/amazon/cloud_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,42 +124,42 @@ def self.params_for_create
:title => "Configure AWS",
:fields => [
{
:component => "text-field",
:name => "role",
:type => "hidden",
:component => "text-field",
:name => "role",
:type => "hidden",
:initialValue => "ec2"
},
{
:component => "text-field",
:name => "region",
:label => "Region",
:component => "text-field",
:name => "region",
:label => "Region",
:isRequired => true,
:validate => [{:type => "required-validator"}]
:validate => [{:type => "required-validator"}]
},
{
:component => "text-field",
:name => "access_key",
:label => "Access Key",
:component => "text-field",
:name => "access_key",
:label => "Access Key",
:isRequired => true,
:validate => [{:type => "required-validator"}]
:validate => [{:type => "required-validator"}]
},
{
:component => "text-field",
:name => "secret_access_key",
:label => "Secret Key",
:type => "password",
:component => "text-field",
:name => "secret_access_key",
:label => "Secret Key",
:type => "password",
:isRequired => true,
:validate => [{:type => "required-validator"}]
:validate => [{:type => "required-validator"}]
},
{
:component => "text-field",
:name => "proxy_uri",
:label => "Proxy URI"
:name => "proxy_uri",
:label => "Proxy URI"
},
{
:component => "text-field",
:name => "assume_role",
:label => "Assume Role"
:name => "assume_role",
:label => "Assume Role"
}
]
}
Expand Down
8 changes: 5 additions & 3 deletions app/models/manageiq/providers/amazon/manager_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ module ClassMethods
# Validate Credentials
# args:
# {
# "region" => "",
# "access_key" => "",
# "secret_access_key" => ""
# "secret_access_key" => "",
# "region" => "",
# "proxy_uri => "",
# "assume_role" => ""
# }
def validate_credentials(args)
raw_connect(args["access_key"], args["secret_access_key"], "ec2",
args["region"], args["proxy_uri"], assume_role: args["assume_role"])
args["region"], args["proxy_uri"], :assume_role => args["assume_role"])
end

def raw_connect(access_key_id, secret_access_key, service, region,
Expand Down

0 comments on commit 43d34bb

Please sign in to comment.