diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2010-12-23 21:53:33 +0000 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2010-12-23 21:53:33 +0000 |
| commit | 5f8d02b39fb8917b34b68bbbf450656e1b68211c (patch) | |
| tree | 4a8489e10fecea511e3fffece42de81c9fdc7837 /bin/nova-api | |
| parent | 1c26d2b2ce824dbc64525eea699efbfa8bf04617 (diff) | |
| parent | 75e2cbec9eb5132a49446f1b6d563d5f43d007de (diff) | |
| download | nova-5f8d02b39fb8917b34b68bbbf450656e1b68211c.tar.gz nova-5f8d02b39fb8917b34b68bbbf450656e1b68211c.tar.xz nova-5f8d02b39fb8917b34b68bbbf450656e1b68211c.zip | |
fixed merge conflict
Diffstat (limited to 'bin/nova-api')
| -rwxr-xr-x | bin/nova-api | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bin/nova-api b/bin/nova-api index 2ae6a099a..1c671201e 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -17,9 +17,8 @@ # 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. -""" -Nova API daemon. -""" + +"""Starter script for Nova API.""" import gettext import os @@ -35,9 +34,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): gettext.install('nova', unicode=1) +from nova import api from nova import flags from nova import utils -from nova import server +from nova import wsgi + FLAGS = flags.FLAGS flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port') @@ -46,15 +47,10 @@ flags.DEFINE_integer('ec2api_port', 8773, 'EC2 API port') flags.DEFINE_string('ec2api_host', '0.0.0.0', 'EC2 API host') -def main(_args): - from nova import api - from nova import wsgi +if __name__ == '__main__': + utils.default_flagfile() + FLAGS(sys.argv) server = wsgi.Server() server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host) server.start(api.API('ec2'), FLAGS.ec2api_port, host=FLAGS.ec2api_host) server.wait() - - -if __name__ == '__main__': - utils.default_flagfile() - server.serve('nova-api', main) |
