git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Trivial change to add support for non-PLC aggregates
[sfa.git]
/
sfa
/
plc
/
api.py
diff --git
a/sfa/plc/api.py
b/sfa/plc/api.py
index
cf311e2
..
a1e702f
100644
(file)
--- a/
sfa/plc/api.py
+++ b/
sfa/plc/api.py
@@
-117,8
+117,12
@@
class GeniAPI:
self.key_file = key_file
self.cert_file = cert_file
self.credential = None
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()
self.hrn = self.config.SFA_INTERFACE_HRN
self.time_format = "%Y-%m-%d %H:%M:%S"
self.logger=get_sfa_logger()