self.key_file = key_file
self.cert_file = cert_file
self.credential = None
- self.plshell = self.getPLCShell()
- self.plshell_version = self.getPLCShellVersion()
+
+ # Initialize the PLC shell only if SFA wraps a myPLC
+ if (self.config.get_aggregate_rspec_type() == 'pl'):
+ self.plshell = self.getPLCShell()
+ self.plshell_version = self.getPLCShellVersion()
+
self.hrn = self.config.SFA_INTERFACE_HRN
self.time_format = "%Y-%m-%d %H:%M:%S"
self.logger=get_sfa_logger()
except IOError, e:
raise IOError, "Could not find the configuration file: %s" % config_file
- ##
- #
- # Very hacky - to change after July 21.
- #
- # The generation/parsing of RSpecs is based on the value returned by this function. vini and max
- # use some new code, while pl uses old code. As long as you don't set SFA_AGGREGATE_RSPEC_TYPE in your
- # config file, the new code will not apply to your deployment.
- #
-
def get_aggregate_rspec_type(self):
if (hasattr(self,'SFA_AGGREGATE_RSPEC_TYPE')):
return self.SFA_AGGREGATE_RSPEC_TYPE