def try_get_tenant_by_id(self, tenant_id, default=None):

        tenants = self.keystone_client.tenants
        try:
            with proxy_client.expect_exception(ks_exceptions.NotFound):
                return tenants.get(tenant_id)
        except ks_exceptions.NotFound:
            if default is None:
                return self.get_tenant_by_name(self.config.cloud.tenant)
            else:
                return tenants.get(default)
Creates a new webhook. Returns the WebHook object created.
dataset/ETHPy150Open MirantisWorkloadMobility/CloudFerry/cloudferry/lib/os/identity/keystone.py/KeystoneIdentity.try_get_tenant_by_id--crossover with--dataset/ETHPy150Open sarumont/py-trello/trello/trelloclient.py/TrelloClient.create_hook