The nova.openstack.common.cliutils Module

exception MissingArgs(missing)

Bases: exceptions.Exception

validate_args(fn, *args, **kwargs)

Check that the supplied args are sufficient for calling a function.

>>> validate_args(lambda a: None)
Traceback (most recent call last):
    ...
MissingArgs: An argument is missing
>>> validate_args(lambda a, b, c, d: None, 0, c=1)
Traceback (most recent call last):
    ...
MissingArgs: 2 arguments are missing
Parameters:
  • fn – the function to check
  • arg – the positional arguments supplied
  • kwargs – the keyword arguments supplied

Previous topic

The nova.objectstore.s3server Module

Next topic

The nova.openstack.common.context Module

This Page