You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wi...@apache.org on 2014/04/24 21:03:33 UTC

git commit: Upgrade pants and commons, fix python thrift namespace so that it does not conflict.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master ee60ff54a -> ddd2329ea


Upgrade pants and commons, fix python thrift namespace so that it does not conflict.

Pins twitter.common on 0.3.0 (save twitter.common.python which is released
out of band.)

Upgrades aurora to twitter.pants 0.0.21 which uses
twitter.common.python==0.5.4 and produces wheels.

Updates the thrift python namespaces so that the autogenerated python
artifacts do not clobber each other.

Reviewed at https://reviews.apache.org/r/20583/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/ddd2329e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/ddd2329e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/ddd2329e

Branch: refs/heads/master
Commit: ddd2329eaefa780a680ed34e1aecb9c5240f03dd
Parents: ee60ff5
Author: Brian Wickman <wi...@apache.org>
Authored: Thu Apr 24 12:02:00 2014 -0700
Committer: Brian Wickman <wi...@apache.org>
Committed: Thu Apr 24 12:02:00 2014 -0700

----------------------------------------------------------------------
 3rdparty/python/BUILD                           | 48 ++++++++++----------
 BUILD                                           | 10 +++-
 build-support/pex                               |  2 +-
 pants                                           |  2 +-
 pants.ini                                       |  2 +-
 .../apache/aurora/admin/host_maintenance.py     |  2 +-
 .../python/apache/aurora/client/api/__init__.py |  4 +-
 .../apache/aurora/client/api/command_runner.py  |  4 +-
 .../apache/aurora/client/api/health_check.py    |  2 +-
 .../aurora/client/api/instance_watcher.py       |  2 +-
 .../apache/aurora/client/api/job_monitor.py     |  4 +-
 .../apache/aurora/client/api/quota_check.py     |  2 +-
 .../apache/aurora/client/api/restarter.py       |  4 +-
 .../aurora/client/api/scheduler_client.py       |  4 +-
 src/main/python/apache/aurora/client/api/sla.py |  4 +-
 .../python/apache/aurora/client/api/updater.py  |  4 +-
 src/main/python/apache/aurora/client/base.py    |  2 +-
 .../python/apache/aurora/client/cli/__init__.py |  5 +-
 .../python/apache/aurora/client/cli/context.py  |  2 +-
 .../python/apache/aurora/client/cli/jobs.py     |  4 +-
 .../python/apache/aurora/client/cli/quota.py    |  2 +-
 .../python/apache/aurora/client/cli/task.py     |  4 +-
 .../apache/aurora/client/commands/admin.py      |  4 +-
 .../apache/aurora/client/commands/core.py       | 10 ++--
 src/main/python/apache/aurora/client/config.py  |  2 +-
 .../apache/aurora/client/hooks/hooked_api.py    |  2 +-
 .../apache/aurora/common/aurora_job_key.py      |  4 +-
 .../apache/aurora/common/auth/auth_module.py    |  2 +-
 .../aurora/common/auth/auth_module_manager.py   |  2 +-
 .../python/apache/aurora/config/schema/base.py  |  2 +-
 src/main/python/apache/aurora/config/thrift.py  |  4 +-
 .../apache/aurora/executor/common/task_info.py  |  2 +-
 .../apache/aurora/executor/executor_vars.py     |  5 +-
 .../apache/aurora/executor/gc_executor.py       |  4 +-
 .../python/apache/thermos/testing/runner.py     |  6 +++
 src/main/thrift/org/apache/aurora/gen/BUILD     |  1 -
 .../thrift/org/apache/aurora/gen/api.thrift     |  2 +-
 .../aurora/admin/test_host_maintenance.py       |  2 +-
 .../aurora/client/api/test_disambiguator.py     |  4 +-
 .../aurora/client/api/test_health_check.py      |  2 +-
 .../aurora/client/api/test_instance_watcher.py  |  4 +-
 .../aurora/client/api/test_job_monitor.py       | 11 ++++-
 .../aurora/client/api/test_quota_check.py       |  4 +-
 .../apache/aurora/client/api/test_restarter.py  |  4 +-
 .../aurora/client/api/test_scheduler_client.py  |  8 ++--
 .../python/apache/aurora/client/api/test_sla.py |  6 +--
 .../apache/aurora/client/api/test_updater.py    |  6 +--
 .../aurora/client/cli/test_cancel_update.py     |  2 +-
 .../apache/aurora/client/cli/test_create.py     |  2 +-
 .../apache/aurora/client/cli/test_diff.py       |  4 +-
 .../apache/aurora/client/cli/test_kill.py       |  2 +-
 .../apache/aurora/client/cli/test_logging.py    |  2 +-
 .../apache/aurora/client/cli/test_plugins.py    |  2 +-
 .../apache/aurora/client/cli/test_quota.py      |  2 +-
 .../apache/aurora/client/cli/test_restart.py    |  2 +-
 .../apache/aurora/client/cli/test_status.py     |  2 +-
 .../apache/aurora/client/cli/test_task_run.py   |  2 +-
 .../apache/aurora/client/cli/test_update.py     |  4 +-
 .../python/apache/aurora/client/cli/util.py     |  2 +-
 .../client/commands/test_cancel_update.py       |  2 +-
 .../aurora/client/commands/test_create.py       |  2 +-
 .../apache/aurora/client/commands/test_diff.py  |  4 +-
 .../apache/aurora/client/commands/test_hooks.py |  2 +-
 .../apache/aurora/client/commands/test_kill.py  |  2 +-
 .../aurora/client/commands/test_listjobs.py     |  2 +-
 .../aurora/client/commands/test_maintenance.py  |  2 +-
 .../aurora/client/commands/test_restart.py      |  2 +-
 .../apache/aurora/client/commands/test_run.py   |  4 +-
 .../apache/aurora/client/commands/test_ssh.py   |  4 +-
 .../aurora/client/commands/test_status.py       |  2 +-
 .../aurora/client/commands/test_update.py       |  4 +-
 .../apache/aurora/client/commands/util.py       |  2 +-
 .../python/apache/aurora/client/test_config.py  |  2 +-
 .../python/apache/aurora/config/test_base.py    |  2 +-
 .../python/apache/aurora/config/test_thrift.py  | 12 ++---
 .../aurora/executor/common/test_task_info.py    |  2 +-
 .../apache/aurora/executor/test_gc_executor.py  |  4 +-
 .../aurora/executor/test_thermos_executor.py    |  4 +-
 .../sh/org/apache/aurora/e2e/test_end_to_end.sh |  3 +-
 79 files changed, 166 insertions(+), 147 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/3rdparty/python/BUILD
----------------------------------------------------------------------
diff --git a/3rdparty/python/BUILD b/3rdparty/python/BUILD
index 70fb09d..de7d93f 100644
--- a/3rdparty/python/BUILD
+++ b/3rdparty/python/BUILD
@@ -14,6 +14,8 @@
 # limitations under the License.
 #
 
+COMMONS_VERSION = '0.3.0'
+
 python_requirement('argparse==1.2.1')
 python_requirement('bottle==0.11.6')
 python_requirement('cherrypy==3.2.2')
@@ -26,27 +28,27 @@ python_requirement('psutil==1.1.2')
 python_requirement('pystachio==0.7.2')
 python_requirement('pyyaml==3.10')
 python_requirement('thrift==0.9.1')
-python_requirement('twitter.common.app==0.1.0')
-python_requirement('twitter.common.collections==0.1.0')
-python_requirement('twitter.common.concurrent==0.1.0')
-python_requirement('twitter.common.config==0.1.0')
-python_requirement('twitter.common.confluence==0.1.0')
-python_requirement('twitter.common.contextutil==0.1.0')
-python_requirement('twitter.common.decorators==0.1.0')
-python_requirement('twitter.common.dirutil==0.1.0')
-python_requirement('twitter.common.exceptions==0.1.0')
-python_requirement('twitter.common.http==0.1.0')
-python_requirement('twitter.common.lang==0.1.0')
-python_requirement('twitter.common.log==0.1.0')
-python_requirement('twitter.common.metrics==0.1.0')
-python_requirement('twitter.common.options==0.1.0')
-python_requirement('twitter.common.process==0.1.0')
-python_requirement('twitter.common.python==0.2.0')
-python_requirement('twitter.common.quantity==0.1.0')
-python_requirement('twitter.common.recordio==0.1.2')
-python_requirement('twitter.common.rpc==0.1.2')
-python_requirement('twitter.common.string==0.1.0')
-python_requirement('twitter.common.testing==0.1.0')
-python_requirement('twitter.common.util==0.1.0')
-python_requirement('twitter.common.zookeeper==0.1.1')
+python_requirement('twitter.common.app==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.collections==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.concurrent==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.config==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.confluence==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.contextutil==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.decorators==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.dirutil==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.exceptions==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.http==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.lang==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.log==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.metrics==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.options==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.process==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.python==0.3.1')
+python_requirement('twitter.common.quantity==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.recordio==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.rpc==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.string==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.testing==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.util==%s' % COMMONS_VERSION)
+python_requirement('twitter.common.zookeeper==%s' % COMMONS_VERSION)
 python_requirement('watchdog==0.7.0')

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/BUILD
----------------------------------------------------------------------
diff --git a/BUILD b/BUILD
index c075158..29af3cd 100644
--- a/BUILD
+++ b/BUILD
@@ -13,4 +13,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-maven_layout()
+
+source_root('src/main/python', Page, PythonBinary, PythonLibrary)
+source_root('src/main/thrift', Page, PythonLibrary, PythonThriftLibrary)
+
+# TODO(wickman) get rid of PythonLibrary from src/test/python:
+#   src/test/python/apache/aurora/client/BUILD:python_library(
+#   src/test/python/apache/aurora/client/cli/BUILD:python_library(
+#   src/test/python/apache/aurora/client/commands/BUILD:python_library(
+source_root('src/test/python', Page, PythonTests, PythonTestSuite, PythonLibrary)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/build-support/pex
----------------------------------------------------------------------
diff --git a/build-support/pex b/build-support/pex
index 8a1574c..19c3321 100755
--- a/build-support/pex
+++ b/build-support/pex
@@ -17,7 +17,7 @@
 # Wrapper script for self-bootstrapping pex.
 set -e
 
-TWITTER_COMMON_PYTHON_VERSION=0.3.1
+TWITTER_COMMON_PYTHON_VERSION=0.5.4
 HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
 
 if ! [ -f "$HERE/pex.venv/BOOTSTRAPPED" ] || \

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/pants
----------------------------------------------------------------------
diff --git a/pants b/pants
index 5684730..3825d7d 100755
--- a/pants
+++ b/pants
@@ -19,7 +19,7 @@ set -o nounset
 
 HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
 
-PANTS_VERSION=0.0.14-dev2
+PANTS_VERSION=0.0.21
 if ! [[ -e "$HERE/build-support/pants-$PANTS_VERSION.pex" ]]; then
   echo "Building pants.pex @ $PANTS_VERSION"
   "$HERE/build-support/pex" \

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/pants.ini
----------------------------------------------------------------------
diff --git a/pants.ini b/pants.ini
index 5e85d50..e63df4f 100644
--- a/pants.ini
+++ b/pants.ini
@@ -81,7 +81,7 @@ download_cache: %(pants_workdir)s/python/downloads
 install_cache: %(pants_workdir)s/python/eggs
 interpreter_cache: %(pants_workdir)s/python/interpreters
 platforms: ['current']
-setuptools_version: 1.1.7
+setuptools_version: 2.2
 
 
 [python-repos]

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/admin/host_maintenance.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/admin/host_maintenance.py b/src/main/python/apache/aurora/admin/host_maintenance.py
index 6a21dde..699caed 100644
--- a/src/main/python/apache/aurora/admin/host_maintenance.py
+++ b/src/main/python/apache/aurora/admin/host_maintenance.py
@@ -20,7 +20,7 @@ import time
 from apache.aurora.client.api import AuroraClientAPI
 from apache.aurora.client.base import check_and_log_response
 
-from gen.apache.aurora.ttypes import Hosts, MaintenanceMode
+from gen.apache.aurora.api.ttypes import Hosts, MaintenanceMode
 
 from twitter.common import log
 from twitter.common.quantity import Amount, Time

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/__init__.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/__init__.py b/src/main/python/apache/aurora/client/api/__init__.py
index ecc3742..d8a2327 100644
--- a/src/main/python/apache/aurora/client/api/__init__.py
+++ b/src/main/python/apache/aurora/client/api/__init__.py
@@ -20,8 +20,8 @@ from apache.aurora.common.aurora_job_key import AuroraJobKey
 from apache.aurora.common.auth import make_session_key
 from apache.aurora.common.cluster import Cluster
 
-from gen.apache.aurora.constants import LIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import LIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     Response,
     Identity,
     ResourceAggregate,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/command_runner.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/command_runner.py b/src/main/python/apache/aurora/client/api/command_runner.py
index f7605f4..1af6a78 100644
--- a/src/main/python/apache/aurora/client/api/command_runner.py
+++ b/src/main/python/apache/aurora/client/api/command_runner.py
@@ -23,8 +23,8 @@ from apache.aurora.config.schema.base import MesosContext
 from apache.aurora.common.cluster import Cluster
 from apache.thermos.config.schema import ThermosContext
 
-from gen.apache.aurora.constants import LIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import LIVE_STATES
+from gen.apache.aurora.api.ttypes import (
   Identity,
   ResponseCode,
   TaskQuery)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/health_check.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/health_check.py b/src/main/python/apache/aurora/client/api/health_check.py
index de7dc69..e3bbf71 100644
--- a/src/main/python/apache/aurora/client/api/health_check.py
+++ b/src/main/python/apache/aurora/client/api/health_check.py
@@ -18,7 +18,7 @@ from abc import abstractmethod
 
 from apache.aurora.common.http_signaler import HttpSignaler
 
-from gen.apache.aurora.ttypes import ScheduleStatus
+from gen.apache.aurora.api.ttypes import ScheduleStatus
 
 from twitter.common import log
 from twitter.common.lang import Interface

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/instance_watcher.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/instance_watcher.py b/src/main/python/apache/aurora/client/api/instance_watcher.py
index d7db426..5308683 100644
--- a/src/main/python/apache/aurora/client/api/instance_watcher.py
+++ b/src/main/python/apache/aurora/client/api/instance_watcher.py
@@ -16,7 +16,7 @@
 
 import time
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
   Identity,
   ResponseCode,
   ScheduleStatus,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/job_monitor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/job_monitor.py b/src/main/python/apache/aurora/client/api/job_monitor.py
index 537e417..b694ef6 100644
--- a/src/main/python/apache/aurora/client/api/job_monitor.py
+++ b/src/main/python/apache/aurora/client/api/job_monitor.py
@@ -16,11 +16,11 @@
 
 import time
 
-from gen.apache.aurora.constants import (
+from gen.apache.aurora.api.constants import (
     LIVE_STATES,
     TERMINAL_STATES
 )
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Identity,
     TaskQuery
 )

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/quota_check.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/quota_check.py b/src/main/python/apache/aurora/client/api/quota_check.py
index c58bc4b..da8e38e 100644
--- a/src/main/python/apache/aurora/client/api/quota_check.py
+++ b/src/main/python/apache/aurora/client/api/quota_check.py
@@ -18,7 +18,7 @@ import operator
 
 from copy import deepcopy
 
-from gen.apache.aurora.ttypes import ResourceAggregate, Response, ResponseCode
+from gen.apache.aurora.api.ttypes import ResourceAggregate, Response, ResponseCode
 
 from twitter.common import log
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/restarter.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/restarter.py b/src/main/python/apache/aurora/client/api/restarter.py
index d060c1b..ddaec5c 100644
--- a/src/main/python/apache/aurora/client/api/restarter.py
+++ b/src/main/python/apache/aurora/client/api/restarter.py
@@ -14,8 +14,8 @@
 # limitations under the License.
 #
 
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import ResponseCode
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import ResponseCode
 
 from .instance_watcher import InstanceWatcher
 from .updater_util import FailureThreshold

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/scheduler_client.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/scheduler_client.py b/src/main/python/apache/aurora/client/api/scheduler_client.py
index d0e0821..b298d8f 100644
--- a/src/main/python/apache/aurora/client/api/scheduler_client.py
+++ b/src/main/python/apache/aurora/client/api/scheduler_client.py
@@ -22,8 +22,8 @@ import traceback
 from apache.aurora.common.auth import make_session_key, SessionKeyError
 from apache.aurora.common.cluster import Cluster
 
-from gen.apache.aurora import AuroraAdmin
-from gen.apache.aurora.constants import CURRENT_API_VERSION
+from gen.apache.aurora.api import AuroraAdmin
+from gen.apache.aurora.api.constants import CURRENT_API_VERSION
 
 from pystachio import Boolean, Default, Integer, String
 from thrift.protocol import TBinaryProtocol

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/sla.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/sla.py b/src/main/python/apache/aurora/client/api/sla.py
index c381de4..bb705ca 100644
--- a/src/main/python/apache/aurora/client/api/sla.py
+++ b/src/main/python/apache/aurora/client/api/sla.py
@@ -23,8 +23,8 @@ from copy import deepcopy
 from apache.aurora.client.base import check_and_log_response
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 
-from gen.apache.aurora.constants import LIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import LIVE_STATES
+from gen.apache.aurora.api.ttypes import (
   Identity,
   Response,
   ResponseCode,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/api/updater.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/api/updater.py b/src/main/python/apache/aurora/client/api/updater.py
index 9739af0..0acf450 100644
--- a/src/main/python/apache/aurora/client/api/updater.py
+++ b/src/main/python/apache/aurora/client/api/updater.py
@@ -18,8 +18,8 @@ import json
 from collections import namedtuple
 from difflib import unified_diff
 
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AddInstancesConfig,
     JobKey,
     Identity,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/base.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/base.py b/src/main/python/apache/aurora/client/base.py
index a33e65c..9136e37 100644
--- a/src/main/python/apache/aurora/client/base.py
+++ b/src/main/python/apache/aurora/client/base.py
@@ -20,7 +20,7 @@ import optparse
 import sys
 from urlparse import urljoin
 
-from gen.apache.aurora.ttypes import ResponseCode
+from gen.apache.aurora.api.ttypes import ResponseCode
 
 from twitter.common import app, log
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/cli/__init__.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/__init__.py b/src/main/python/apache/aurora/client/cli/__init__.py
index 5a10328..8f68501 100644
--- a/src/main/python/apache/aurora/client/cli/__init__.py
+++ b/src/main/python/apache/aurora/client/cli/__init__.py
@@ -40,7 +40,6 @@ import sys
 from uuid import uuid1
 
 from twitter.common.python.pex import PexInfo
-from twitter.common.python.dirwrapper import PythonDirectoryWrapper
 
 # Constants for standard return codes.
 EXIT_OK = 0
@@ -75,10 +74,10 @@ def print_aurora_log(sev, msg, *args, **kwargs):
 def get_client_version():
   try:
     pexpath = sys.argv[0]
-    pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(pexpath))
+    pex_info = PexInfo.from_pex(pexpath)
     return ("%s@%s" % (pex_info.build_properties.get('sha', 'unknown'),
         pex_info.build_properties.get('date', 'unknown')))
-  except (IOError, PythonDirectoryWrapper.Error):
+  except (IOError, OSError):
     return "VersionUnknown"
 
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/cli/context.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/context.py b/src/main/python/apache/aurora/client/cli/context.py
index 957c788..609285a 100644
--- a/src/main/python/apache/aurora/client/cli/context.py
+++ b/src/main/python/apache/aurora/client/cli/context.py
@@ -32,7 +32,7 @@ from apache.aurora.client.cli import (
 from apache.aurora.client.config import get_config
 from apache.aurora.client.factory import make_client
 
-from gen.apache.aurora.ttypes import ResponseCode
+from gen.apache.aurora.api.ttypes import ResponseCode
 
 from twitter.common import log
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/cli/jobs.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/jobs.py b/src/main/python/apache/aurora/client/cli/jobs.py
index 0534bdf..bd7a308 100644
--- a/src/main/python/apache/aurora/client/cli/jobs.py
+++ b/src/main/python/apache/aurora/client/cli/jobs.py
@@ -54,8 +54,8 @@ from apache.aurora.client.cli.options import (
 )
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 
-from gen.apache.aurora.constants import ACTIVE_STATES, AURORA_EXECUTOR_NAME
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES, AURORA_EXECUTOR_NAME
+from gen.apache.aurora.api.ttypes import (
     ExecutorConfig,
     ResponseCode,
     ScheduleStatus,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/cli/quota.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/quota.py b/src/main/python/apache/aurora/client/cli/quota.py
index 80f7817..e5dd381 100644
--- a/src/main/python/apache/aurora/client/cli/quota.py
+++ b/src/main/python/apache/aurora/client/cli/quota.py
@@ -28,7 +28,7 @@ from apache.aurora.client.cli.options import (
     ROLE_ARGUMENT,
 )
 
-from gen.apache.aurora.ttypes import ResponseCode
+from gen.apache.aurora.api.ttypes import ResponseCode
 
 from thrift.protocol import TJSONProtocol
 from thrift.TSerialization import serialize

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/cli/task.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/cli/task.py b/src/main/python/apache/aurora/client/cli/task.py
index e4ee77e..62747ed 100644
--- a/src/main/python/apache/aurora/client/cli/task.py
+++ b/src/main/python/apache/aurora/client/cli/task.py
@@ -57,8 +57,8 @@ from apache.aurora.client.cli.options import (
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from apache.aurora.common.clusters import CLUSTERS
 
-from gen.apache.aurora.constants import ACTIVE_STATES, AURORA_EXECUTOR_NAME
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES, AURORA_EXECUTOR_NAME
+from gen.apache.aurora.api.ttypes import (
     ExecutorConfig,
     ResponseCode,
     ScheduleStatus,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/commands/admin.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/admin.py b/src/main/python/apache/aurora/client/commands/admin.py
index 3765a2e..912851a 100644
--- a/src/main/python/apache/aurora/client/commands/admin.py
+++ b/src/main/python/apache/aurora/client/commands/admin.py
@@ -40,8 +40,8 @@ from apache.aurora.common.aurora_job_key import AuroraJobKey
 from apache.aurora.common.clusters import CLUSTERS
 from apache.aurora.common.shellify import shellify
 
-from gen.apache.aurora.constants import ACTIVE_STATES, TERMINAL_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES, TERMINAL_STATES
+from gen.apache.aurora.api.ttypes import (
     ResponseCode,
     ScheduleStatus,
     TaskQuery,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/commands/core.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/commands/core.py b/src/main/python/apache/aurora/client/commands/core.py
index 67c061e..39190e0 100644
--- a/src/main/python/apache/aurora/client/commands/core.py
+++ b/src/main/python/apache/aurora/client/commands/core.py
@@ -57,12 +57,11 @@ from apache.aurora.client.options import (
     WAIT_UNTIL_OPTION)
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 
-from gen.apache.aurora.constants import ACTIVE_STATES, CURRENT_API_VERSION, AURORA_EXECUTOR_NAME
-from gen.apache.aurora.ttypes import ExecutorConfig, ResponseCode, ScheduleStatus
+from gen.apache.aurora.api.constants import ACTIVE_STATES, CURRENT_API_VERSION, AURORA_EXECUTOR_NAME
+from gen.apache.aurora.api.ttypes import ExecutorConfig, ResponseCode, ScheduleStatus
 
 from twitter.common import app, log
 from twitter.common.python.pex import PexInfo
-from twitter.common.python.dirwrapper import PythonDirectoryWrapper
 
 
 def get_job_config(job_spec, config_file, options):
@@ -102,12 +101,11 @@ def version(args):
   Prints information about the version of the aurora client being run.
   """
   try:
-    pexpath = sys.argv[0]
-    pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(pexpath))
+    pex_info = PexInfo.from_pex(sys.argv[0])
     print("Aurora client build info:")
     print("\tsha: %s" % pex_info.build_properties['sha'])
     print("\tdate: %s" % pex_info.build_properties['date'])
-  except (IOError, PythonDirectoryWrapper.Error):
+  except (IOError, OSError):
     print("Aurora client build info not available")
   print("Aurora API version: %s" % CURRENT_API_VERSION)
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/config.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/config.py b/src/main/python/apache/aurora/client/config.py
index 855f709..350d84c 100644
--- a/src/main/python/apache/aurora/client/config.py
+++ b/src/main/python/apache/aurora/client/config.py
@@ -30,7 +30,7 @@ from apache.aurora.client.base import deprecation_warning, die
 from apache.aurora.config import AuroraConfig
 from apache.thermos.config.schema_helpers import Tasks
 
-from gen.apache.aurora.constants import DEFAULT_ENVIRONMENT
+from gen.apache.aurora.api.constants import DEFAULT_ENVIRONMENT
 
 from pystachio import Empty, Ref
 from twitter.common import app, log

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/client/hooks/hooked_api.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/client/hooks/hooked_api.py b/src/main/python/apache/aurora/client/hooks/hooked_api.py
index 48e8514..3d30cbd 100644
--- a/src/main/python/apache/aurora/client/hooks/hooked_api.py
+++ b/src/main/python/apache/aurora/client/hooks/hooked_api.py
@@ -21,7 +21,7 @@ from apache.aurora.client.api import AuroraClientAPI
 from apache.aurora.client.config import GlobalHookRegistry
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 
-from gen.apache.aurora.ttypes import ResponseCode
+from gen.apache.aurora.api.ttypes import ResponseCode
 
 from twitter.common import log
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/common/aurora_job_key.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/common/aurora_job_key.py b/src/main/python/apache/aurora/common/aurora_job_key.py
index a0bc6e5..298b574 100644
--- a/src/main/python/apache/aurora/common/aurora_job_key.py
+++ b/src/main/python/apache/aurora/common/aurora_job_key.py
@@ -16,8 +16,8 @@
 
 import re
 
-from gen.apache.aurora.constants import GOOD_IDENTIFIER_PATTERN_PYTHON
-from gen.apache.aurora.ttypes import Identity, JobKey, TaskQuery
+from gen.apache.aurora.api.constants import GOOD_IDENTIFIER_PATTERN_PYTHON
+from gen.apache.aurora.api.ttypes import Identity, JobKey, TaskQuery
 
 from twitter.common.lang import Compatibility, total_ordering
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/common/auth/auth_module.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/common/auth/auth_module.py b/src/main/python/apache/aurora/common/auth/auth_module.py
index c055036..320fb46 100644
--- a/src/main/python/apache/aurora/common/auth/auth_module.py
+++ b/src/main/python/apache/aurora/common/auth/auth_module.py
@@ -21,7 +21,7 @@ import time
 
 from twitter.common.lang import Interface
 
-from gen.apache.aurora.ttypes import SessionKey
+from gen.apache.aurora.api.ttypes import SessionKey
 
 
 class AuthModule(Interface):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/common/auth/auth_module_manager.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/common/auth/auth_module_manager.py b/src/main/python/apache/aurora/common/auth/auth_module_manager.py
index 53b2a31..eda5073 100644
--- a/src/main/python/apache/aurora/common/auth/auth_module_manager.py
+++ b/src/main/python/apache/aurora/common/auth/auth_module_manager.py
@@ -16,7 +16,7 @@
 
 from twitter.common import log
 
-from gen.apache.aurora.ttypes import SessionKey
+from gen.apache.aurora.api.ttypes import SessionKey
 
 from .auth_module import AuthModule, InsecureAuthModule
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/config/schema/base.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/config/schema/base.py b/src/main/python/apache/aurora/config/schema/base.py
index 4a086b3..89931ab 100644
--- a/src/main/python/apache/aurora/config/schema/base.py
+++ b/src/main/python/apache/aurora/config/schema/base.py
@@ -16,7 +16,7 @@
 
 from apache.thermos.config.schema import *
 
-from gen.apache.aurora.constants import DEFAULT_ENVIRONMENT
+from gen.apache.aurora.api.constants import DEFAULT_ENVIRONMENT
 
 
 # TODO(wickman) Bind {{mesos.instance}} to %shard_id%

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/config/thrift.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/config/thrift.py b/src/main/python/apache/aurora/config/thrift.py
index 4cc0f07..9a0db88 100644
--- a/src/main/python/apache/aurora/config/thrift.py
+++ b/src/main/python/apache/aurora/config/thrift.py
@@ -24,8 +24,8 @@ from apache.aurora.config.schema.base import (
 )
 from apache.thermos.config.loader import ThermosTaskValidator
 
-from gen.apache.aurora.constants import GOOD_IDENTIFIER_PATTERN_PYTHON, AURORA_EXECUTOR_NAME
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import GOOD_IDENTIFIER_PATTERN_PYTHON, AURORA_EXECUTOR_NAME
+from gen.apache.aurora.api.ttypes import (
   Constraint,
   CronCollisionPolicy,
   ExecutorConfig,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/executor/common/task_info.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/common/task_info.py b/src/main/python/apache/aurora/executor/common/task_info.py
index 29a05be..3284ae6 100644
--- a/src/main/python/apache/aurora/executor/common/task_info.py
+++ b/src/main/python/apache/aurora/executor/common/task_info.py
@@ -20,7 +20,7 @@ from apache.aurora.config.port_resolver import PortResolver
 from apache.aurora.config.schema.base import MesosJob, MesosTaskInstance
 from apache.aurora.config.thrift import task_instance_from_job
 
-from gen.apache.aurora.ttypes import AssignedTask
+from gen.apache.aurora.api.ttypes import AssignedTask
 
 from pystachio import Ref
 from thrift.Thrift import TException

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/executor/executor_vars.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/executor_vars.py b/src/main/python/apache/aurora/executor/executor_vars.py
index f358fe5..bb7755e 100644
--- a/src/main/python/apache/aurora/executor/executor_vars.py
+++ b/src/main/python/apache/aurora/executor/executor_vars.py
@@ -24,7 +24,6 @@ from twitter.common.metrics import (
     MutatorGauge,
     NamedGauge,
     Observable)
-from twitter.common.python.dirwrapper import PythonDirectoryWrapper
 from twitter.common.python.pex import PexInfo
 from twitter.common.quantity import Amount, Time
 from twitter.common.string.scanf import ScanfParser
@@ -62,9 +61,9 @@ class ExecutorVars(Observable, ExceptionalThread):
   @classmethod
   def get_release_from_binary(cls, binary):
     try:
-      pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(binary))
+      pex_info = PexInfo.from_pex(binary)
       return cls.get_release_from_tag(pex_info.build_properties.get('tag', ''))
-    except PythonDirectoryWrapper.Error:
+    except (IOError, OSError):
       return 'UNKNOWN'
 
   def __init__(self, clock=time):

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/aurora/executor/gc_executor.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/executor/gc_executor.py b/src/main/python/apache/aurora/executor/gc_executor.py
index e860a58..11d234d 100644
--- a/src/main/python/apache/aurora/executor/gc_executor.py
+++ b/src/main/python/apache/aurora/executor/gc_executor.py
@@ -33,12 +33,12 @@ from apache.thermos.core.helper import TaskKiller
 from apache.thermos.monitoring.detector import TaskDetector
 from apache.thermos.monitoring.garbage import TaskGarbageCollector
 
+from gen.apache.aurora.api.constants import TERMINAL_STATES
+from gen.apache.aurora.api.ttypes import ScheduleStatus
 from gen.apache.aurora.comm.ttypes import (
     AdjustRetainedTasks,
     DeletedTasks,
     SchedulerMessage)
-from gen.apache.aurora.constants import TERMINAL_STATES
-from gen.apache.aurora.ttypes import ScheduleStatus
 from gen.apache.thermos.ttypes import TaskState
 
 from .common.sandbox import DirectorySandbox, SandboxInterface

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/python/apache/thermos/testing/runner.py
----------------------------------------------------------------------
diff --git a/src/main/python/apache/thermos/testing/runner.py b/src/main/python/apache/thermos/testing/runner.py
index 0ef4cac..291fdb0 100644
--- a/src/main/python/apache/thermos/testing/runner.py
+++ b/src/main/python/apache/thermos/testing/runner.py
@@ -42,6 +42,12 @@ from twitter.common.contextutil import temporary_file, environment_as
 
 class Runner(object):
   RUN_JOB_SCRIPT = """
+# this is a hack to process wheel nspkg declarations
+import os, sys, site
+for path in sys.path:
+  if path.endswith('.whl') and os.path.isdir(path):
+    site.addsitedir(path)
+
 import os
 import random
 import sys

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/thrift/org/apache/aurora/gen/BUILD
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/BUILD b/src/main/thrift/org/apache/aurora/gen/BUILD
index dce379c..49ecbb0 100644
--- a/src/main/thrift/org/apache/aurora/gen/BUILD
+++ b/src/main/thrift/org/apache/aurora/gen/BUILD
@@ -24,7 +24,6 @@ python_thrift_library(
     'api.thrift',
     'internal_rpc.thrift',
   ],
-
 )
 
 python_thrift_library(

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/main/thrift/org/apache/aurora/gen/api.thrift
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/api.thrift b/src/main/thrift/org/apache/aurora/gen/api.thrift
index 32596d3..66292dc 100644
--- a/src/main/thrift/org/apache/aurora/gen/api.thrift
+++ b/src/main/thrift/org/apache/aurora/gen/api.thrift
@@ -15,7 +15,7 @@
  */
 
 namespace java org.apache.aurora.gen
-namespace py gen.apache.aurora
+namespace py gen.apache.aurora.api
 
 // Thrift interface definition for the aurora scheduler.
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/admin/test_host_maintenance.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/admin/test_host_maintenance.py b/src/test/python/apache/aurora/admin/test_host_maintenance.py
index 95497ae..0ba3262 100644
--- a/src/test/python/apache/aurora/admin/test_host_maintenance.py
+++ b/src/test/python/apache/aurora/admin/test_host_maintenance.py
@@ -19,7 +19,7 @@ import unittest
 from apache.aurora.admin.host_maintenance import HostMaintenance
 from apache.aurora.common.cluster import Cluster
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Hosts,
     Response,
     ResponseCode,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_disambiguator.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_disambiguator.py b/src/test/python/apache/aurora/client/api/test_disambiguator.py
index d964d91..8f989ef 100644
--- a/src/test/python/apache/aurora/client/api/test_disambiguator.py
+++ b/src/test/python/apache/aurora/client/api/test_disambiguator.py
@@ -21,8 +21,8 @@ from apache.aurora.client.api.disambiguator import LiveJobDisambiguator
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from apache.aurora.common.cluster import Cluster
 
-from gen.apache.aurora.constants import ResponseCode
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ResponseCode
+from gen.apache.aurora.api.ttypes import (
    Response,
    Result,
    GetJobsResult,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_health_check.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_health_check.py b/src/test/python/apache/aurora/client/api/test_health_check.py
index d503281..f59fe42 100644
--- a/src/test/python/apache/aurora/client/api/test_health_check.py
+++ b/src/test/python/apache/aurora/client/api/test_health_check.py
@@ -28,7 +28,7 @@ from apache.aurora.client.api.health_check import (
   StatusHealthCheck
 )
 
-from gen.apache.aurora.ttypes import *
+from gen.apache.aurora.api.ttypes import *
 
 import mox
 import pytest

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_instance_watcher.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_instance_watcher.py b/src/test/python/apache/aurora/client/api/test_instance_watcher.py
index f001ba4..18c9a87 100644
--- a/src/test/python/apache/aurora/client/api/test_instance_watcher.py
+++ b/src/test/python/apache/aurora/client/api/test_instance_watcher.py
@@ -20,8 +20,8 @@ import unittest
 from apache.aurora.client.api.health_check import HealthCheck
 from apache.aurora.client.api.instance_watcher import InstanceWatcher
 
-from gen.apache.aurora.ttypes import *
-from gen.apache.aurora.AuroraSchedulerManager import Client as scheduler_client
+from gen.apache.aurora.api.ttypes import *
+from gen.apache.aurora.api.AuroraSchedulerManager import Client as scheduler_client
 
 import mox
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_job_monitor.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_job_monitor.py b/src/test/python/apache/aurora/client/api/test_job_monitor.py
index 4ab8a5d..32609e4 100644
--- a/src/test/python/apache/aurora/client/api/test_job_monitor.py
+++ b/src/test/python/apache/aurora/client/api/test_job_monitor.py
@@ -14,8 +14,15 @@
 # limitations under the License.
 #
 
-from gen.apache.aurora.AuroraSchedulerManager import Client
-from gen.apache.aurora.ttypes import Response, ResponseCode, Result, ScheduleStatusResult, Identity, TaskQuery
+from gen.apache.aurora.api.AuroraSchedulerManager import Client
+from gen.apache.aurora.api.ttypes import (
+    Identity,
+    Response,
+    ResponseCode,
+    Result,
+    ScheduleStatusResult,
+    TaskQuery,
+)
 from apache.aurora.client.api import AuroraClientAPI
 from apache.aurora.client.api.job_monitor import JobMonitor
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_quota_check.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_quota_check.py b/src/test/python/apache/aurora/client/api/test_quota_check.py
index b2598ad..229f9a5 100644
--- a/src/test/python/apache/aurora/client/api/test_quota_check.py
+++ b/src/test/python/apache/aurora/client/api/test_quota_check.py
@@ -20,8 +20,8 @@ from copy import deepcopy
 
 from apache.aurora.client.api.quota_check import CapacityRequest, QuotaCheck
 
-from gen.apache.aurora.AuroraSchedulerManager import Client as scheduler_client
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.AuroraSchedulerManager import Client as scheduler_client
+from gen.apache.aurora.api.ttypes import (
     GetQuotaResult,
     JobKey,
     ResourceAggregate,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_restarter.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_restarter.py b/src/test/python/apache/aurora/client/api/test_restarter.py
index 7a68a97..d5dfa39 100644
--- a/src/test/python/apache/aurora/client/api/test_restarter.py
+++ b/src/test/python/apache/aurora/client/api/test_restarter.py
@@ -19,8 +19,8 @@ from apache.aurora.client.api.instance_watcher import InstanceWatcher
 from apache.aurora.client.api.updater_util import UpdaterConfig
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 
-from gen.apache.aurora.AuroraSchedulerManager import Client as scheduler_client
-from gen.apache.aurora.ttypes import *
+from gen.apache.aurora.api.AuroraSchedulerManager import Client as scheduler_client
+from gen.apache.aurora.api.ttypes import *
 
 from mox import IgnoreArg, MoxTestBase
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_scheduler_client.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_scheduler_client.py b/src/test/python/apache/aurora/client/api/test_scheduler_client.py
index 10c2a90..2736d67 100644
--- a/src/test/python/apache/aurora/client/api/test_scheduler_client.py
+++ b/src/test/python/apache/aurora/client/api/test_scheduler_client.py
@@ -23,10 +23,10 @@ from twitter.common.quantity import Amount, Time
 from twitter.common.zookeeper.kazoo_client import TwitterKazooClient
 from twitter.common.zookeeper.serverset.endpoint import ServiceInstance
 
-import gen.apache.aurora.AuroraAdmin as AuroraAdmin
-import gen.apache.aurora.AuroraSchedulerManager as AuroraSchedulerManager
-from gen.apache.aurora.constants import DEFAULT_ENVIRONMENT, CURRENT_API_VERSION
-from gen.apache.aurora.ttypes import *
+import gen.apache.aurora.api.AuroraAdmin as AuroraAdmin
+import gen.apache.aurora.api.AuroraSchedulerManager as AuroraSchedulerManager
+from gen.apache.aurora.api.constants import DEFAULT_ENVIRONMENT, CURRENT_API_VERSION
+from gen.apache.aurora.api.ttypes import *
 
 from mox import IgnoreArg, IsA, Mox
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_sla.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_sla.py b/src/test/python/apache/aurora/client/api/test_sla.py
index dedc8f1..359599a 100644
--- a/src/test/python/apache/aurora/client/api/test_sla.py
+++ b/src/test/python/apache/aurora/client/api/test_sla.py
@@ -26,9 +26,9 @@ from apache.aurora.client.api.sla import (
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from apache.aurora.common.cluster import Cluster
 
-from gen.apache.aurora.AuroraSchedulerManager import Client as scheduler_client
-from gen.apache.aurora.constants import LIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.AuroraSchedulerManager import Client as scheduler_client
+from gen.apache.aurora.api.constants import LIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     Response,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/api/test_updater.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/api/test_updater.py b/src/test/python/apache/aurora/client/api/test_updater.py
index a5680a0..e7eb1e7 100644
--- a/src/test/python/apache/aurora/client/api/test_updater.py
+++ b/src/test/python/apache/aurora/client/api/test_updater.py
@@ -23,9 +23,9 @@ from apache.aurora.client.api.quota_check import CapacityRequest, QuotaCheck
 from apache.aurora.client.api.updater import Updater
 from apache.aurora.client.fake_scheduler_proxy import FakeSchedulerProxy
 
-from gen.apache.aurora.AuroraSchedulerManager import Client as scheduler_client
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.AuroraSchedulerManager import Client as scheduler_client
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import (
   AddInstancesConfig,
   AcquireLockResult,
   AssignedTask,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_cancel_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_cancel_update.py b/src/test/python/apache/aurora/client/cli/test_cancel_update.py
index 2f86e2e..f27781c 100644
--- a/src/test/python/apache/aurora/client/cli/test_cancel_update.py
+++ b/src/test/python/apache/aurora/client/cli/test_cancel_update.py
@@ -21,7 +21,7 @@ from apache.aurora.client.cli.util import AuroraClientCommandTest, FakeAuroraCom
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Identity,
     JobKey,
     ScheduleStatus,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_create.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_create.py b/src/test/python/apache/aurora/client/cli/test_create.py
index 6f8d91e..875573e 100644
--- a/src/test/python/apache/aurora/client/cli/test_create.py
+++ b/src/test/python/apache/aurora/client/cli/test_create.py
@@ -18,7 +18,7 @@ import contextlib
 
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     ScheduledTask,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_diff.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_diff.py b/src/test/python/apache/aurora/client/cli/test_diff.py
index fbfd3dd..f0a9e93 100644
--- a/src/test/python/apache/aurora/client/cli/test_diff.py
+++ b/src/test/python/apache/aurora/client/cli/test_diff.py
@@ -24,8 +24,8 @@ from apache.aurora.client.cli import (
 from apache.aurora.client.cli.client import AuroraCommandLine
 from apache.aurora.client.cli.util import AuroraClientCommandTest
 
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     ExecutorConfig,
     Identity,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_kill.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_kill.py b/src/test/python/apache/aurora/client/cli/test_kill.py
index 2088160..cf5df64 100644
--- a/src/test/python/apache/aurora/client/cli/test_kill.py
+++ b/src/test/python/apache/aurora/client/cli/test_kill.py
@@ -26,7 +26,7 @@ from apache.aurora.client.hooks.hooked_api import HookedAuroraClientAPI
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Identity,
     ScheduleStatusResult,
     TaskQuery,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_logging.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_logging.py b/src/test/python/apache/aurora/client/cli/test_logging.py
index b6241b8..6051ba9 100644
--- a/src/test/python/apache/aurora/client/cli/test_logging.py
+++ b/src/test/python/apache/aurora/client/cli/test_logging.py
@@ -19,7 +19,7 @@ from logging import Handler
 
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     ScheduledTask,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_plugins.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_plugins.py b/src/test/python/apache/aurora/client/cli/test_plugins.py
index 64bde45..0ec2ed3 100644
--- a/src/test/python/apache/aurora/client/cli/test_plugins.py
+++ b/src/test/python/apache/aurora/client/cli/test_plugins.py
@@ -18,7 +18,7 @@ import contextlib
 
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     ScheduledTask,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_quota.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_quota.py b/src/test/python/apache/aurora/client/cli/test_quota.py
index 1bd432a..44908d2 100644
--- a/src/test/python/apache/aurora/client/cli/test_quota.py
+++ b/src/test/python/apache/aurora/client/cli/test_quota.py
@@ -20,7 +20,7 @@ import json
 from apache.aurora.client.cli.client import AuroraCommandLine
 from apache.aurora.client.cli.util import AuroraClientCommandTest, FakeAuroraCommandContext
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
   GetQuotaResult,
   ResourceAggregate,
   )

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_restart.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_restart.py b/src/test/python/apache/aurora/client/cli/test_restart.py
index 834c603..43412c4 100644
--- a/src/test/python/apache/aurora/client/cli/test_restart.py
+++ b/src/test/python/apache/aurora/client/cli/test_restart.py
@@ -23,7 +23,7 @@ from apache.aurora.client.cli.util import AuroraClientCommandTest
 
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     JobKey,
     PopulateJobResult,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_status.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_status.py b/src/test/python/apache/aurora/client/cli/test_status.py
index 4813ce1..a8269ac 100644
--- a/src/test/python/apache/aurora/client/cli/test_status.py
+++ b/src/test/python/apache/aurora/client/cli/test_status.py
@@ -16,7 +16,7 @@
 
 import contextlib
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     JobKey,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_task_run.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_task_run.py b/src/test/python/apache/aurora/client/cli/test_task_run.py
index 529fb40..fba812e 100644
--- a/src/test/python/apache/aurora/client/cli/test_task_run.py
+++ b/src/test/python/apache/aurora/client/cli/test_task_run.py
@@ -22,7 +22,7 @@ from apache.aurora.client.cli.client import AuroraCommandLine
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from apache.aurora.client.cli.util import AuroraClientCommandTest, FakeAuroraCommandContext
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     JobKey,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/test_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/test_update.py b/src/test/python/apache/aurora/client/cli/test_update.py
index e321b4c..e3e4332 100644
--- a/src/test/python/apache/aurora/client/cli/test_update.py
+++ b/src/test/python/apache/aurora/client/cli/test_update.py
@@ -26,8 +26,8 @@ from apache.aurora.client.cli.client import AuroraCommandLine
 from apache.aurora.client.cli.util import AuroraClientCommandTest, FakeAuroraCommandContext
 from apache.aurora.config import AuroraConfig
 
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AcquireLockResult,
     AddInstancesConfig,
     AssignedTask,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/cli/util.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/cli/util.py b/src/test/python/apache/aurora/client/cli/util.py
index bc2a3e9..2225ab0 100644
--- a/src/test/python/apache/aurora/client/cli/util.py
+++ b/src/test/python/apache/aurora/client/cli/util.py
@@ -16,7 +16,7 @@
 
 import unittest
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Response,
     ResponseCode,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_cancel_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_cancel_update.py b/src/test/python/apache/aurora/client/commands/test_cancel_update.py
index da9ed2f..d765431 100644
--- a/src/test/python/apache/aurora/client/commands/test_cancel_update.py
+++ b/src/test/python/apache/aurora/client/commands/test_cancel_update.py
@@ -25,7 +25,7 @@ from apache.aurora.client.hooks.hooked_api import HookedAuroraClientAPI
 from apache.aurora.common.aurora_job_key import AuroraJobKey
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Identity,
     JobKey,
     ScheduleStatus,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_create.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_create.py b/src/test/python/apache/aurora/client/commands/test_create.py
index ceea25d..e0ecb52 100644
--- a/src/test/python/apache/aurora/client/commands/test_create.py
+++ b/src/test/python/apache/aurora/client/commands/test_create.py
@@ -25,7 +25,7 @@ from apache.aurora.config import AuroraConfig
 from twitter.common import app
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     Response,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_diff.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_diff.py b/src/test/python/apache/aurora/client/commands/test_diff.py
index 824397d..a9d4581 100644
--- a/src/test/python/apache/aurora/client/commands/test_diff.py
+++ b/src/test/python/apache/aurora/client/commands/test_diff.py
@@ -21,8 +21,8 @@ from apache.aurora.client.commands.core import diff
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     ExecutorConfig,
     Identity,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_hooks.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_hooks.py b/src/test/python/apache/aurora/client/commands/test_hooks.py
index 64afce5..97ec14e 100644
--- a/src/test/python/apache/aurora/client/commands/test_hooks.py
+++ b/src/test/python/apache/aurora/client/commands/test_hooks.py
@@ -24,7 +24,7 @@ from apache.aurora.client.hooks.hooked_api import HookedAuroraClientAPI
 from twitter.common import app
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     Response,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_kill.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_kill.py b/src/test/python/apache/aurora/client/commands/test_kill.py
index 825f5f1..db820a5 100644
--- a/src/test/python/apache/aurora/client/commands/test_kill.py
+++ b/src/test/python/apache/aurora/client/commands/test_kill.py
@@ -25,7 +25,7 @@ from apache.aurora.common.aurora_job_key import AuroraJobKey
 from twitter.common.contextutil import temporary_file
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Identity,
     ScheduleStatus,
     ScheduleStatusResult,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_listjobs.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_listjobs.py b/src/test/python/apache/aurora/client/commands/test_listjobs.py
index 11a255b..092b707 100644
--- a/src/test/python/apache/aurora/client/commands/test_listjobs.py
+++ b/src/test/python/apache/aurora/client/commands/test_listjobs.py
@@ -22,7 +22,7 @@ from apache.aurora.common.clusters import Clusters
 from apache.aurora.client.commands.core import list_jobs
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     GetJobsResult,
     JobKey,
 )

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_maintenance.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_maintenance.py b/src/test/python/apache/aurora/client/commands/test_maintenance.py
index 0404a98..c684a52 100644
--- a/src/test/python/apache/aurora/client/commands/test_maintenance.py
+++ b/src/test/python/apache/aurora/client/commands/test_maintenance.py
@@ -24,7 +24,7 @@ from apache.aurora.client.commands.maintenance import (
     start_maintenance_hosts,
 )
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     DrainHostsResult,
     EndMaintenanceResult,
     Hosts,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_restart.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_restart.py b/src/test/python/apache/aurora/client/commands/test_restart.py
index 075414b..526c501 100644
--- a/src/test/python/apache/aurora/client/commands/test_restart.py
+++ b/src/test/python/apache/aurora/client/commands/test_restart.py
@@ -22,7 +22,7 @@ from apache.aurora.client.commands.util import AuroraClientCommandTest
 from apache.aurora.client.api.health_check import InstanceWatcherHealthCheck, Retriable
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     JobKey,
     PopulateJobResult,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_run.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_run.py b/src/test/python/apache/aurora/client/commands/test_run.py
index 61eff75..dad238b 100644
--- a/src/test/python/apache/aurora/client/commands/test_run.py
+++ b/src/test/python/apache/aurora/client/commands/test_run.py
@@ -19,8 +19,8 @@ import contextlib
 from apache.aurora.client.commands.run import run
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 
-from gen.apache.aurora.constants import LIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import LIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     JobKey,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_ssh.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_ssh.py b/src/test/python/apache/aurora/client/commands/test_ssh.py
index dd62c9c..bfe24d4 100644
--- a/src/test/python/apache/aurora/client/commands/test_ssh.py
+++ b/src/test/python/apache/aurora/client/commands/test_ssh.py
@@ -19,8 +19,8 @@ import contextlib
 from apache.aurora.client.commands.ssh import ssh
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 
-from gen.apache.aurora.constants import LIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import LIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     JobKey,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_status.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_status.py b/src/test/python/apache/aurora/client/commands/test_status.py
index 400e8c2..2b97702 100644
--- a/src/test/python/apache/aurora/client/commands/test_status.py
+++ b/src/test/python/apache/aurora/client/commands/test_status.py
@@ -22,7 +22,7 @@ from apache.aurora.common.clusters import Clusters
 from apache.aurora.client.commands.core import status
 from apache.aurora.client.commands.util import AuroraClientCommandTest
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     AssignedTask,
     Identity,
     JobKey,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/test_update.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/test_update.py b/src/test/python/apache/aurora/client/commands/test_update.py
index 72df41b..f907837 100644
--- a/src/test/python/apache/aurora/client/commands/test_update.py
+++ b/src/test/python/apache/aurora/client/commands/test_update.py
@@ -29,8 +29,8 @@ from apache.aurora.client.hooks.hooked_api import HookedAuroraClientAPI
 from apache.aurora.config import AuroraConfig
 from twitter.common.contextutil import temporary_file
 
-from gen.apache.aurora.constants import ACTIVE_STATES
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import ACTIVE_STATES
+from gen.apache.aurora.api.ttypes import (
     AcquireLockResult,
     AddInstancesConfig,
     AssignedTask,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/commands/util.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/commands/util.py b/src/test/python/apache/aurora/client/commands/util.py
index 82cadcf..c28096f 100644
--- a/src/test/python/apache/aurora/client/commands/util.py
+++ b/src/test/python/apache/aurora/client/commands/util.py
@@ -20,7 +20,7 @@ from apache.aurora.client.hooks.hooked_api import HookedAuroraClientAPI
 from apache.aurora.common.cluster import Cluster
 from apache.aurora.common.clusters import Clusters
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
     Response,
     ResponseCode,
     Result,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/client/test_config.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/client/test_config.py b/src/test/python/apache/aurora/client/test_config.py
index 846975f..8ef0868 100644
--- a/src/test/python/apache/aurora/client/test_config.py
+++ b/src/test/python/apache/aurora/client/test_config.py
@@ -23,7 +23,7 @@ from apache.aurora.config import AuroraConfig
 from apache.aurora.config.loader import AuroraConfigLoader
 from apache.aurora.config.schema.base import Announcer, Job, MB, Resources, Task
 
-from gen.apache.aurora.constants import DEFAULT_ENVIRONMENT
+from gen.apache.aurora.api.constants import DEFAULT_ENVIRONMENT
 
 import pytest
 

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/config/test_base.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/config/test_base.py b/src/test/python/apache/aurora/config/test_base.py
index f67dce9..31ad21f 100644
--- a/src/test/python/apache/aurora/config/test_base.py
+++ b/src/test/python/apache/aurora/config/test_base.py
@@ -29,7 +29,7 @@ from apache.aurora.config.schema.base import (
     Task,
 )
 
-from gen.apache.aurora.ttypes import Identity
+from gen.apache.aurora.api.ttypes import Identity
 
 
 resolve = PortResolver.resolve

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/config/test_thrift.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/config/test_thrift.py b/src/test/python/apache/aurora/config/test_thrift.py
index f845c98..93b8f6f 100644
--- a/src/test/python/apache/aurora/config/test_thrift.py
+++ b/src/test/python/apache/aurora/config/test_thrift.py
@@ -30,16 +30,16 @@ from apache.thermos.config.schema import (
     Task,
 )
 
-from gen.apache.aurora.constants import GOOD_IDENTIFIER_PATTERN_PYTHON
-from gen.apache.aurora.test.constants import (
-    INVALID_IDENTIFIERS,
-    VALID_IDENTIFIERS,
-)
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import GOOD_IDENTIFIER_PATTERN_PYTHON
+from gen.apache.aurora.api.ttypes import (
     CronCollisionPolicy,
     JobKey,
     Identity,
 )
+from gen.apache.aurora.test.constants import (
+    INVALID_IDENTIFIERS,
+    VALID_IDENTIFIERS,
+)
 
 from pystachio import Map, String
 from pystachio.naming import frozendict

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/executor/common/test_task_info.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/common/test_task_info.py b/src/test/python/apache/aurora/executor/common/test_task_info.py
index 51f6ded..a840a57 100644
--- a/src/test/python/apache/aurora/executor/common/test_task_info.py
+++ b/src/test/python/apache/aurora/executor/common/test_task_info.py
@@ -26,7 +26,7 @@ from apache.aurora.config.schema.base import (
 )
 from apache.aurora.executor.common.task_info import mesos_task_instance_from_assigned_task
 
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.ttypes import (
   AssignedTask,
   ExecutorConfig,
   TaskConfig,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/executor/test_gc_executor.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/test_gc_executor.py b/src/test/python/apache/aurora/executor/test_gc_executor.py
index 73aea7b..baf3770 100644
--- a/src/test/python/apache/aurora/executor/test_gc_executor.py
+++ b/src/test/python/apache/aurora/executor/test_gc_executor.py
@@ -29,9 +29,9 @@ from apache.thermos.common.path import TaskPath
 from apache.thermos.config.schema import SimpleTask
 from apache.thermos.core.runner import TaskRunner
 
+from gen.apache.aurora.api.constants import LIVE_STATES, TERMINAL_STATES
+from gen.apache.aurora.api.ttypes import ScheduleStatus
 from gen.apache.aurora.comm.ttypes import AdjustRetainedTasks, SchedulerMessage
-from gen.apache.aurora.constants import LIVE_STATES, TERMINAL_STATES
-from gen.apache.aurora.ttypes import ScheduleStatus
 from gen.apache.thermos.ttypes import ProcessState, TaskState
 
 import mock

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/python/apache/aurora/executor/test_thermos_executor.py
----------------------------------------------------------------------
diff --git a/src/test/python/apache/aurora/executor/test_thermos_executor.py b/src/test/python/apache/aurora/executor/test_thermos_executor.py
index 4cd34c6..0b143d0 100644
--- a/src/test/python/apache/aurora/executor/test_thermos_executor.py
+++ b/src/test/python/apache/aurora/executor/test_thermos_executor.py
@@ -47,8 +47,8 @@ from apache.thermos.common.path import TaskPath
 from apache.thermos.core.runner import TaskRunner
 from apache.thermos.monitoring.monitor import TaskMonitor
 
-from gen.apache.aurora.constants import AURORA_EXECUTOR_NAME
-from gen.apache.aurora.ttypes import (
+from gen.apache.aurora.api.constants import AURORA_EXECUTOR_NAME
+from gen.apache.aurora.api.ttypes import (
   AssignedTask,
   ExecutorConfig,
   Identity,

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/ddd2329e/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
----------------------------------------------------------------------
diff --git a/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh b/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
index 05f8c28..f89c801 100755
--- a/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
+++ b/src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
@@ -40,8 +40,9 @@ devtools_setup() {
   branch=$(git branch | grep '*' | cut -c 3-)
   run_dev "if [ ! -d ~/test_dev ]; then git clone /vagrant ~/test_dev; fi"
   # Clean out any lingering build products; we want fresh.
+  run_dev "rm -rf ~/.pex"
   run_dev "cd ~/test_dev; git reset --hard; git clean -fdx"
-  run_dev "cd ~/test_dev ; git checkout $branch; git pull"
+  run_dev "cd ~/test_dev; git checkout $branch; git pull"
   run_dev "cd ~/test_dev; ./pants src/main/python/apache/aurora/client/bin:aurora_client"
   run_dev "cd ~/test_dev; ./pants src/test/sh/org/apache/aurora/e2e/flask:flask_example"
   if [ ! -d $_testdir ]