Add try/except block to rbac_rule_validation.

Right now, the tenant_id passed in to the rbac converter is vulnerable
to IndexError/AttributeError: rbac_rule_validation decorator
assumes that auth_provider.credentials.tenant_id is present in
args[0].

Also added __init__.py to tests.api.image.v2.

Change-Id: Ie47913c0adb686c2cdb2f7cbf71861a2b6591452
2 files changed