Blob Blame History Raw
From a9ca02c0e9ec58f86171a1bf9d122bd1d1656d01 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Fri, 16 Dec 2016 17:07:05 +0100
Subject: [PATCH] change coreos.com/network to atomic.io/network in help and
 docs

---
 Documentation/aws-vpc-backend.md |  2 +-
 Documentation/gce-backend.md     |  2 +-
 README.md                        | 10 +++++-----
 main.go                          |  2 +-
 subnet/mock_etcd_test.go         | 34 +++++++++++++++++-----------------
 subnet/registry.go               |  2 +-
 subnet/registry_test.go          |  8 ++++----
 7 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/Documentation/aws-vpc-backend.md b/Documentation/aws-vpc-backend.md
index 357c9e9..68217d4 100644
--- a/Documentation/aws-vpc-backend.md
+++ b/Documentation/aws-vpc-backend.md
@@ -116,7 +116,7 @@ $ etcd2 -advertise-client-urls http://$INTERNAL_IP:2379 -listen-client-urls http
 - Publish configuration in etcd (ensure that the network range does not overlap with the one configured for the VPC)
 
 ```
-$ etcdctl set /coreos.com/network/config '{"Network":"10.20.0.0/16", "Backend": {"Type": "aws-vpc"}}'
+$ etcdctl set /atomic.io/network/config '{"Network":"10.20.0.0/16", "Backend": {"Type": "aws-vpc"}}'
 ```
 - Fetch the latest release using wget from [here](https://github.com/coreos/flannel/releases/download/v0.5.0/flannel-0.5.0-linux-amd64.tar.gz)
 - Run flannel daemon:
diff --git a/Documentation/gce-backend.md b/Documentation/gce-backend.md
index 35ed8b4..675c4b0 100644
--- a/Documentation/gce-backend.md
+++ b/Documentation/gce-backend.md
@@ -44,7 +44,7 @@ $ etcd2 -advertise-client-urls http://$INTERNAL_IP:2379 -listen-client-urls http
 - Publish configuration in etcd (ensure that the network range does not overlap with the one configured for the GCE network)
 
 ```
-$ etcdctl set /coreos.com/network/config '{"Network":"10.40.0.0/16", "Backend": {"Type": "gce"}}'
+$ etcdctl set /atomic.io/network/config '{"Network":"10.40.0.0/16", "Backend": {"Type": "gce"}}'
 ```
 
 - Fetch the 0.5 release using wget from [here](https://github.com/coreos/flannel/releases/download/v0.5.0/flannel-0.5.0-linux-amd64.tar.gz)
diff --git a/README.md b/README.md
index 6e691c6..7b05d41 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ docker run -v $SRC:/opt/flannel -i -t google/golang /bin/bash -c "cd /opt/flanne
 ## Configuration
 
 flannel reads its configuration from etcd.
-By default, it will read the configuration from `/coreos.com/network/config` (can be overridden via `--etcd-prefix`).
+By default, it will read the configuration from `/atomic.io/network/config` (can be overridden via `--etcd-prefix`).
 You can use `etcdctl` utility to set values in etcd.
 The value of the config is a JSON dictionary with the following keys:
 
@@ -147,9 +147,9 @@ Multi-network mode allows a single flannel daemon to join multiple networks.
 Each network is independent from each other and has its own configuration, IP space, interfaces.
 To configure three networks -- in this example named `blue`, `green`, and `red` -- start by publishing their configurations to etcd in different locations:
 ```
-$ etcdctl set /coreos.com/network/blue/config  '{ "Network": "10.1.0.0/16", "Backend": { "Type": "vxlan", "VNI": 1 } }'
-$ etcdctl set /coreos.com/network/green/config '{ "Network": "10.2.0.0/16", "Backend": { "Type": "vxlan", "VNI": 2 } }'
-$ etcdctl set /coreos.com/network/red/config   '{ "Network": "10.3.0.0/16", "Backend": { "Type": "vxlan", "VNI": 3 } }'
+$ etcdctl set /atomic.io/network/blue/config  '{ "Network": "10.1.0.0/16", "Backend": { "Type": "vxlan", "VNI": 1 } }'
+$ etcdctl set /atomic.io/network/green/config '{ "Network": "10.2.0.0/16", "Backend": { "Type": "vxlan", "VNI": 2 } }'
+$ etcdctl set /atomic.io/network/red/config   '{ "Network": "10.3.0.0/16", "Backend": { "Type": "vxlan", "VNI": 3 } }'
 ```
 
 Next, start the flannel daemon, specifying the networks to join:
@@ -183,7 +183,7 @@ $ flanneld --remote=10.0.0.3:8888 --networks=blue,green
 ```
 --public-ip="": IP accessible by other nodes for inter-host communication. Defaults to the IP of the interface being used for communication.
 --etcd-endpoints=http://127.0.0.1:2379: a comma-delimited list of etcd endpoints.
---etcd-prefix=/coreos.com/network: etcd prefix.
+--etcd-prefix=/atomic.io/network: etcd prefix.
 --etcd-keyfile="": SSL key file used to secure etcd communication.
 --etcd-certfile="": SSL certification file used to secure etcd communication.
 --etcd-cafile="": SSL Certificate Authority file used to secure etcd communication.
diff --git a/main.go b/main.go
index b6493e0..5adfb55 100644
--- a/main.go
+++ b/main.go
@@ -62,7 +62,7 @@ var opts CmdLineOpts
 
 func init() {
 	flag.StringVar(&opts.etcdEndpoints, "etcd-endpoints", "http://127.0.0.1:2379", "a comma-delimited list of etcd endpoints")
-	flag.StringVar(&opts.etcdPrefix, "etcd-prefix", "/coreos.com/network", "etcd prefix")
+	flag.StringVar(&opts.etcdPrefix, "etcd-prefix", "/atomic.io/network", "etcd prefix")
 	flag.StringVar(&opts.etcdKeyfile, "etcd-keyfile", "", "SSL key file used to secure etcd communication")
 	flag.StringVar(&opts.etcdCertfile, "etcd-certfile", "", "SSL certification file used to secure etcd communication")
 	flag.StringVar(&opts.etcdCAFile, "etcd-cafile", "", "SSL Certificate Authority file used to secure etcd communication")
diff --git a/subnet/mock_etcd_test.go b/subnet/mock_etcd_test.go
index 8927cd2..e838282 100644
--- a/subnet/mock_etcd_test.go
+++ b/subnet/mock_etcd_test.go
@@ -70,17 +70,17 @@ func watchMockEtcd(ctx context.Context, watcher etcd.Watcher, result chan error)
 	}
 
 	expected := []evt{
-		{"/coreos.com/network/foobar/config", "create", false},
-		{"/coreos.com/network/blah/config", "create", false},
-		{"/coreos.com/network/blah/config", "update", false},
-		{"/coreos.com/network/foobar/config", "delete", false},
-		{"/coreos.com/network/foobar", "delete", false},
+		{"/atomic.io/network/foobar/config", "create", false},
+		{"/atomic.io/network/blah/config", "create", false},
+		{"/atomic.io/network/blah/config", "update", false},
+		{"/atomic.io/network/foobar/config", "delete", false},
+		{"/atomic.io/network/foobar", "delete", false},
 	}
 
-	// Wait for delete events on /coreos.com/network/foobar and its
+	// Wait for delete events on /atomic.io/network/foobar and its
 	// 'config' child, and for the update event on
-	// /coreos.com/network/foobar (for 'config' delete) and on
-	// /coreos.com/network (for 'foobar' delete)
+	// /atomic.io/network/foobar (for 'config' delete) and on
+	// /atomic.io/network (for 'foobar' delete)
 	numEvents := 0
 	for {
 		resp, err := watcher.Next(ctx)
@@ -134,24 +134,24 @@ func TestMockEtcd(t *testing.T) {
 
 	// Create base test keys
 	sopts := &etcd.SetOptions{Dir: true}
-	r, err = m.Set(ctx, "/coreos.com/network", "", sopts)
+	r, err = m.Set(ctx, "/atomic.io/network", "", sopts)
 	e = &etcd.Response{Action: "create", Index: 1002}
 	expectSuccess(t, r, err, e, "")
 
 	wopts := &etcd.WatcherOptions{AfterIndex: m.index, Recursive: true}
-	watcher := m.Watcher("/coreos.com/network", wopts)
+	watcher := m.Watcher("/atomic.io/network", wopts)
 
 	result := make(chan error, 1)
 	go watchMockEtcd(ctx, watcher, result)
 
 	// Populate etcd with some keys
-	netKey1 := "/coreos.com/network/foobar/config"
+	netKey1 := "/atomic.io/network/foobar/config"
 	netValue := "{ \"Network\": \"10.1.0.0/16\", \"Backend\": { \"Type\": \"host-gw\" } }"
 	r, err = m.Create(ctx, netKey1, netValue)
 	e = &etcd.Response{Action: "create", Index: 1004}
 	expectSuccess(t, r, err, e, netValue)
 
-	netKey2 := "/coreos.com/network/blah/config"
+	netKey2 := "/atomic.io/network/blah/config"
 	netValue = "{ \"Network\": \"10.1.1.0/16\", \"Backend\": { \"Type\": \"host-gw\" } }"
 	r, err = m.Create(ctx, netKey2, netValue)
 	e = &etcd.Response{Action: "create", Index: 1006}
@@ -178,7 +178,7 @@ func TestMockEtcd(t *testing.T) {
 
 	// test directory listing
 	opts = &etcd.GetOptions{Recursive: true, Quorum: true}
-	r, err = m.Get(ctx, "/coreos.com/network/", opts)
+	r, err = m.Get(ctx, "/atomic.io/network/", opts)
 	e = &etcd.Response{Action: "get", Index: 1007}
 	expectSuccess(t, r, err, e, "")
 
@@ -191,9 +191,9 @@ func TestMockEtcd(t *testing.T) {
 		if child.Dir != true {
 			t.Fatalf("Unexpected non-directory child %s", child.Key)
 		}
-		if child.Key == "/coreos.com/network/foobar" {
+		if child.Key == "/atomic.io/network/foobar" {
 			node1Found = true
-		} else if child.Key == "/coreos.com/network/blah" {
+		} else if child.Key == "/atomic.io/network/blah" {
 			node2Found = true
 		} else {
 			t.Fatalf("Unexpected child %s found", child.Key)
@@ -208,14 +208,14 @@ func TestMockEtcd(t *testing.T) {
 
 	// Delete a key
 	dopts := &etcd.DeleteOptions{Recursive: true, Dir: false}
-	r, err = m.Delete(ctx, "/coreos.com/network/foobar", dopts)
+	r, err = m.Delete(ctx, "/atomic.io/network/foobar", dopts)
 	if err == nil {
 		t.Fatalf("Unexpected success deleting a directory")
 	}
 
 	// Delete a key
 	dopts = &etcd.DeleteOptions{Recursive: true, Dir: true}
-	r, err = m.Delete(ctx, "/coreos.com/network/foobar", dopts)
+	r, err = m.Delete(ctx, "/atomic.io/network/foobar", dopts)
 	e = &etcd.Response{Action: "delete", Index: 1010}
 	expectSuccess(t, r, err, e, "")
 
diff --git a/subnet/registry.go b/subnet/registry.go
index dd8083b..42cbfb0 100644
--- a/subnet/registry.go
+++ b/subnet/registry.go
@@ -384,7 +384,7 @@ func (esr *etcdSubnetRegistry) parseNetworkWatchResponse(resp *etcd.Response) (E
 	return evt, index, nil
 }
 
-// Returns network name from config key (eg, /coreos.com/network/foobar/config),
+// Returns network name from config key (eg, /atomic.io/network/foobar/config),
 // if the 'config' key isn't present we don't consider the network valid
 func (esr *etcdSubnetRegistry) parseNetworkKey(s string) (string, bool) {
 	if parts := esr.networkRegex.FindStringSubmatch(s); len(parts) == 3 {
diff --git a/subnet/registry_test.go b/subnet/registry_test.go
index 8d7524f..4c64423 100644
--- a/subnet/registry_test.go
+++ b/subnet/registry_test.go
@@ -29,7 +29,7 @@ import (
 func newTestEtcdRegistry(t *testing.T) (Registry, *mockEtcd) {
 	cfg := &EtcdConfig{
 		Endpoints: []string{"http://127.0.0.1:4001", "http://127.0.0.1:2379"},
-		Prefix:    "/coreos.com/network",
+		Prefix:    "/atomic.io/network",
 	}
 
 	r, err := newEtcdSubnetRegistry(cfg, func(c *EtcdConfig) (etcd.KeysAPI, error) {
@@ -105,7 +105,7 @@ func TestEtcdRegistry(t *testing.T) {
 	}
 
 	// Populate etcd with a network
-	netKey := "/coreos.com/network/foobar/config"
+	netKey := "/atomic.io/network/foobar/config"
 	netValue := "{ \"Network\": \"10.1.0.0/16\", \"Backend\": { \"Type\": \"host-gw\" } }"
 	m.Create(ctx, netKey, netValue)
 
@@ -155,7 +155,7 @@ func TestEtcdRegistry(t *testing.T) {
 	}
 
 	// Make sure the lease got created
-	resp, err := m.Get(ctx, "/coreos.com/network/foobar/subnets/10.1.5.0-24", nil)
+	resp, err := m.Get(ctx, "/atomic.io/network/foobar/subnets/10.1.5.0-24", nil)
 	if err != nil {
 		t.Fatal("Failed to verify subnet lease directly in etcd: %v", err)
 	}
@@ -185,7 +185,7 @@ func TestEtcdRegistry(t *testing.T) {
 	}
 
 	// Make sure the lease got deleted
-	resp, err = m.Get(ctx, "/coreos.com/network/foobar/subnets/10.1.5.0-24", nil)
+	resp, err = m.Get(ctx, "/atomic.io/network/foobar/subnets/10.1.5.0-24", nil)
 	if err == nil {
 		t.Fatal("Unexpected success getting deleted subnet")
 	}
-- 
2.7.4