Skip to content

Commit

Permalink
CLI only accepts resources that have a find_by method
Browse files Browse the repository at this point in the history
  • Loading branch information
jsmartt committed Feb 23, 2017
1 parent 5e92f8c commit cd03a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/oneview-sdk/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def parse_type(type)
r = OneviewSDK.resource_named(type, api_ver, variant)
# Try default API version as last resort
r ||= OneviewSDK.resource_named(type, OneviewSDK.api_version, variant) unless api_ver == OneviewSDK.api_version
return r if r
return r if r && r.respond_to?(:find_by)
valid_classes = []
api_module = OneviewSDK.const_get("API#{api_ver}")
api_module = api_module.const_get(variant.to_s) unless api_ver.to_i == 200
Expand Down

0 comments on commit cd03a04

Please sign in to comment.