Open waynew opened 1 year ago
This is the behavior when using connect.get_service_instance
but a different handling/error is done when using connect.request
which is used by other modules. Not sure how profiles are supposed to work, is there any guide for using them?
See #351 for more info, but generally speaking there are two behaviors when using profiles that are just terrible.
A huge stack trace appears when doing something like
salt-call vmware_vm.list profile=fnord
and the profile doesn't exist.We could pretty easily catch a KeyError here and then look for profiles that might match, and provide a useful error/exit like "Profile 'fnord' does not exist. Perhaps you meant X?"
Alternatively, if you don't have any config data in the base and only have profiles, and do not provide a profile, you get this:
Also super useless.
Basically what we should do in this case is check if there's a host/user/pass, and if any of those things are missing then we should provide a useful message such as:
Or
Something to that effect.