diff options
| author | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-08-11 18:22:35 -0700 |
|---|---|---|
| committer | Tushar Patil <tushar.vitthal.patil@gmail.com> | 2011-08-11 18:22:35 -0700 |
| commit | 7507ba23004c989c75962c47efbd2ce5e5178a90 (patch) | |
| tree | 28da9671d403d70a7f59e1ca21c079b9b8d17d10 | |
| parent | ca7bf95e610bdc47f01b8fb7b459269bb8e5df66 (diff) | |
added userdata entry in the api paste ini
| -rw-r--r-- | etc/nova/api-paste.ini | 7 | ||||
| -rw-r--r-- | nova/api/openstack/userdatarequesthandler.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/etc/nova/api-paste.ini b/etc/nova/api-paste.ini index abe8c20c4..46a3b0af9 100644 --- a/etc/nova/api-paste.ini +++ b/etc/nova/api-paste.ini @@ -69,6 +69,7 @@ use = egg:Paste#urlmap /: osversions /v1.0: openstackapi10 /v1.1: openstackapi11 +/latest: osuserdata [pipeline:openstackapi10] pipeline = faultwrap auth ratelimit osapiapp10 @@ -76,6 +77,9 @@ pipeline = faultwrap auth ratelimit osapiapp10 [pipeline:openstackapi11] pipeline = faultwrap auth ratelimit extensions osapiapp11 +[pipeline:osuserdata] +pipeline = logrequest osappud + [filter:faultwrap] paste.filter_factory = nova.api.openstack:FaultWrapper.factory @@ -99,3 +103,6 @@ pipeline = faultwrap osversionapp [app:osversionapp] paste.app_factory = nova.api.openstack.versions:Versions.factory + +[app:osappud] +paste.app_factory = nova.api.openstack.userdatarequesthandler:UserdataRequestHandler.factory diff --git a/nova/api/openstack/userdatarequesthandler.py b/nova/api/openstack/userdatarequesthandler.py index 5daa37e95..f0205419b 100644 --- a/nova/api/openstack/userdatarequesthandler.py +++ b/nova/api/openstack/userdatarequesthandler.py @@ -96,7 +96,7 @@ class UserdataRequestHandler(wsgi.Application): @webob.dec.wsgify(RequestClass=wsgi.Request) def __call__(self, req): - remote_address = "10.0.1.6"#req.remote_addr + remote_address = req.remote_addr if FLAGS.use_forwarded_for: remote_address = req.headers.get('X-Forwarded-For', remote_address) |
