Blame SOURCES/change-coreos.com-network-to-atomic.io-network-in-he.patch

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