Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to list modules via "pulp-admin rpm content ..." #1350

Merged
merged 1 commit into from May 24, 2019

Conversation

dralley
Copy link
Contributor

@dralley dralley commented May 20, 2019

[noissue]

I did this during the debugging of https://pulp.plan.io/issues/4693 since it's really simple and much easier than looking in the database.

@dralley
Copy link
Contributor Author

dralley commented May 20, 2019

(pulp) [vagrant@pulp2 devel]$ pulp-admin rpm repo content                                                                                                                                                                                     
Usage: pulp-admin [SUB_SECTION, ..] COMMAND                                                                                                                                                                                                   
Description: search the contents of a repository                                                                                                                                                                                              
                                                                                                                                                                                                                                              
Available Commands:                                                                                                                                                                                                                           
  category     - search for package categories (groups of package groups) in a repository                                                                                                                                                     
  distribution - list distributions in a repository                                                                                                                                                                                           
  drpm         - search for DRPMs in a repository                                                                                                                                                                                             
  environment  - search for package environments (collections of package groups)in a repository                                                                                                                                               
  errata       - search errata in a repository                                                                                                                                                                                                
  group        - search for package groups in a repository                                                                                                                                                                                    
  langpacks    - search for package langpacks in a repository                                                                                                                                                                                 
  metafile     - search for Yum Metadata Files in a repository                                                                                                                                                                                
  modulemd     - search for modules in a repository                                                                                                                                                                                           
  rpm          - search for RPMs in a repository                                                                                                                                                                                              
  srpm         - search for SRPMs in a repository                                 

should it be "module" instead of "modulemd"?

(pulp) [vagrant@pulp2 devel]$ pulp-admin rpm repo content modulemd --repo-id test2                                                                                                                                                            
Arch:               noarch                                                                                                                                                                                                                    
Artifacts:          pteradactyl-0:4.0-1.noarch                                                                                                                                                                                                
Checksum:           c55dd6744844246c173642addd8b3c6db188487b1211f554071fcc56d79c                                                                                                                                                              
                    f535                                                                                                                                                                                                                      
Context:            deadbeef                                                                                                                                                                                                                  
Dependencies:                                                                                                                                                                                                                                 
Description:        A module for the pteradactyl 4.0 package                                                                                                                                                                                  
Downloaded:         True                                                                                                                                                                                                                      
Name:               pteradactyl                                                                                                                                                                                                               
Profiles:                                                                                                                                                                                                                                     
  Default: pteradactyl                                                                                                                                                                                                                        
Pulp User Metadata:                                                                                                                                                                                                                           
Stream:             4                                                                                                                                                                                                                         
Summary:            pteradactyl 4,0 module                                                                                                                                                                                                    
Version:            20180740444407                                                                                                                                                                                                            
                                                                                                                                                                                                                                              
Arch:               noarch                                                                                                                                                                                                                    
Artifacts:          pteradactyl-0:1.0-1.noarch                                                                                                                                                                                                
Checksum:           5eaa04c935afda948abfcb20a7e2137506bf9ee0d01953d0d3ecc345b0f4                                                                                                                                                              
                    287b                                                                                                                                                                                                                      
Context:            deadbeef                                                                                                                                                                                                                  
Dependencies:                                                                                                                                                                                                                                 
Description:        A module for the pteradactyl 1.0 package                                                                                                                                                                                  
Downloaded:         True                                                                                                                                                                                                                      
Name:               pteradactyl                                                                                                                                                                                                               
Profiles:                                                                                                                                                                                                                                     
  Default: pteradactyl                                                                                                                                                                                                                        
Pulp User Metadata:                                                                                                                                                                                                                           
Stream:             1                                                                                                                                                                                                                         
Summary:            pteradactyl 0.1 module                                                                                                                                                                                                    
Version:            20180730223407     

@dralley
Copy link
Contributor Author

dralley commented May 20, 2019

Should module defaults also be able to be listed? Anything I'm missing here?

Note: I have not attempted any kind of filtered searching, just bare listing. I'm not sure if that is provided for "free"

@dralley dralley changed the title Make it possible to list modules under "pulp-admin rpm content" Make it possible to list modules via "pulp-admin rpm content ..." May 20, 2019
@goosemania
Copy link
Member

@dralley , I think it's fine as it is.
I think modulemd is a proper name, I believe I saw somewhere in pulp-admin the usage of "module" word in a different context. So it's good to be clear that we you mean modulemd, plus it's the type_id which is used in API.

If you created an story/issue for that, could you add it to the commit message? Otherwise it looks good, feel free to merge and associate with the redmine issue either by using a proper commit message or manually.
Thank you!

Copy link
Member

@goosemania goosemania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, see my previous comment

@dralley dralley merged commit 9c6faea into pulp:2-master May 24, 2019
@dralley
Copy link
Contributor Author

dralley commented May 29, 2019

@goosemania

re: "I think modulemd is a proper name, I believe I saw somewhere in pulp-admin the usage of "module" word in a different context. So it's good to be clear that we you mean modulemd, plus it's the type_id which is used in API."

I noticed today that the "copy" command uses "module"

[vagrant@pulp2 ~]$ pulp-admin rpm repo copy
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: copies one or more content units between repositories

Available Commands:
  all          - copy all content units from one repository to another
  category     - copy package categories from one repository to another
  distribution - copy distributions from one repository to another
  drpm         - copy DRPMs from one repository to another
  environment  - copy package environment from one repository to another
  errata       - copy errata from one repository to another
  group        - copy package groups from one repository to another
  langpacks    - copy package langpacks from one repository to another
  metafile     - copy yum repo metadata files from one repository to another
  module       - copy a Module from one repository to another
  rpm          - copy RPMs from one repository to another
  srpm         - copy SRPMs from one repository to another
[vagrant@pulp2 ~]$ pulp-admin rpm repo content
Usage: pulp-admin [SUB_SECTION, ..] COMMAND
Description: search the contents of a repository

Available Commands:
  category     - search for package categories (groups of package groups) in a repository
  distribution - list distributions in a repository
  drpm         - search for DRPMs in a repository
  environment  - search for package environments (collections of package groups)in a repository
  errata       - search errata in a repository
  group        - search for package groups in a repository
  langpacks    - search for package langpacks in a repository
  metafile     - search for Yum Metadata Files in a repository
  modulemd     - search for modules in a repository
  rpm          - search for RPMs in a repository
  srpm         - search for SRPMs in a repository
[vagrant@pulp2 ~]$ 

Do you think we should address this inconsistency?

@goosemania
Copy link
Member

goosemania commented May 31, 2019

@dralley , +1 to address any inconsistency, seems to be an easy and quick fix
I'll try to find where I saw modules being used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants