Skip to content

Commit

Permalink
Remove pulp_puppet_handlers and everything connected to agent
Browse files Browse the repository at this point in the history
  • Loading branch information
fdobrovolny committed Oct 21, 2016
1 parent 02b61c9 commit a465931
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 1,803 deletions.
3 changes: 0 additions & 3 deletions pulp-dev.py
Expand Up @@ -35,9 +35,6 @@
('pulp_puppet_plugins/usr/share/pulp/wsgi/puppet_forge.wsgi', '/usr/share/pulp/wsgi/puppet_forge.wsgi'),
# Puppet Support Admin Extensions
('pulp_puppet_extensions_admin/etc/pulp/admin/conf.d/puppet.conf', '/etc/pulp/admin/conf.d/puppet.conf'),
# handlers
('pulp_puppet_handlers/etc/pulp/agent/conf.d/puppet_bind.conf', '/etc/pulp/agent/conf.d/puppet_bind.conf'),
('pulp_puppet_handlers/etc/pulp/agent/conf.d/puppet_module.conf', '/etc/pulp/agent/conf.d/puppet_module.conf'),
)

def parse_cmdline():
Expand Down

This file was deleted.

Expand Up @@ -7,7 +7,7 @@

from pulp_puppet.common import constants
from pulp_puppet.extensions.admin import structure
from pulp_puppet.extensions.admin.consumer import bind, content
from pulp_puppet.extensions.admin.consumer import bind
from pulp_puppet.extensions.admin.repo import (copy_modules, modules, publish_schedules,
remove, status, sync_schedules)
from pulp_puppet.extensions.admin.repo import upload as puppet_upload
Expand All @@ -30,15 +30,6 @@ def initialize(context):
consumer_section.add_command(bind.BindCommand(context))
consumer_section.add_command(bind.UnbindCommand(context))

consumer_install_section = structure.consumer_install_section(context.cli)
consumer_install_section.add_command(content.InstallCommand(context))

consumer_update_section = structure.consumer_update_section(context.cli)
consumer_update_section.add_command(content.UpdateCommand(context))

consumer_uninstall_section = structure.consumer_uninstall_section(context.cli)
consumer_uninstall_section.add_command(content.UninstallCommand(context))

publish_section = structure.repo_publish_section(context.cli)
publish_section.add_command(
sync_publish.RunPublishRepositoryCommand(
Expand Down
Expand Up @@ -9,18 +9,11 @@

# -- constants ----------------------------------------------------------------

# Root section all puppet functionality will be located under
from pulp_puppet.extensions.admin.consumer import content

SECTION_ROOT = 'puppet'

SECTION_CONSUMER = 'consumer'
SECTION_REPO = 'repo'

SECTION_INSTALL = 'install'
SECTION_UPDATE = 'update'
SECTION_UNINSTALL = 'uninstall'

SECTION_UPLOADS = 'uploads'

SECTION_SYNC = 'sync'
Expand All @@ -32,10 +25,6 @@
DESC_CONSUMER = _('consumer commands')
DESC_REPO = _('repository lifecycle commands')

DESC_INSTALL = _('run a module install')
DESC_UPDATE = _('run a module update')
DESC_UNINSTALL = _('run a module uninstall')

DESC_UPLOADS = _('upload modules into a repository')

DESC_SYNC = _('run, schedule, or view the status of sync tasks')
Expand All @@ -45,6 +34,7 @@

# -- creation -----------------------------------------------------------------


def ensure_puppet_root(cli):
"""
Verifies that the root of puppet-related commands exists in the CLI,
Expand Down Expand Up @@ -72,10 +62,6 @@ def ensure_consumer_structure(cli):

consumer_section = root_section.create_subsection(SECTION_CONSUMER, DESC_CONSUMER)

consumer_section.create_subsection(SECTION_INSTALL, DESC_INSTALL)
consumer_section.create_subsection(SECTION_UPDATE, DESC_UPDATE)
consumer_section.create_subsection(SECTION_UNINSTALL, DESC_UNINSTALL)

return consumer_section


Expand Down Expand Up @@ -120,22 +106,11 @@ def ensure_repo_structure(cli):

# -- section retrieval --------------------------------------------------------


def consumer_section(cli):
return _find_section(cli, SECTION_ROOT, SECTION_CONSUMER)


def consumer_install_section(cli):
return _find_section(cli, SECTION_ROOT, SECTION_CONSUMER, SECTION_INSTALL)


def consumer_update_section(cli):
return _find_section(cli, SECTION_ROOT, SECTION_CONSUMER, SECTION_UPDATE)


def consumer_uninstall_section(cli):
return _find_section(cli, SECTION_ROOT, SECTION_CONSUMER, SECTION_UNINSTALL)


def repo_section(cli):
return _find_section(cli, SECTION_ROOT, SECTION_REPO)

Expand All @@ -157,10 +132,12 @@ def repo_publish_section(cli):


def repo_publish_schedules_section(cli):
return _find_section(cli, SECTION_ROOT, SECTION_REPO, SECTION_PUBLISH, SECTION_PUBLISH_SCHEDULES)
return _find_section(cli, SECTION_ROOT, SECTION_REPO, SECTION_PUBLISH,
SECTION_PUBLISH_SCHEDULES)

# -- private ------------------------------------------------------------------


def _find_section(cli, *path):
"""
Follows the given path to return the indicated section from the CLI.
Expand All @@ -169,7 +146,7 @@ def _find_section(cli, *path):
:type cli: pulp.client.extensions.core.PulpCli
:param path: path through the nest of sections to the desired section
:type path: list of str
:return: section instance that matches the path
:rtype: pulp.client.extensions.core.PulpCliSection
"""
Expand Down

0 comments on commit a465931

Please sign in to comment.