finished to clean up SFA_*_TYPE and the like
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 29 Nov 2011 09:34:40 +0000 (10:34 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 29 Nov 2011 09:34:40 +0000 (10:34 +0100)
config/default_config.xml
config/sfa_component_config
sfa/plc/pldriver.py
sfa/util/config.py
sfa/util/table.py

index 5427283..99c5d37 100644 (file)
@@ -85,13 +85,6 @@ Thierry Parmentelat
          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>
@@ -129,13 +122,6 @@ Thierry Parmentelat
          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>
@@ -165,13 +151,6 @@ Thierry Parmentelat
          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>
index d51c93b..1bb57c8 100644 (file)
@@ -16,11 +16,6 @@ SFA_API_DEBUG=1
 # 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"
@@ -32,6 +27,8 @@ SFA_REGISTRY_ROOT_AUTH="plc"
 # 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"
@@ -47,12 +44,6 @@ SFA_REGISTRY_PORT=12345
 ## 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
@@ -70,14 +61,6 @@ SFA_AGGREGATE_PORT=12346
 # 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"
index 74db778..a93ebd5 100644 (file)
@@ -35,13 +35,6 @@ class PlDriver (Driver, PlShell):
         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):
index 2261dda..f114a2d 100644 (file)
@@ -76,12 +76,6 @@ class Config:
 
         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
index 065e8ab..5fdafef 100644 (file)
@@ -34,6 +34,7 @@ class SfaTable(list):
         if tables:
             return True
         return False
+
     def db_fields(self, obj=None):
         
         db_fields = self.db.fields(self.SFA_TABLE_PREFIX)