Annotate TODOs
This commit is contained in:
parent
425b08cd50
commit
1623835e91
|
@ -72,7 +72,7 @@
|
|||
<xs:attribute name="rel" use="required" type="atom:relation">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<html:p>TODO</html:p>
|
||||
<html:p>TODO(Jorge)</html:p>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
@ -80,7 +80,7 @@
|
|||
<xs:attribute name="type" use="optional" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<html:p>TODO</html:p>
|
||||
<html:p>TODO(Jorge)</html:p>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<xs:attribute name="href" use="required" type="xs:anyURI">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<html:p>TODO</html:p>
|
||||
<html:p>TODO(Jorge)</html:p>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
@ -96,7 +96,7 @@
|
|||
<xs:attribute name="hreflang" use="optional" type="xs:NMTOKEN">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<html:p>TODO</html:p>
|
||||
<html:p>TODO(Jorge)</html:p>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
@ -104,7 +104,7 @@
|
|||
<xs:attribute name="title" use="optional" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>
|
||||
<html:p>TODO</html:p>
|
||||
<html:p>TODO(Jorge)</html:p>
|
||||
</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
|
|
|
@ -142,7 +142,7 @@ class AuthProtocol(object):
|
|||
ssl=(self.service_protocol == 'https'))
|
||||
resp = conn.getresponse()
|
||||
data = resp.read()
|
||||
#TODO: use a more sophisticated proxy
|
||||
#TODO(ziad): use a more sophisticated proxy
|
||||
# we are rewriting the headers now
|
||||
return Response(status=resp.status, body=data)(env, start_response)
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ class AuthProtocol(object):
|
|||
ssl=(self.service_protocol == 'https'))
|
||||
resp = conn.getresponse()
|
||||
data = resp.read()
|
||||
#TODO: use a more sophisticated proxy
|
||||
#TODO(ziad): use a more sophisticated proxy
|
||||
# we are rewriting the headers now
|
||||
return Response(status=resp.status, body=data)(env, start_response)
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ class AuthProtocol(object):
|
|||
def __init__(self, app, conf):
|
||||
""" Common initialization code """
|
||||
|
||||
#TODO: maybe we rafactor this into a superclass
|
||||
#TODO(ziad): maybe we rafactor this into a superclass
|
||||
self._init_protocol_common(app, conf) # Applies to all protocols
|
||||
self._init_protocol(app, conf) # Specific to this protocol
|
||||
|
||||
|
@ -209,7 +209,7 @@ class AuthProtocol(object):
|
|||
|
||||
# Step 1: We need to auth with the keystone service, so get an
|
||||
# admin token
|
||||
#TODO: Need to properly implement this, where to store creds
|
||||
#TODO(ziad): Need to properly implement this, where to store creds
|
||||
# for now using token from ini
|
||||
#auth = self.get_admin_auth_token("admin", "secrete", "1")
|
||||
#admin_token = json.loads(auth)["auth"]["token"]["id"]
|
||||
|
@ -220,7 +220,7 @@ class AuthProtocol(object):
|
|||
headers = {"Content-type": "application/json",
|
||||
"Accept": "text/json",
|
||||
"X-Auth-Token": self.admin_token}
|
||||
##TODO:we need to figure out how to auth to keystone
|
||||
##TODO(ziad):we need to figure out how to auth to keystone
|
||||
#since validate_token is a priviledged call
|
||||
#Khaled's version uses creds to get a token
|
||||
# "X-Auth-Token": admin_token}
|
||||
|
@ -246,7 +246,7 @@ class AuthProtocol(object):
|
|||
headers = {"Content-type": "application/json",
|
||||
"Accept": "text/json",
|
||||
"X-Auth-Token": self.admin_token}
|
||||
##TODO:we need to figure out how to auth to keystone
|
||||
##TODO(ziad):we need to figure out how to auth to keystone
|
||||
#since validate_token is a priviledged call
|
||||
#Khaled's version uses creds to get a token
|
||||
# "X-Auth-Token": admin_token}
|
||||
|
@ -294,7 +294,7 @@ class AuthProtocol(object):
|
|||
ssl=(self.service_protocol == 'https'))
|
||||
resp = conn.getresponse()
|
||||
data = resp.read()
|
||||
#TODO: use a more sophisticated proxy
|
||||
#TODO(ziad): use a more sophisticated proxy
|
||||
# we are rewriting the headers now
|
||||
return Response(status=resp.status, body=data)(self.proxy_headers,
|
||||
self.start_response)
|
||||
|
|
|
@ -299,7 +299,11 @@ def get_extension(ext_alias):
|
|||
#
|
||||
raise fault.ItemNotFoundFault("The extension is not found")
|
||||
|
||||
def start_server(port=8080):
|
||||
app = exthandler.UrlExtensionFilter(bottle.default_app(), None)
|
||||
wsgi.server(eventlet.listen(('', port)), app)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = exthandler.UrlExtensionFilter(bottle.default_app(), None)
|
||||
wsgi.server(eventlet.listen(('', 8080)), app)
|
||||
start_server()
|
||||
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ class IDMService(object):
|
|||
|
||||
#
|
||||
# Look for an existing token, or create one,
|
||||
# TODO: Handle tenant/token search
|
||||
# TODO(Jorge): Handle tenant/token search
|
||||
#
|
||||
dtoken = db_api.token_for_user(duser.id)
|
||||
if not dtoken or dtoken.expires < datetime.now():
|
||||
|
|
|
@ -1,16 +1,31 @@
|
|||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
# Copyright (c) 2010-2011 OpenStack, LLC.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import httplib2
|
||||
import json
|
||||
from lxml import etree
|
||||
import os
|
||||
import sys
|
||||
from webtest import TestApp
|
||||
import unittest
|
||||
|
||||
# Need to access identity module
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.abspath(__file__),
|
||||
'..', '..', '..', '..', 'keystone')))
|
||||
from keystone import identity
|
||||
import unittest
|
||||
from webtest import TestApp
|
||||
import httplib2
|
||||
import json
|
||||
from lxml import etree
|
||||
import unittest
|
||||
from webtest import TestApp
|
||||
|
||||
URL = 'http://localhost:8080/v1.0/'
|
||||
|
||||
|
@ -146,7 +161,7 @@ class identity_test(unittest.TestCase):
|
|||
#Given _a_ to make inherited test cases in an order.
|
||||
#here to call below method will call as last test case
|
||||
|
||||
def test_a_get_version(self):
|
||||
def test_get_version_json(self):
|
||||
h = httplib2.Http(".cache")
|
||||
url = URL
|
||||
resp, content = h.request(url, "GET", body="",
|
||||
|
@ -154,7 +169,7 @@ class identity_test(unittest.TestCase):
|
|||
self.assertEqual(200, int(resp['status']))
|
||||
self.assertEqual('application/json', resp['content-type'])
|
||||
|
||||
def test_a_get_version(self):
|
||||
def test_get_version_xml(self):
|
||||
h = httplib2.Http(".cache")
|
||||
url = URL
|
||||
resp, content = h.request(url, "GET", body="",
|
||||
|
@ -971,5 +986,17 @@ class delete_tenant_test(tenant_test):
|
|||
self.assertEqual(204, int(resp['status']))
|
||||
|
||||
|
||||
def setup():
|
||||
pass
|
||||
|
||||
|
||||
def teardown():
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
setup()
|
||||
try:
|
||||
unittest.main()
|
||||
finally:
|
||||
teardown()
|
||||
|
|
Loading…
Reference in New Issue