def test_ping(self): self.polisher = PlumberyPolisher.from_shelf('ping', {}) self.polisher.go(FakeEngine()) self.polisher.move_to(FakeFacility()) self.polisher.shine_node( FakeNode(), fakeNodeSettings, FakeContainer()) self.polisher.reap()
def polish_blueprint(self, names, polishers): """ Walks a named blueprint for this facility and polish related resources :param names: the name(s) of the blueprint(s) to polish :type names: ``str`` or ``list`` of ``str`` :param polishers: polishers to be applied :type polishers: list of :class:`plumbery.PlumberyPolisher` """ if isinstance(polishers, str): polishers = PlumberyPolisher.filter(self.plumbery.polishers, polishers) self.power_on() infrastructure = PlumberyInfrastructure(self) nodes = PlumberyNodes(self) for polisher in polishers: polisher.move_to(self) for name in self.expand_blueprint(names): blueprint = self.get_blueprint(name) container = infrastructure.get_container(blueprint) for polisher in polishers: polisher.shine_container(container) nodes.polish_blueprint(blueprint, polishers, container)
def test_rub(self): self.polisher = PlumberyPolisher.from_shelf( 'rub', fakeRubConfiguration) self.polisher.go(FakeEngine()) self.polisher.move_to(FakeFacility()) self.polisher.shine_node(FakeNode(), fakeNodeSettings, FakeContainer()) self.polisher.reap()
def test_inventory(self): self.polisher = PlumberyPolisher.from_shelf( 'inventory', fakeInventoryConfiguration) self.polisher.go(FakeEngine()) self.polisher.move_to(FakeFacility()) self.polisher.shine_node(FakeNode(), fakeNodeSettings, FakeContainer()) self.polisher.reap()
def test_ansible(self): self.polisher = PlumberyPolisher.from_shelf('ansible', fakeAnsibleConfiguration) self.polisher.go(FakeEngine()) self.polisher.move_to(FakeFacility()) self.polisher.shine_node(FakeNode(), fakeNodeSettings, FakeContainer()) self.polisher.reap()
def test_spit(self): self.polisher = PlumberyPolisher.from_shelf('spit', fakeSpitConfiguration) self.polisher.go(FakeEngine()) self.polisher.move_to(FakeFacility()) self.polisher.shine_node(FakeNode(), fakeNodeSettings) self.polisher.reap()
def test_ping(self): polisher = PlumberyPolisher.from_shelf('ping', {}) do_polish(polisher)
def test_information(self): polisher = PlumberyPolisher.from_shelf('information', {}) do_polish(polisher)
def test_inventory(self): polisher = PlumberyPolisher.from_shelf('inventory', {}) do_polish(polisher)
def test_ansible(self): polisher = PlumberyPolisher.from_shelf('ansible', {}) do_polish(polisher)
def test_prepare(self): polisher = PlumberyPolisher.from_shelf( 'prepare', fakePrepareConfiguration) do_polish(polisher)
def test_configure(self): polisher = PlumberyPolisher.from_shelf('configure', {}) do_polish(polisher)
def test_rub(self): polisher = PlumberyPolisher.from_shelf( 'rub', fakeRubConfiguration) do_polish(polisher)
def test_spit(self): polisher = PlumberyPolisher.from_shelf('spit', {}) do_polish(polisher)
def test_prepare(self): polisher = PlumberyPolisher.from_shelf('prepare', fakePrepareConfiguration) do_polish(polisher)
def test_ansible(self): self.polisher = PlumberyPolisher.from_shelf('ansible', fakeAnsibleConfiguration) self.polisher.go(FakeEngine()) self.polisher.move_to(FakeFacility()) self.polisher.shine_node(FakeNode(), fakeNodeSettings) self.polisher.reap()