~cbehrens/nova/lp844160-build-works-with-zones

« back to all changes in this revision

Viewing changes to nova/flags.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
 
2
# Copyright [2010] [Anso Labs, LLC]
 
3
#
 
4
#    Licensed under the Apache License, Version 2.0 (the "License");
 
5
#    you may not use this file except in compliance with the License.
 
6
#    You may obtain a copy of the License at
 
7
#
 
8
#        http://www.apache.org/licenses/LICENSE-2.0
 
9
#
 
10
#    Unless required by applicable law or agreed to in writing, software
 
11
#    distributed under the License is distributed on an "AS IS" BASIS,
 
12
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
13
#    See the License for the specific language governing permissions and
 
14
#    limitations under the License.
 
15
 
 
16
"""
 
17
Package-level global flags are defined here, the rest are defined
 
18
where they're used.
 
19
"""
 
20
 
 
21
import socket
 
22
 
 
23
from nova import vendor
 
24
from gflags import *
 
25
 
 
26
# This keeps pylint from barfing on the imports
 
27
FLAGS = FLAGS
 
28
DEFINE_string = DEFINE_string
 
29
DEFINE_integer = DEFINE_integer
 
30
DEFINE_bool = DEFINE_bool
 
31
 
 
32
# __GLOBAL FLAGS ONLY__
 
33
# Define any app-specific flags in their own files, docs at:
 
34
# http://code.google.com/p/python-gflags/source/browse/trunk/gflags.py#39
 
35
 
 
36
DEFINE_integer('s3_port', 3333, 's3 port')
 
37
DEFINE_integer('s3_internal_port', 3334, 's3 port')
 
38
DEFINE_string('s3_host', '127.0.0.1', 's3 host')
 
39
#DEFINE_string('cloud_topic', 'cloud', 'the topic clouds listen on')
 
40
DEFINE_string('compute_topic', 'compute', 'the topic compute nodes listen on')
 
41
DEFINE_string('storage_topic', 'storage', 'the topic storage nodes listen on')
 
42
DEFINE_bool('fake_libvirt', False,
 
43
                  'whether to use a fake libvirt or not')
 
44
DEFINE_bool('verbose', False, 'show debug output')
 
45
DEFINE_boolean('fake_rabbit', False, 'use a fake rabbit')
 
46
DEFINE_bool('fake_network', False, 'should we use fake network devices and addresses')
 
47
DEFINE_bool('fake_users', False, 'use fake users')
 
48
DEFINE_string('rabbit_host', 'localhost', 'rabbit host')
 
49
DEFINE_integer('rabbit_port', 5672, 'rabbit port')
 
50
DEFINE_string('rabbit_userid', 'guest', 'rabbit userid')
 
51
DEFINE_string('rabbit_password', 'guest', 'rabbit password')
 
52
DEFINE_string('rabbit_virtual_host', '/', 'rabbit virtual host')
 
53
DEFINE_string('control_exchange', 'nova', 'the main exchange to connect to')
 
54
DEFINE_string('ec2_url',
 
55
                'http://127.0.0.1:8773/services/Cloud',
 
56
                'Url to ec2 api server')
 
57
 
 
58
DEFINE_string('default_image',
 
59
                    'ami-11111',
 
60
                    'default image to use, testing only')
 
61
DEFINE_string('default_kernel',
 
62
                    'aki-11111',
 
63
                    'default kernel to use, testing only')
 
64
DEFINE_string('default_ramdisk',
 
65
                    'ari-11111',
 
66
                    'default ramdisk to use, testing only')
 
67
DEFINE_string('default_instance_type',
 
68
                    'm1.small',
 
69
                    'default instance type to use, testing only')
 
70
 
 
71
# UNUSED
 
72
DEFINE_string('node_availability_zone',
 
73
                    'nova',
 
74
                    'availability zone of this node')
 
75
DEFINE_string('node_name',
 
76
                    socket.gethostname(),
 
77
                    'name of this node')
 
78