datasource: use opaque object instead of string

Rather than serializing the network config into a string and then later
deserializing it, just pass the object through directly.
This commit is contained in:
Alex Crawford
2015-05-15 12:40:23 -07:00
parent 81ffa056bd
commit 9ba25550a1
8 changed files with 56 additions and 68 deletions

View File

@@ -96,7 +96,7 @@ func (ms *metadataService) FetchMetadata() (metadata datasource.Metadata, err er
metadata.SSHPublicKeys[strconv.Itoa(i)] = key
}
metadata.NetworkConfig, err = json.Marshal(m.NetworkData)
metadata.NetworkConfig = m.NetworkData
return
}