Ejemplo n.º 1
0
def add_upload_section(context, parent_section):
    """
    add an upload section to the openstack section

    :param context: pulp context
    :type  context: pulp.client.extensions.core.ClientContext
    :param parent_section:  section of the CLI to which the upload section
                            should be added
    :type  parent_section:  pulp.client.extensions.extensions.PulpCliSection
    :return: populated section
    :rtype: PulpCliSection
    """
    upload_section = parent_section.create_subsection(SECTION_UPLOADS,
                                                      DESC_UPLOADS)
    upload_section.add_command(UploadOpenstackImageCommand(context))

    return upload_section
Ejemplo n.º 2
0
 def setUp(self):
     self.context = mock.MagicMock()
     self.context.config = test_config
     self.command = UploadOpenstackImageCommand(self.context)