setup a simple default way for dealing with configurable options and added conifg group opbjects as a better way to access the same information formatted within a string
This commit is contained in:
parent
8e3cd0e013
commit
82c3d57dd3
7 changed files with 107 additions and 75 deletions
|
@ -1,31 +1,30 @@
|
|||
import pytest
|
||||
|
||||
from core.conf import ConfigurableOptions, ConfigurableManager, ModelManager
|
||||
from core.conf import ConfigurableManager
|
||||
from core.conf import ConfigurableOptions
|
||||
from core.conf import Configuration
|
||||
from core.conf import ModelManager
|
||||
from core.emane.ieee80211abg import EmaneIeee80211abgModel
|
||||
from core.enumerations import ConfigDataTypes, NodeTypes
|
||||
from core.enumerations import ConfigDataTypes
|
||||
from core.enumerations import NodeTypes
|
||||
from core.mobility import BasicRangeModel
|
||||
|
||||
|
||||
class TestConfigurableOptions(ConfigurableOptions):
|
||||
name_one = "value1"
|
||||
name_two = "value2"
|
||||
configuration_maps = {}
|
||||
|
||||
@classmethod
|
||||
def configurations(cls):
|
||||
return [
|
||||
Configuration(
|
||||
_id=TestConfigurableOptions.name_one,
|
||||
_type=ConfigDataTypes.STRING,
|
||||
label=TestConfigurableOptions.name_one
|
||||
),
|
||||
Configuration(
|
||||
_id=TestConfigurableOptions.name_two,
|
||||
_type=ConfigDataTypes.STRING,
|
||||
label=TestConfigurableOptions.name_two
|
||||
)
|
||||
]
|
||||
options = [
|
||||
Configuration(
|
||||
_id=name_one,
|
||||
_type=ConfigDataTypes.STRING,
|
||||
label=name_one
|
||||
),
|
||||
Configuration(
|
||||
_id=name_two,
|
||||
_type=ConfigDataTypes.STRING,
|
||||
label=name_two
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
class TestConf:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue