Example #1
0
    def SetConfig(self):
        configtype = "OpenSim.ini"
        source = self.DataCenter + "/config/" + configtype
        dst = self.loc + "/" + configtype
        response = urllib2.urlopen(source)
        output = open(dst, 'wb')
        s = ''
        for line in response.readlines():
            s = s + line.lstrip()
        output.write(s)
        output.close()
        cf = ReadConfig.CAppConfig(dst)
        cf.set('Architecture', 'Include-Architecture',
               "config-include/Grid.ini")
        cf.set('Network', 'http_listener_port', self.listener_port)
        cf.set('RemoteAdmin', 'enabled', 'true')
        cf.set('RemoteAdmin', 'access_password', '1234')
        fp = open(dst, 'wb')
        cf.write(fp)
        fp.close()

        configtype = "GridCommon.ini"
        source = self.DataCenter + "/config/" + configtype
        dst = self.loc + "/config-include/" + configtype
        response = urllib2.urlopen(source)
        output = open(dst, 'wb')
        s = ''
        for line in response.readlines():
            s = s + line.lstrip()
        output.write(s)
        output.close()
        cf = ReadConfig.CAppConfig(dst)
        cf.set('DatabaseService', 'StorageProvider',
               '\"' + self.dbProvider + '\"')
        cf.set('DatabaseService', 'ConnectionString',
               '\"' + self.connString + '\"')
        cf.set('AssetService', 'AssetServerURI', self.robusturl)
        cf.set('InventoryService', 'InventoryServerURI', self.robusturl)
        cf.set('GridService', 'GridServerURI', self.robusturl)
        cf.set('AvatarService', 'AvatarServerURI', self.robusturl)
        cf.set('PresenceService', 'PresenceServerURI', self.robusturl)
        cf.set('UserAccountService', 'UserAccountServerURI', self.robusturl)
        cf.set('GridUserService', 'GridUserServerURI', self.robusturl)
        cf.set('AuthenticationService', 'AuthenticationServerURI',
               self.robusturl)
        cf.set('FriendsService', 'FriendsServerURI', self.robusturl)
        cf.set('AssetService', 'AssetServerURI', self.robusturl)
        cf.set('AssetService', 'AssetServerURI', self.robusturl)
        fp = open(dst, 'wb')
        cf.write(fp)
        fp.close()
Example #2
0
 def SetConfig(self):
     #download basic config file
     configtype = "Robust.ini"
     source = self.DataCenter + "/config/" + configtype
     dst = self.loc + "/" + configtype
     print '[RobustServer]download {0} from {1} to {2}'.format(
         configtype, source, dst)
     response = urllib2.urlopen(source)
     output = open(dst, 'wb')
     s = ''
     for line in response.readlines():
         s = s + line.lstrip()
     output.write(s)
     output.close()
     #modify config file
     cf = ReadConfig.CAppConfig(dst)
     cf.set('DatabaseService', 'StorageProvider',
            '\"' + self.dbProvider + '\"')
     cf.set('DatabaseService', 'ConnectionString',
            '\"' + self.connString + '\"')
     #cf.set('AssetService','AssetLoaderEnabled',self.AssetLoader)
     cf.set('Network', 'ConsoleUser', self.RemoteUser)
     cf.set('Network', 'ConsolePass', self.RemotePsw)
     cf.set('Network', 'ConsolePort', self.RemotePort)
     fp = open(dst, 'wb')
     cf.write(fp)
     fp.close()
Example #3
0
    def SetConfig(self):
        configtype = "OpenSim.ini"
        source = self.DataCenter + "/config/" + configtype
        dst = self.loc + "/" + configtype
        response = urllib2.urlopen(source)
        output = open(dst, 'wb')
        s = ''
        for line in response.readlines():
            s = s + line.lstrip()
        output.write(s)
        output.close()
        cf = ReadConfig.CAppConfig(dst)
        cf.set('Architecture', 'Include-Architecture',
               "\"config-include/Standalone.ini\"")
        cf.set('Network', 'http_listener_port', self.listener_port)
        cf.set('RemoteAdmin', 'enabled', 'true')
        cf.set('RemoteAdmin', 'access_password', '1234')
        fp = open(dst, 'wb')
        cf.write(fp)
        fp.close()

        configtype = "StandaloneCommon.ini"
        source = self.DataCenter + "/config/" + configtype
        dst = self.loc + "/config-include/" + configtype
        print 'source={0},dst={1}'.format(source, dst)
        response = urllib2.urlopen(source)
        output = open(dst, 'wb')
        output.write(response.read())
        output.close()
Example #4
0
 def ParseConfig(self, path):
     self.cf = ReadConfig.CAppConfig(path)
     #self.ID=uuid.uuid4()
     self.gridName = self.cf.get('grid', 'name')
     self.gridDataCenter = self.cf.get('grid', 'datacenterpath')
     self.girdVersion = self.cf.get('grid', 'version')
     self.gridType = self.cf.get('grid', 'type')
     self.NodeList = self.cf.get('grid', 'nodelist').split(',')
     print '[Grid {0}]DataCenter={1},Version={2},Type={3},NodeList={4}'.format(
         self.gridName, self.gridDataCenter, self.girdVersion,
         self.gridType, self.NodeList)
Example #5
0
 def SetDefaultRegion(self):
     dst = self.loc + "/Regions/Regions.ini"
     os.remove(dst)
     output = open(dst, 'wb')
     cf = ReadConfig.CAppConfig(dst)
     cf.add_section('defaultRegion')
     cf.set('defaultRegion', 'RegionUUID', uuid.uuid4())
     cf.set('defaultRegion', 'Location', '0,0')
     cf.set('defaultRegion', 'InternalAddress', '0.0.0.0')
     cf.set('defaultRegion', 'InternalPort', '9000')
     cf.set('defaultRegion', 'AllowAlternatePorts', 'False')
     cf.set('defaultRegion', 'ExternalHostName', 'SYSTEMIP')
     cf.write(output)
     output.close()
Example #6
0
 def ParseConfig(self,path):
     cf=ReadConfig.CAppConfig(path)
     self.name=cf.get('NodeServer','name')
     self.node_listener_port=cf.get('NodeServer','node_listener_port')
     loc=cf.get('NodeServer','loc')
     print '[NodeServer {0}]port={1}'.format(self.name,self.node_listener_port)
Example #7
0
 def AddServer(self, nodeName, serverConfigPath):
     servercf = ReadConfig.CAppConfig(serverConfigPath)
Example #8
0
 def ParseConfig(self, path):
     cf = ReadConfig.CAppConfig(path)
     self.name = cf.get('gridmanager', 'name')
     self.grid_listener_port = cf.get('gridmanager', 'grid_listener_port')
     print '[GridManager {0} ParseConfig] listener_port={1}'.format(
         self.name, self.grid_listener_port)