Merge "No need to use getattr func to get a value"

This commit is contained in:
Zuul 2017-11-24 02:30:18 +00:00 committed by Gerrit Code Review
commit 08f3813482
3 changed files with 6 additions and 6 deletions

View File

@ -21,8 +21,8 @@ def upgrade(migrate_engine):
resource_routings = Table('resource_routings', meta, autoload=True)
pods = Table('pods', meta, autoload=True)
col_pod_id_fkey = getattr(resource_routings.c, 'pod_id')
col_pod_id_pkey = getattr(pods.c, 'pod_id')
col_pod_id_fkey = resource_routings.c.pod_id
col_pod_id_pkey = pods.c.pod_id
# In the migration script 002_resource.py, the pod_id string length in
# resource_routings table is 64, but pod_id string length in pods table

View File

@ -21,8 +21,8 @@ def upgrade(migrate_engine):
cached_endpoints = Table('cached_endpoints', meta, autoload=True)
pods = Table('pods', meta, autoload=True)
col_pod_id_fkey = getattr(cached_endpoints.c, 'pod_id')
col_pod_id_pkey = getattr(pods.c, 'pod_id')
col_pod_id_fkey = cached_endpoints.c.pod_id
col_pod_id_pkey = pods.c.pod_id
# In the migration script 001_init.py, the pod_id string length in
# cached_endpoints table is 64, but pod_id string length in pods table

View File

@ -21,8 +21,8 @@ def upgrade(migrate_engine):
shadow_agents = Table('shadow_agents', meta, autoload=True)
pods = Table('pods', meta, autoload=True)
col_pod_id_fkey = getattr(shadow_agents.c, 'pod_id')
col_pod_id_pkey = getattr(pods.c, 'pod_id')
col_pod_id_fkey = shadow_agents.c.pod_id
col_pod_id_pkey = pods.c.pod_id
# In the migration script 003_shadow_agent.py, the pod_id string length in
# shadow_agents table is 64, but pod_id string length in pods table