Commit 888e2c98 authored by Ivan Tyagov's avatar Ivan Tyagov

Keep supplied SRs in a dict so we can tear them down.

parent c3416add
......@@ -12,4 +12,4 @@ md5sum = cbaa8e36097f36caf1a377fa71341a09
[test_beremiz.py]
filename = test_beremiz.py
md5sum = b926baa2a7f733bc7301cf14e5017689
md5sum = dc824be1076b5eee1e551f19103acac3
......@@ -15,10 +15,11 @@ class EndToEndTestCase(unittest.TestCase):
conf = slapos.client.ClientConfig(args, configp)
local = slapos.client.init(conf, logging.getLogger(__name__))
cls.slap = local['slap']
cls.supply = staticmethod(local['supply'])
cls._supply = staticmethod(local['supply'])
cls._request = staticmethod(local['request'])
cls.product = staticmethod(local['product'])
cls._requested = {}
cls._supplied = {}
@classmethod
def tearDownClass(cls):
......@@ -33,6 +34,11 @@ class EndToEndTestCase(unittest.TestCase):
partition = cls._request(*args, **kw)
return cls.unwrapConnectionDict(partition.getConnectionParameterDict())
@classmethod
def supply(cls, software_release, computer_id, state):
cls._supplied[software_release] = computer_id
cls._supply(software_release, computer_id, state)
@staticmethod
def unwrapConnectionDict(connection_dict):
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment