self.plauth = {'Username': self.config.SFA_PLC_USER,
'AuthMethod': 'password',
'AuthString': self.config.SFA_PLC_PASSWORD}
- try:
- sys.path.append(os.path.dirname(os.path.realpath("/usr/bin/plcsh")))
- self.plshell_type = 'direct'
- import PLC.Shell
- shell = PLC.Shell.Shell(globals = globals())
- except:
- self.plshell_type = 'xmlrpc'
- url = self.config.SFA_PLC_URL
- shell = xmlrpclib.Server(url, verbose = 0, allow_none = True)
+
+ # The native shell (PLC.Shell.Shell) is more efficient than xmlrpc,
+ # but it leaves idle db connections open. use xmlrpc until we can figure
+ # out why PLC.Shell.Shell doesn't close db connection properly
+ #try:
+ # sys.path.append(os.path.dirname(os.path.realpath("/usr/bin/plcsh")))
+ # self.plshell_type = 'direct'
+ # import PLC.Shell
+ # shell = PLC.Shell.Shell(globals = globals())
+ #except:
+ self.plshell_type = 'xmlrpc'
+ url = self.config.SFA_PLC_URL
+ shell = xmlrpclib.Server(url, verbose = 0, allow_none = True)
return shell
def getCredential(self):
--- /dev/null
+#
+## Extension for the "initscript" type for RSpecV2 on PlanetLab
+## Version 1
+##
+
+default namespace = "http://www.planet-lab.org/resources/ext/initscript/1"
+
+Node = element initscript {
+ attribute name { text }
+}
+
+start = Node
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Extension for the "initscript" type for RSpecV2 on PlanetLab
+ Version 1
+
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+elementFormDefault="qualified"
+targetNamespace="http://www.planet-lab.org/resources/ext/planetlab/1"
+xmlns:planetlab="http://www.planet-lab.org/resources/ext/planetlab/1">
+ <xs:element name="initscript">
+ <xs:complexType>
+ <xs:attribute name="name" use="required"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>