git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
11f2975
)
finished to clean up SFA_*_TYPE and the like
author
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Tue, 29 Nov 2011 09:34:40 +0000
(10:34 +0100)
committer
Thierry Parmentelat
<thierry.parmentelat@sophia.inria.fr>
Tue, 29 Nov 2011 09:34:40 +0000
(10:34 +0100)
config/default_config.xml
patch
|
blob
|
history
config/sfa_component_config
patch
|
blob
|
history
sfa/plc/pldriver.py
patch
|
blob
|
history
sfa/util/config.py
patch
|
blob
|
history
sfa/util/table.py
patch
|
blob
|
history
diff --git
a/config/default_config.xml
b/config/default_config.xml
index
5427283
..
99c5d37
100644
(file)
--- a/
config/default_config.xml
+++ b/
config/default_config.xml
@@
-85,13
+85,6
@@
Thierry Parmentelat
registry.</description>
</variable>
registry.</description>
</variable>
- <variable id="type" type="string">
- <name>Registry type</name>
- <value>pl</value>
- <description>The type of backend server for this
- registry. Some registries may not be myplc.</description>
- </variable>
-
<variable id="host" type="hostname">
<name>Hostname</name>
<value>localhost</value>
<variable id="host" type="hostname">
<name>Hostname</name>
<value>localhost</value>
@@
-129,13
+122,6
@@
Thierry Parmentelat
slice manager.</description>
</variable>
slice manager.</description>
</variable>
- <variable id="type" type="string">
- <name>Slice Manager type</name>
- <value>pl</value>
- <description>The type of backend server for this
- slice manager. Not all slice managers are myplc.</description>
- </variable>
-
<variable id="host" type="hostname">
<name>Hostname</name>
<value>localhost</value>
<variable id="host" type="hostname">
<name>Hostname</name>
<value>localhost</value>
@@
-165,13
+151,6
@@
Thierry Parmentelat
aggregate manager.</description>
</variable>
aggregate manager.</description>
</variable>
- <variable id="type" type="string">
- <name>Aggregate type</name>
- <value>pl</value>
- <description>The type of backend server for this
- aggregate. Some aggregates may not be myplc.</description>
- </variable>
-
<variable id="rspec_schema" type="string">
<name>RSpec Schema</name>
<value>/etc/sfa/pl.rng</value>
<variable id="rspec_schema" type="string">
<name>RSpec Schema</name>
<value>/etc/sfa/pl.rng</value>
diff --git
a/config/sfa_component_config
b/config/sfa_component_config
index
d51c93b
..
1bb57c8
100644
(file)
--- a/
config/sfa_component_config
+++ b/
config/sfa_component_config
@@
-16,11
+16,6
@@
SFA_API_DEBUG=1
# Enable the registry interface
SFA_REGISTRY_ENABLED=0
# Enable the registry interface
SFA_REGISTRY_ENABLED=0
-#
-# The type of backend server for this registry
-# Some registries may not be myplc
-SFA_REGISTRY_TYPE='pl'
-
# Root Auth
# The hrn of the registry's root auth
SFA_REGISTRY_ROOT_AUTH="plc"
# Root Auth
# The hrn of the registry's root auth
SFA_REGISTRY_ROOT_AUTH="plc"
@@
-32,6
+27,8
@@
SFA_REGISTRY_ROOT_AUTH="plc"
# xxx could be determined from hrn above
SFA_REGISTRY_LEVEL1_AUTH=""
# xxx could be determined from hrn above
SFA_REGISTRY_LEVEL1_AUTH=""
+SFA_GENERIC_FLAVOUR='pl'
+
# Hostname
# The fully qualified hostname of the registry server
SFA_REGISTRY_HOST="localhost"
# Hostname
# The fully qualified hostname of the registry server
SFA_REGISTRY_HOST="localhost"
@@
-47,12
+44,6
@@
SFA_REGISTRY_PORT=12345
## Enable the aggregate inteface.
SFA_AGGREGATE_ENABLED=0
## Enable the aggregate inteface.
SFA_AGGREGATE_ENABLED=0
-# Aggregate Type
-#
-# The type of backend server for this aggregate
-# Some aggregates may not be myplc
-SFA_AGGREGATE_TYPE='pl'
-
#
#
## Hostname
#
#
## Hostname
@@
-70,14
+61,6
@@
SFA_AGGREGATE_PORT=12346
# Enable the slice manager
SFA_SM_ENABLED=0
# Enable the slice manager
SFA_SM_ENABLED=0
-# Slice Manager type
-#
-## The type of backend server for this slice manager
-## The slice manager doesnt rely on a specific backend server so
-## you probably will never need to change this type unless you
-## need to reimplement the slice manager
-SFA_SM_TYPE='pl'
-
# Host
## The fully qualified hostname or IP address of the slice manager server
SFA_SM_HOST="localhost"
# Host
## The fully qualified hostname or IP address of the slice manager server
SFA_SM_HOST="localhost"
diff --git
a/sfa/plc/pldriver.py
b/sfa/plc/pldriver.py
index
74db778
..
a93ebd5
100644
(file)
--- a/
sfa/plc/pldriver.py
+++ b/
sfa/plc/pldriver.py
@@
-35,13
+35,6
@@
class PlDriver (Driver, PlShell):
PlShell.__init__ (self, config)
self.hrn = config.SFA_INTERFACE_HRN
PlShell.__init__ (self, config)
self.hrn = config.SFA_INTERFACE_HRN
- # xxx thgen fixme - use SfaTable hardwired for now
- # will need to extend generic to support multiple storage systems
- #self.SfaTable = SfaTable
- # Initialize the PLC shell only if SFA wraps a myPLC
- rspec_type = config.get_aggregate_type()
- assert (rspec_type == 'pl' or rspec_type == 'vini' or \
- rspec_type == 'eucalyptus' or rspec_type == 'max')
########## disabled users
def is_enabled (self, record):
########## disabled users
def is_enabled (self, record):
diff --git
a/sfa/util/config.py
b/sfa/util/config.py
index
2261dda
..
f114a2d
100644
(file)
--- a/
sfa/util/config.py
+++ b/
sfa/util/config.py
@@
-76,12
+76,6
@@
class Config:
return (aggr_mgr_ip,aggr_mgr_port)
return (aggr_mgr_ip,aggr_mgr_port)
- def get_aggregate_type(self):
- if (hasattr(self,'SFA_AGGREGATE_TYPE')):
- return self.SFA_AGGREGATE_TYPE
- else:
- return "pl"
-
def get_interface_hrn(self):
if (hasattr(self,'SFA_INTERFACE_HRN')):
return self.SFA_INTERFACE_HRN
def get_interface_hrn(self):
if (hasattr(self,'SFA_INTERFACE_HRN')):
return self.SFA_INTERFACE_HRN
diff --git
a/sfa/util/table.py
b/sfa/util/table.py
index
065e8ab
..
5fdafef
100644
(file)
--- a/
sfa/util/table.py
+++ b/
sfa/util/table.py
@@
-34,6
+34,7
@@
class SfaTable(list):
if tables:
return True
return False
if tables:
return True
return False
+
def db_fields(self, obj=None):
db_fields = self.db.fields(self.SFA_TABLE_PREFIX)
def db_fields(self, obj=None):
db_fields = self.db.fields(self.SFA_TABLE_PREFIX)