Revision c09254c2
b/lib/constants.py | ||
---|---|---|
1698 | 1698 |
MAX_NICS = 8 |
1699 | 1699 |
MAX_DISKS = 16 |
1700 | 1700 |
|
1701 |
# SSCONF file prefix |
|
1702 |
SSCONF_FILEPREFIX = "ssconf_" |
|
1701 | 1703 |
# SSCONF keys |
1702 | 1704 |
SS_CLUSTER_NAME = "cluster_name" |
1703 | 1705 |
SS_CLUSTER_TAGS = "cluster_tags" |
b/lib/ssconf.py | ||
---|---|---|
1 | 1 |
# |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2010 Google Inc. |
|
4 |
# Copyright (C) 2006, 2007, 2008, 2010, 2011, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
273 | 273 |
- keys are restricted to predefined values |
274 | 274 |
|
275 | 275 |
""" |
276 |
_SS_FILEPREFIX = "ssconf_" |
|
277 | 276 |
_VALID_KEYS = ( |
278 | 277 |
constants.SS_CLUSTER_NAME, |
279 | 278 |
constants.SS_CLUSTER_TAGS, |
... | ... | |
314 | 313 |
raise errors.ProgrammerError("Invalid key requested from SSConf: '%s'" |
315 | 314 |
% str(key)) |
316 | 315 |
|
317 |
filename = self._cfg_dir + "/" + self._SS_FILEPREFIX + key
|
|
316 |
filename = self._cfg_dir + "/" + constants.SSCONF_FILEPREFIX + key
|
|
318 | 317 |
return filename |
319 | 318 |
|
320 | 319 |
def _ReadFile(self, key, default=None): |
Also available in: Unified diff