[lxc-devel] [LXD] Default routes changes.

Kunal Kushwaha kunalkushwahaoss at gmail.com
Thu Dec 18 17:46:16 UTC 2014


Hi,

With ref to LXD issue #114 <https://github.com/lxc/lxd/issues/114>

There are two ways to implement the default roots.

1. Initialize within code.
Instead of initializing with empty Config Structure at
https://github.com/lxc/lxd/blob/master/config.go#L56

can  be initialized as

remotes := map[string]RemoteConfig{
"images": RemoteConfig{"https+registry://registry.linuxcontainers.org"},
"local":  RemoteConfig{"unix+lxd://var/lib/lxd/socket"},
}

defaultConfig := &Config{TestOption: "",
DefaultRemote: "",
Remotes:       remotes,
ListenAddr:    "80"}



2. Create a default config file.
While installation, a default config.yml can be create with default
settings.

---
test-option:
default-remote:
remotes:
  images:
    addr: https+registry://registry.linuxcontainers.org
  local:
    addr: unix+lxd://var/lib/lxd/socket
listen-addr: 80


Which approach is better?


Regards,
Kunal Kushwaha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20141218/5352fa79/attachment.html>


More information about the lxc-devel mailing list