- Nov 04, 2017
-
-
Jessica Yuen authored
This commit will add an interface `SetEnvironmentParams` to metadata.Manager that allows setting of env params. Also implements the logic for parsing the jsonnet snippet to append / modify params in simple env param schemas. It will: 1. Update the params if the component exists in the jsonnet snippet. 2. Add the component if it does not exist.
-
Jessica Yuen authored
This commit will add an interface `GetComponentParams` to metadata.Manager that returns a map of parameters for the passed in component. Also implements the logic for parsing the jsonnet snippet to retrieve the parameters. This functionality will later support new commands to list parameters.
-
Jessica Yuen authored
This commit will: 1. Add an interface `SetComponentParams` to metadata.Manager that takes a list of parameters and sets those fields for the given component. 2. Add the jsonnet snippet manipulation logic that does the 'setting'. Parameters are set by: a. Keeping track of the parameters that are to be modified / added -- this defaults to the parameters provided to us. b. Discovering the current parameters in the existing snippet. c. Adding any parameters from (b) that is not in (a). d. Swapping out the old parameters with (c) in the snippet based on the location text span, and returning the new snippet.
-
Jessica Yuen authored
This commit will append both mandatory and optional prototype parameters to the component params.libsonnet file on `ks gen foo ...`. Default values will be used for optional params where the user does not specify flags to `ks gen foo ...`. Because we are trying to append to jsonnet, we will have to traverse the AST to first identify the location of where to insert the new component params. New components will be inserted at the bottom of the components object, with the params ordered alphabetically.
-