Exemplo n.º 1
0
def initialize(context):
    structure.ensure_structure(context.cli)

    repo_section = structure.repo_section(context.cli)
    repo_section.add_command(repo.CreatePuppetRepositoryCommand(context))
    repo_section.add_command(cudl.UpdateRepositoryCommand(context))
    repo_section.add_command(cudl.DeleteRepositoryCommand(context))
    repo_section.add_command(repo.ListPuppetRepositoriesCommand(context))
    repo_section.add_command(repo.SearchPuppetRepositoriesCommand(context))

    group_section = structure.repo_group_section(context.cli)
    group_section.add_command(group.CreateRepositoryGroupCommand(context))
    group_section.add_command(group.UpdateRepositoryGroupCommand(context))
    group_section.add_command(group.DeleteRepositoryGroupCommand(context))
    group_section.add_command(group.ListRepositoryGroupsCommand(context))

    members_section = structure.repo_group_members_section(context.cli)
    members_section.add_command(group.AddRepositoryGroupMembersCommand(context))
    members_section.add_command(group.RemoveRepositoryGroupMembersCommand(context))
    members_section.add_command(group.ListRepositoryGroupMembersCommand(context))

    sync_section = structure.repo_sync_section(context.cli)
    renderer = status.PuppetStatusRenderer(context)
    sync_section.add_command(sync_publish.RunSyncRepositoryCommand(context, renderer))
    sync_section.add_command(sync_publish.SyncStatusCommand(context, renderer))
Exemplo n.º 2
0
def initialize(context):
    structure.ensure_structure(context.cli)

    repo_section = structure.repo_section(context.cli)
    repo_section.add_command(repo.CreatePuppetRepositoryCommand(context))
    repo_section.add_command(repo.UpdatePuppetRepositoryCommand(context))
    repo_section.add_command(cudl.DeleteRepositoryCommand(context))
    repo_section.add_command(repo.ListPuppetRepositoriesCommand(context))
    repo_section.add_command(repo.SearchPuppetRepositoriesCommand(context))

    repo_section.add_command(modules.ModulesCommand(context))
    repo_section.add_command(copy.PuppetModuleCopyCommand(context))

    group_section = structure.repo_group_section(context.cli)
    group_section.add_command(group.CreateRepositoryGroupCommand(context))
    group_section.add_command(group.UpdateRepositoryGroupCommand(context))
    group_section.add_command(group.DeleteRepositoryGroupCommand(context))
    group_section.add_command(group.ListRepositoryGroupsCommand(context))

    members_section = structure.repo_group_members_section(context.cli)
    members_section.add_command(group.AddRepositoryGroupMembersCommand(context))
    members_section.add_command(group.RemoveRepositoryGroupMembersCommand(context))
    members_section.add_command(group.ListRepositoryGroupMembersCommand(context))

    sync_section = structure.repo_sync_section(context.cli)
    renderer = status.PuppetStatusRenderer(context)
    sync_section.add_command(sync_publish.RunSyncRepositoryCommand(context, renderer))
    sync_section.add_command(sync_publish.SyncStatusCommand(context, renderer))

    upload_manager = _upload_manager(context)
    uploads_section = structure.repo_uploads_section(context.cli)
    uploads_section.add_command(puppet_upload.UploadModuleCommand(context, upload_manager))
    uploads_section.add_command(upload.ListCommand(context, upload_manager))
    uploads_section.add_command(upload.CancelCommand(context, upload_manager))
    uploads_section.add_command(upload.ResumeCommand(context, upload_manager))
Exemplo n.º 3
0
 def test_repo_sync_section(self):
     section = structure.repo_sync_section(self.cli)
     self.assertEqual(section.name, structure.SECTION_SYNC)