This repository has been archived by the owner on Aug 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
XSConsoleConfig.py
64 lines (48 loc) · 1.62 KB
/
XSConsoleConfig.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright (c) Citrix Systems 2007. All rights reserved.
# xsconsole is proprietary software.
#
# Xen, the Xen logo, XenCenter, XenMotion are trademarks or registered
# trademarks of Citrix Systems, Inc., in the United States and other
# countries.
import os, sys
class Config:
instance = None
def __init__(self):
self.colours = {
# Colours specified as name : (red, green, blue), value range 0..999
'fg_dark' : (400, 400, 360),
'fg_normal' : (600, 600, 550),
'fg_bright' : (999, 999, 800),
'bg_dark' : (0, 0, 0),
'bg_normal' : (0, 168, 325),
'bg_bright' : (0, 200, 400),
}
self.ftpname = 'XenServer Support'
self.ftpserver = 'ftp://support.xensource.com/bugreports'
@classmethod
def Inst(cls):
if cls.instance is None:
cls.instance = Config()
return cls.instance
@classmethod
def Mutate(cls, inConfig):
cls.instance = inConfig
def Colour(self, inName):
return self.colours[inName]
def FTPName(self):
return self.ftpname
def FTPServer(self):
return self.ftpserver
def BrandingMap(self):
return {}
def AllShellsTimeout(self):
return True
def DisplaySerialNumber(self):
return True
def DisplayAssetTag(self):
return True
def BMCName(self):
return 'BMC'
# Import a more specific configuration if available
if os.path.isfile(sys.path[0]+'/XSConsoleConfigOEM.py'):
import XSConsoleConfigOEM