Exemplo n.º 1
0
def initialize(context):
    """
    :type context: pulp.client.extensions.core.ClientContext
    """

    structure.ensure_puppet_root(context.cli)

    root_section = structure.root_section(context.cli)
    root_section.add_command(bind.BindCommand(context))
    root_section.add_command(bind.UnbindCommand(context))
    root_section.add_command(RepoSearchCommand(context, constants.REPO_NOTE_PUPPET, name=SEARCH_NAME))
Exemplo n.º 2
0
    def test_ensure_puppet_root_idempotency(self):
        # Test
        structure.ensure_puppet_root(self.cli)
        returned_root_section = structure.ensure_puppet_root(self.cli)

        # Verify
        self.assertTrue(returned_root_section is not None)
        self.assertEqual(returned_root_section.name, structure.SECTION_ROOT)
        puppet_root_section = self.cli.find_section(structure.SECTION_ROOT)
        self.assertTrue(puppet_root_section is not None)
        self.assertEqual(puppet_root_section.name, structure.SECTION_ROOT)
Exemplo n.º 3
0
def initialize(context):
    """
    :type context: pulp.client.extensions.core.ClientContext
    """

    structure.ensure_puppet_root(context.cli)

    root_section = structure.root_section(context.cli)
    root_section.add_command(bind.BindCommand(context))
    root_section.add_command(bind.UnbindCommand(context))
    root_section.add_command(
        RepoSearchCommand(context,
                          constants.REPO_NOTE_PUPPET,
                          name=SEARCH_NAME))