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

Allow empty "static_route" Set #105

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

zuzzas
Copy link
Contributor

@zuzzas zuzzas commented Sep 8, 2020

The "static_route" block is marked as optional. Unfortunately, a function that converts a set into a gRPC struct is not aware of that fact.

@GennadySpb GennadySpb added the vpc label Sep 10, 2020
@GennadySpb
Copy link
Contributor

Hi @zuzzas ! Thank you for PR!

Please add record to CHANGELOG.

}

if v, ok := res["next_hop_address"].(string); ok {
sr.NextHop = &vpc.StaticRoute_NextHopAddress{
NextHopAddress: v,
}
} else {
return nil, errors.New("\"static_route\" should have a \"next_hop_address\" field")
Copy link
Contributor

Choose a reason for hiding this comment

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

Use single quotes for field names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
@zuzzas
Copy link
Contributor Author

zuzzas commented Sep 22, 2020

@GennadySpb
Done.

@GennadySpb GennadySpb merged commit 071d32b into yandex-cloud:master Oct 2, 2020
@GennadySpb
Copy link
Contributor

@zuzzas merged! I'm sorry for the delay.

GennadySpb added a commit that referenced this pull request Oct 2, 2020
@zuzzas zuzzas deleted the fix-route-table-optionality branch October 2, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants