return

    def get_object(self, key):
        return

    def list_objects(self, prefix=None, limit=None, marker=None):
        return

    def delete_object(self, key):
        return

    def get_owner_id(self):
        return


fake_bank = Bank(FakeBankPlugin())
fake_bank_section = BankSection(bank=fake_bank, prefix="fake")

ResourceNode = collections.namedtuple("ResourceNode", ["value", "child_nodes"])

Image = collections.namedtuple("Image",
                               ["disk_format", "container_format", "status"])


class CheckpointCollection(object):
    def __init__(self):
        self.bank_section = fake_bank_section

    def get_resource_bank_section(self, resource_id):
        return self.bank_section
示例#2
0
 def _create_test_bank(self):
     return Bank(_InMemoryBankPlugin())
示例#3
0
 def get_resource_bank_section(self, resource_id):
     bank = Bank(FakeBankPlugin())
     return BankSection(bank, resource_id)
 def _create_test_collection(self):
     return CheckpointCollection(Bank(_InMemoryBankPlugin()),
                                 _InMemoryLeasePlugin())