2012-01-20 14:12:20 -08:00
|
|
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
|
|
|
2012-01-26 12:54:36 -08:00
|
|
|
# Copyright (C) 2012 Yahoo! Inc. All Rights Reserved.
|
2012-01-20 14:12:20 -08:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2012-01-31 16:07:40 -08:00
|
|
|
import os
|
2012-03-09 14:03:39 -05:00
|
|
|
import sys
|
2012-01-22 16:09:47 -08:00
|
|
|
|
2012-01-20 14:12:20 -08:00
|
|
|
# What this program is called
|
2012-01-30 23:31:51 -08:00
|
|
|
PROG_NICE_NAME = "DEVSTACKpy"
|
2012-01-20 14:12:20 -08:00
|
|
|
|
2012-01-26 18:24:35 -08:00
|
|
|
# Ip version constants for network ip detection
|
2012-01-20 14:12:20 -08:00
|
|
|
IPV4 = 'IPv4'
|
|
|
|
IPV6 = 'IPv6'
|
|
|
|
|
2012-02-17 17:37:47 -08:00
|
|
|
# Different run types supported
|
2012-02-17 17:44:10 -08:00
|
|
|
RUN_TYPE_FORK = "FORK"
|
|
|
|
RUN_TYPE_UPSTART = "UPSTART"
|
2012-02-24 15:35:19 -08:00
|
|
|
RUN_TYPE_SCREEN = "SCREEN"
|
2012-02-17 17:37:47 -08:00
|
|
|
RUN_TYPE_DEF = RUN_TYPE_FORK
|
2012-02-24 15:35:19 -08:00
|
|
|
RUN_TYPES_KNOWN = [RUN_TYPE_UPSTART,
|
|
|
|
RUN_TYPE_FORK,
|
|
|
|
RUN_TYPE_SCREEN,
|
|
|
|
RUN_TYPE_DEF]
|
2012-02-17 17:37:47 -08:00
|
|
|
|
2012-02-17 17:49:49 -08:00
|
|
|
# Used to find the type in trace files
|
|
|
|
RUN_TYPE_TYPE = "TYPE"
|
|
|
|
|
2012-01-20 14:12:20 -08:00
|
|
|
# Default subdirs of a components root directory
|
|
|
|
COMPONENT_TRACE_DIR = "traces"
|
|
|
|
COMPONENT_APP_DIR = "app"
|
|
|
|
COMPONENT_CONFIG_DIR = "config"
|
|
|
|
|
2012-02-16 22:17:05 -08:00
|
|
|
# RC files generated / used
|
2012-02-26 19:22:21 -08:00
|
|
|
RC_FN_TEMPL = "os-%s.rc"
|
|
|
|
OSRC_FN = RC_FN_TEMPL % ('core')
|
2012-02-16 22:17:05 -08:00
|
|
|
|
2012-02-10 21:16:23 -08:00
|
|
|
# Where the configs and templates should be at.
|
2012-03-09 14:03:39 -05:00
|
|
|
STACK_BIN_DIR = os.path.abspath(os.path.dirname(sys.argv[0]))
|
|
|
|
STACK_CONFIG_DIR = os.path.join(STACK_BIN_DIR, "conf")
|
2012-03-15 23:11:58 -07:00
|
|
|
STACK_DISTRO_DIR = os.path.join(STACK_CONFIG_DIR, "distros")
|
2012-02-13 10:34:19 -08:00
|
|
|
STACK_TEMPLATE_DIR = os.path.join(STACK_CONFIG_DIR, "templates")
|
2012-01-20 14:12:20 -08:00
|
|
|
STACK_CONFIG_LOCATION = os.path.join(STACK_CONFIG_DIR, "stack.ini")
|