Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Revert "Keep phantom_info around while we transition to the new API"
Browse files Browse the repository at this point in the history
This reverts commit 1065fb8.
  • Loading branch information
oldpatricka committed Jun 19, 2013
1 parent cf08aa1 commit a6eb396
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
8 changes: 1 addition & 7 deletions phantomweb/api/dev.py
Expand Up @@ -13,7 +13,7 @@
get_launch_configuration, get_launch_configuration_by_name, create_launch_configuration, \
set_host_max_pair, get_all_domains, create_domain, get_domain_by_name, get_domain, \
remove_domain, modify_domain, get_domain_instances, get_domain_instance, \
terminate_domain_instance, OPENTSDB_METRICS
terminate_domain_instance

log = logging.getLogger('phantomweb.api.dev')

Expand Down Expand Up @@ -563,9 +563,3 @@ def instance_resource(request, domain_id, instance_id):

h = HttpResponse(status=204)
return h


@basic_http_auth
@require_http_methods(["GET"])
def sensors(request, domain_id):
pass
6 changes: 1 addition & 5 deletions phantomweb/tests.py
Expand Up @@ -1390,9 +1390,5 @@ def get_iaas_compute_con(obj):

class SensorsTestCase(unittest.TestCase):
def test_get_sensors(self):
c = Client()
c.login(username='fred', password='secret')

response = c.get('/api/dev/sensors')
self.assertEqual(response.status_code, 200)
pass

1 change: 0 additions & 1 deletion phantomweb/urls.py
Expand Up @@ -60,5 +60,4 @@
url(r'^api/%s/domains/([-0-9A-Za-z]+)$' % DEV_VERSION, 'phantomweb.api.dev.domain_resource'),
url(r'^api/%s/domains/([-0-9A-Za-z]+)/instances$' % DEV_VERSION, 'phantomweb.api.dev.instances'),
url(r'^api/%s/domains/([-0-9A-Za-z]+)/instances/([-0-9A-Za-z]+)$' % DEV_VERSION, 'phantomweb.api.dev.instance_resource'),
url(r'^api/%s/sensors$' % DEV_VERSION, 'phantomweb.api.dev.sensors'),
)
7 changes: 0 additions & 7 deletions phantomweb/util.py
Expand Up @@ -133,13 +133,6 @@ def __init__(self, username):
raise PhantomWebException(msg)
self.access_key = phantom_user.access_key_id

# Keep this around while we transition to new API
# TODO: remove this
phantom_info_objects = PhantomInfoDB.objects.all()
if not phantom_info_objects:
raise PhantomWebException('The service is mis-configured. Please contact your sysadmin')
self.phantom_info = phantom_info_objects[0]

rabbit_info_objects = RabbitInfoDB.objects.all()
if not rabbit_info_objects:
raise PhantomWebException('The service is mis-configured. Please contact your sysadmin')
Expand Down

0 comments on commit a6eb396

Please sign in to comment.