Skip to content

Add description field to the OSResource in Inventory and REST API #3

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daniele-moro
Copy link
Contributor

PULL DESCRIPTION

Provide a 1-2 line brief overview of the changes submitted through the Pull Request...

Impact Analysis

Info Please fill out this column
Root Cause Specifically for bugs, empty in case of no variants
Jira ticket Add the name to the Jira ticket

CODE MAINTAINABILITY

  • Added required new tests relevant to the changes and the URL has been included
  • Updated Documentation as relevant to the changes
  • PR change contains code related to security
  • PR introduces changes that break compatibility with other modules/services (If YES, please provide description)

Code must act as a teacher for future developers

@@ -5991,6 +5991,11 @@ components:
type: string
maxLength: 128
pattern: '^[a-zA-Z-_0-9. ()]+$'
description:
Copy link
Contributor

Choose a reason for hiding this comment

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

readonly?

@@ -26,6 +26,7 @@ var OpenAPIOSResourceToProto = map[string]string{
"kernelCommand": osv1.OperatingSystemResourceFieldKernelCommand,
"updateSources": osv1.OperatingSystemResourceFieldUpdateSources,
"installedPackages": osv1.OperatingSystemResourceFieldInstalledPackages,
"description": osv1.OperatingSystemResourceFieldDescription,
Copy link
Contributor

Choose a reason for hiding this comment

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

move to the slice below if we make it readonly

@@ -409,6 +410,10 @@ func openapiToGrpcOSResource(body *api.OperatingSystemResource) (*osv1.Operating
os.Name = *body.Name
}

if body.Description != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not needed if the description cannot be changed by the user

@@ -114,6 +114,17 @@ message OperatingSystemResource {
immutable: true
}]; // An opaque JSON string storing a reference to custom installation script(s) that supplements the base OS with additional OS-level dependencies/configurations. If empty, the default OS installation will be used.

string description = 16 [
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be immutable?

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

Successfully merging this pull request may close these issues.

2 participants