add missing NetworkPolicyV1Endpoint field to Data struct #3417
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.
Description of the Change
There is a NetworkPolicyV1Endpoint field missing in a Data struct, this change adds that single field
Why Is This PR Valuable?
Currently the NetworkPolicyV1Endpoint field in your $CF_HOME/config.json file gets wiped out if you execute a cf plugin subcommand while your AccessToken is expired. Your AccessToken is renewed and your config.json file is rewritten, but then the NetworkPolicyV1Endpoint is gone, which then causes your next "cf network-policies" command to fail.
You have to either manually edit the config.json file and add the field back, or do a "cf login ...." again.
Mind that this only happens if using plugin subcommands, not with the builtin cf subcommands like cf apps, cf services etc.
Applicable Issues
None
How Urgent Is The Change?
No, just a bug under specific circumstances.
Other Relevant Parties
Anyone using plugins that need the cf AccessToken.