azure: add support for azure (via azure agent)
This commit is contained in:
parent
84e1cb3242
commit
2a71551ef2
@ -16,6 +16,7 @@ import (
|
||||
"github.com/coreos/coreos-cloudinit/datasource/metadata/ec2"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/proc_cmdline"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/url"
|
||||
"github.com/coreos/coreos-cloudinit/datasource/waagent"
|
||||
"github.com/coreos/coreos-cloudinit/initialize"
|
||||
"github.com/coreos/coreos-cloudinit/pkg"
|
||||
"github.com/coreos/coreos-cloudinit/system"
|
||||
@ -35,6 +36,7 @@ var (
|
||||
sources struct {
|
||||
file string
|
||||
configDrive string
|
||||
waagent string
|
||||
metadataService bool
|
||||
ec2MetadataService string
|
||||
cloudSigmaMetadataService bool
|
||||
@ -54,6 +56,7 @@ func init() {
|
||||
flag.BoolVar(&flags.ignoreFailure, "ignore-failure", false, "Exits with 0 status in the event of malformed input from user-data")
|
||||
flag.StringVar(&flags.sources.file, "from-file", "", "Read user-data from provided file")
|
||||
flag.StringVar(&flags.sources.configDrive, "from-configdrive", "", "Read data from provided cloud-drive directory")
|
||||
flag.StringVar(&flags.sources.waagent, "from-waagent", "", "Read data from provided waagent directory")
|
||||
flag.BoolVar(&flags.sources.metadataService, "from-metadata-service", false, "[DEPRECATED - Use -from-ec2-metadata] Download data from metadata service")
|
||||
flag.StringVar(&flags.sources.ec2MetadataService, "from-ec2-metadata", "", "Download EC2 data from the provided url")
|
||||
flag.BoolVar(&flags.sources.cloudSigmaMetadataService, "from-cloudsigma-metadata", false, "Download data from CloudSigma server context")
|
||||
@ -82,6 +85,9 @@ var (
|
||||
"from-configdrive": "/media/configdrive",
|
||||
"convert-netconf": "debian",
|
||||
},
|
||||
"azure": oemConfig{
|
||||
"from-waagent": "/var/lib/waagent",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
@ -279,6 +285,9 @@ func getDatasources() []datasource.Datasource {
|
||||
if flags.sources.digitalOceanMetadataService != "" {
|
||||
dss = append(dss, digitalocean.NewDatasource(flags.sources.digitalOceanMetadataService))
|
||||
}
|
||||
if flags.sources.waagent != "" {
|
||||
dss = append(dss, waagent.NewDatasource(flags.sources.waagent))
|
||||
}
|
||||
if flags.sources.procCmdLine {
|
||||
dss = append(dss, proc_cmdline.NewDatasource())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user