def error(message, level="error", exit_code=1, **kwargs):
    kwargs["fg"] = kwargs.get("fg", "red")
    click.secho(u"error: {}".format(message), **kwargs)
    sys.exit(exit_code)
def encode(self):
        return {
            'af': ip_address(self.gaddr).vapi_af,
            'grp_address': {
                ip_address(self.gaddr).vapi_af_name: self.gaddr
            },
            'src_address': {
                ip_address(self.saddr).vapi_af_name: self.saddr
            },
            'grp_address_length': self.glen,
        }