2016-03-18 14:53:27 -04:00
|
|
|
package libcontainerd
|
|
|
|
|
|
|
|
import "strings"
|
|
|
|
|
|
|
|
// setupEnvironmentVariables convert a string array of environment variables
|
|
|
|
// into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc.
|
|
|
|
func setupEnvironmentVariables(a []string) map[string]string {
|
|
|
|
r := make(map[string]string)
|
|
|
|
for _, s := range a {
|
|
|
|
arr := strings.Split(s, "=")
|
|
|
|
if len(arr) == 2 {
|
|
|
|
r[arr[0]] = arr[1]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return r
|
|
|
|
}
|
2016-04-13 16:34:07 -04:00
|
|
|
|
|
|
|
// Apply for a servicing option is a no-op.
|
|
|
|
func (s *ServicingOption) Apply(interface{}) error {
|
|
|
|
return nil
|
|
|
|
}
|