Did I find the right examples for you? yes no

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)

src/p/y/python-ironicclient-0.1.4/ironicclient/shell.py   python-ironicclient(Download)
        if not (args.os_auth_token and args.ironic_url):
            if not args.os_username:
                raise exc.CommandError(_("You must provide a username via "
                                         "either --os-username or via "
                                         "env[OS_USERNAME]"))
 
            if not args.os_password:
                raise exc.CommandError(_("You must provide a password via "
 
            if not (args.os_tenant_id or args.os_tenant_name):
                raise exc.CommandError(_("You must provide a tenant_id via "
                                         "either --os-tenant-id or via "
                                         "env[OS_TENANT_ID]"))
 
            if not args.os_auth_url:
                raise exc.CommandError(_("You must provide an auth url via "
            args.func(client, args)
        except exc.Unauthorized:
            raise exc.CommandError(_("Invalid OpenStack Identity credentials"))
 
    @utils.arg('command', metavar='<subcommand>', nargs='?',

src/p/y/python-ironicclient-0.1.4/ironicclient/common/utils.py   python-ironicclient(Download)
                {'class': manager.resource_class.__name__.lower(),
                 'nameid': name_or_id})
        raise exc.CommandError(msg)
 
 
        except ValueError:
            raise exc.CommandError(
                _('%(key)s must be a list of KEY=VALUE not "%(values)s"') %
                {'key': key_to_convert, 'values': values_to_convert})
    return kwargs
                patch.append({'op': op, 'path': path, 'value': value})
            except ValueError:
                raise exc.CommandError(_('Attributes must be a list of '
                                         'PATH=VALUE not "%s"') % attr)
        elif op == "remove":
            # For remove only the key is needed
            patch.append({'op': op, 'path': attr})
        else:
            raise exc.CommandError(_('Unknown PATCH operation: %s') % op)