configdrive: Remove broken support for ec2 metadata

As it turns out, certain metadata is only present in the ec2 flavor
of metadata (e.g. public_ipv4) and other data is only present in
the openstack flavor (e.g. network_config). For now, just read the
openstack metadata.
This commit is contained in:
Alex Crawford
2014-08-15 10:29:08 -07:00
parent 24b44e86a6
commit f0b9eaf2fe
3 changed files with 22 additions and 36 deletions

View File

@@ -258,7 +258,9 @@ func Apply(cfg CloudConfig, env *Environment) error {
}
if env.NetconfType() != "" {
netconfBytes, err := ioutil.ReadFile(path.Join(env.ConfigRoot(), cfg.NetworkConfigPath))
filename := path.Join(env.ConfigRoot(), cfg.NetworkConfigPath)
log.Printf("Attempting to read config from %q\n", filename)
netconfBytes, err := ioutil.ReadFile(filename)
if err != nil {
return err
}