The CreatePodBasedTemplateRequest keeps track of pods as a map because we believed that pod order would not be preserved by the design API.
It turns out that order is preserved (except by our map) and that predictable (even if not prescribe-able) order is helpful in anticipating device names selected by Apstra during blueprint scaffolding.
This PR adds a quick sort.Slice() to the pods in CreatePodBasedTemplateRequest.raw()
I also cleaned up sloppy use of context.Todo() and context.Background() in the related tests.
The
CreatePodBasedTemplateRequest
keeps track of pods as a map because we believed that pod order would not be preserved by the design API.It turns out that order is preserved (except by our map) and that predictable (even if not prescribe-able) order is helpful in anticipating device names selected by Apstra during blueprint scaffolding.
This PR adds a quick
sort.Slice()
to the pods inCreatePodBasedTemplateRequest.raw()
I also cleaned up sloppy use of
context.Todo()
andcontext.Background()
in the related tests.