from heat import client as heat_client
from heat.common import exception
+from heat.common import config
from heat import version
SUCCESS = 0
FAILURE = 1
-DEFAULT_PORT = 8000
-
def catch_error(action):
"""Decorator to provide sensible default error handling for actions."""
def wrap(func):
help="Address of heat API host. "
"Default: %default")
parser.add_option('-p', '--port', dest="port", metavar="PORT",
- type=int, default=DEFAULT_PORT,
+ type=int, default=config.DEFAULT_PORT,
help="Port the heat API host listens on. "
"Default: %default")
parser.add_option('-U', '--url', metavar="URL", default=None,
help="URL of heat service. This option can be used "
"to specify the hostname, port and protocol "
"(http/https) of the heat server, for example "
- "-U https://localhost:" + str(DEFAULT_PORT) +
+ "-U https://localhost:" + str(config.DEFAULT_PORT) +
"/v1 Default: No<F3>ne")
parser.add_option('-k', '--insecure', dest="insecure",
default=False, action="store_true",
app = config.load_paste_app(conf)
server = wsgi.Server()
- server.start(app, conf, default_port=DEFAULT_PORT)
+ server.start(app, conf, default_port=config.DEFAULT_PORT)
server.wait()
except RuntimeError, e:
sys.exit("ERROR: %s" % e)