예제 #1
0
 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()
예제 #2
0
    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)
예제 #3
0
 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()
예제 #4
0
 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()
예제 #5
0
    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)
예제 #6
0
 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()
예제 #7
0
 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()
예제 #8
0
 def test_ping(self):
     polisher = PlumberyPolisher.from_shelf('ping', {})
     do_polish(polisher)
예제 #9
0
 def test_information(self):
     polisher = PlumberyPolisher.from_shelf('information', {})
     do_polish(polisher)
예제 #10
0
 def test_ping(self):
     polisher = PlumberyPolisher.from_shelf('ping', {})
     do_polish(polisher)
예제 #11
0
 def test_inventory(self):
     polisher = PlumberyPolisher.from_shelf('inventory', {})
     do_polish(polisher)
예제 #12
0
 def test_information(self):
     polisher = PlumberyPolisher.from_shelf('information', {})
     do_polish(polisher)
예제 #13
0
 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)
예제 #16
0
 def test_ansible(self):
     polisher = PlumberyPolisher.from_shelf('ansible', {})
     do_polish(polisher)
예제 #17
0
 def test_configure(self):
     polisher = PlumberyPolisher.from_shelf('configure', {})
     do_polish(polisher)
예제 #18
0
 def test_rub(self):
     polisher = PlumberyPolisher.from_shelf(
         'rub', fakeRubConfiguration)
     do_polish(polisher)
예제 #19
0
 def test_inventory(self):
     polisher = PlumberyPolisher.from_shelf('inventory', {})
     do_polish(polisher)
예제 #20
0
 def test_spit(self):
     polisher = PlumberyPolisher.from_shelf('spit', {})
     do_polish(polisher)
예제 #21
0
 def test_prepare(self):
     polisher = PlumberyPolisher.from_shelf('prepare',
                                            fakePrepareConfiguration)
     do_polish(polisher)
예제 #22
0
 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()