Merged
Conversation
gsnyder2007
approved these changes
Apr 22, 2019
Contributor
gsnyder2007
left a comment
There was a problem hiding this comment.
Changes to HubRestApi.py are fine so I'm approving. Treat my other feedback as suggestions only.
| main_data = main_project_release['_meta']['href'].split('/') | ||
| sub_data = sub_project_release['_meta']['href'].split('/') | ||
| url = self.get_apibase() + "/v1/releases/" + main_data[7] + "/component-bom-entries" | ||
| print (url) |
Contributor
There was a problem hiding this comment.
Please avoid using print and use logging.debug instead
| payload['producerProject']['id'] = sub_data[5] | ||
| payload['producerRelease'] = {} | ||
| payload['producerRelease']['id'] = sub_data[7] | ||
| print (json.dumps(payload)) |
Contributor
There was a problem hiding this comment.
logging.debug in place of print please
| main_data = main_project_release['_meta']['href'].split('/') | ||
| sub_data = sub_project_release['_meta']['href'].split('/') | ||
| url = self.get_apibase() + "/v1/releases/" + main_data[7] + "/component-bom-entries" | ||
| print (url) |
| entity['entityKey']['entityId'] = sub_data[7] | ||
| entity['entityKey']['entityType'] = 'RL' | ||
| payload.append(entity) | ||
| print (json.dumps(payload)) |
|
|
||
| def main(argv=None): | ||
|
|
||
| if argv is None: |
Contributor
There was a problem hiding this comment.
does use of ArgumentParser make this code (argv) redundant?
| ''' | ||
| quick and dirty wrapper to process some docker functionality | ||
| ''' | ||
| class docker_wrapper(): |
Contributor
There was a problem hiding this comment.
small nit, but does this class name conform to Python styling conventions? Camel case?
| data = json.load(fp) | ||
| return data | ||
|
|
||
| class detector(): |
Contributor
There was a problem hiding this comment.
Camel case? i.e. Detector instead of detector?
| cmd.extend(options) | ||
| subprocess.run(cmd) | ||
|
|
||
| class container_image_scanner(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added few functions to support layer by layer scan for container images as well as a tool to perform such scan