-
Notifications
You must be signed in to change notification settings - Fork 135
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
add endpoints for crud operations & update hardware data model #64
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
892a4ee
added endpoints for crud operations
kqdeng d5a8065
changed template data to be type string instead of bytes
kqdeng dd81468
update hardware struct
kqdeng 7337c30
changed hardware push request data to be type *Hardware
kqdeng c0e731c
changed readTemplateData to return and tryParseTemplate to accept str…
kqdeng 9c991e7
added basic auth to proto endpoints
kqdeng 02957ab
removed ingest method from hardware
kqdeng 6fa5a8f
updated netboot struct
kqdeng 0b144c1
readded bootstrapper struct
kqdeng c6388e5
update dhcp ip
kqdeng 7f09fbc
update hardware proto
kqdeng 960739c
added hardware & workflow endpoints
kqdeng ba5f9ef
updated post endpoints to match get endpoints; fixup
kqdeng a2d8201
changed bymac and byip to use post
kqdeng 12003f7
scrubbed traces of target
kqdeng 377f95b
removed hardware network.default
kqdeng 1a0b67e
filled out hardware storage struct
kqdeng a602855
updated storage filesystem struct
kqdeng a082fac
added/updated envvars in docker-compose file
kqdeng b54b1d8
fixup hardware & template protos
kqdeng ec14f11
added hardware version, updated docker-compose.yml
kqdeng c06bf19
changed log.Fatal to log.Println; updated basic auth to check if user…
kqdeng 0b60b77
allow default grpc and http port to be overridden by envvars
kqdeng 53872e9
brought info log outside of lock/unlock
kqdeng 9b64c8f
prettier
kqdeng b98e2ac
fixup
kqdeng 0e994ef
fixed grpc connection refused; removed cacher from docker-compose.yml
kqdeng aab2e1c
updated http server to handle if TINKERBELL_GRPC_AUTHORITY is just th…
kqdeng 1ddde35
fixup
kqdeng a2944c1
updated hardware proto field names
kqdeng bc1a5a9
updated basic auth envvars to default to empty
kqdeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way for the generated code to influence the name for the generated struct fields? Looking at
Ip
->IP
andMac
->MAC
and maybe others?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't really look into it too much since it seemed to work fine with boots without any issue. Is there a reason/necessity for the names to be capitalized? I could change them back to uppercase in the proto if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a code nit, but acronyms should be in all caps. It also matches the types in the stdlib so not being an oddball would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I'll change it back then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember why I decided on all lowercase, it's because there are problems when the message name is the same as the field name. For example:
this is giving me the error:
So I decided on all lowercase for the field name (which is also the convention for protobuf).
I could still rename the message name to something like "Raid", so I guess it all boils down to which convention to follow (go's or protobuf's). Which one should I go with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok, sigh. lets go with protobuf then. I'm curious is there an equivalent of
json:"SomeKeyName"
metadata we can add so we can both?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like no. golang/protobuf#555. In that case lets stay with protobuf norms. Transforming protoc generated structs into human readable/meaningful structs is something that I think always makes sense and we could address then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, gotcha