cf-copilot 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/bin/run-tests-in-docker +5 -0
- data/bin/test +10 -9
- data/lib/cf-copilot.rb +5 -2
- data/lib/copilot/protos/cloud_controller_pb.rb +2 -1
- data/lib/copilot/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 269865176708a705ed2d0f3b2a2ad84461cf7a57
|
4
|
+
data.tar.gz: f17028b7c22a936bfc89ae230fca77d0397b7d87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00de273ffd184a13efd6605537d325a737127117fd39ca1243182e284e3f93b2eba058825fc9436953c52c9bc884d26041e09b42ba045a9d721c433db1b5c7ec
|
7
|
+
data.tar.gz: 4f89fef2d39c84a72eb66bc150655bb354250dc3a2a2d0de69829c01fc64d06208cca35a09c3a7dd44859c861b6b7ab1e4f39baed9422a77b88b9240bb5815eb
|
data/README.md
CHANGED
@@ -12,16 +12,17 @@ pushd sdk/ruby
|
|
12
12
|
popd
|
13
13
|
```
|
14
14
|
|
15
|
-
|
15
|
+
|
16
|
+
### How to build and install the `cf-copilot` ruby gem
|
16
17
|
```
|
17
18
|
pushd sdk/ruby
|
18
|
-
bin/
|
19
|
+
bin/build-and-install-copilot-gem
|
19
20
|
popd
|
20
21
|
```
|
21
22
|
|
22
|
-
### How to
|
23
|
+
### How to run tests
|
23
24
|
```
|
24
25
|
pushd sdk/ruby
|
25
|
-
bin/
|
26
|
+
bin/run-tests-in-docker
|
26
27
|
popd
|
27
28
|
```
|
@@ -0,0 +1,5 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# echo "Run to run the tests!"
|
4
|
+
|
5
|
+
docker run -v ~/workspace/istio-release/src/code.cloudfoundry.org/copilot/:/go/src/code.cloudfoundry.org/copilot -it cloudfoundry/cf-routing-pipeline /bin/bash -c "ln -s /go/src/code.cloudfoundry.org/copilot/sdk/ruby/bin/test tests; ./tests; /bin/bash"
|
data/bin/test
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
3
|
+
export GOPATH=${PWD}/go
|
4
|
+
export PATH=$PATH:$GOPATH/bin
|
5
|
+
go get github.com/onsi/ginkgo/ginkgo
|
6
|
+
go get github.com/golang/dep/cmd/dep
|
7
|
+
cd go/src/code.cloudfoundry.org/copilot
|
8
|
+
go install ./cmd/copilot-server
|
9
|
+
cd sdk/ruby
|
10
|
+
bundle install
|
11
|
+
bundle exec rspec
|
4
12
|
|
5
|
-
|
6
|
-
go install ./copilot-server
|
7
|
-
popd
|
8
|
-
|
9
|
-
pushd "${COPILOT_ROOT}/sdk/ruby"
|
10
|
-
bundle install
|
11
|
-
bundle exec rspec
|
12
|
-
popd
|
13
|
+
echo "Rerun ./tests as much as you need."
|
data/lib/cf-copilot.rb
CHANGED
@@ -27,8 +27,11 @@ module Cloudfoundry
|
|
27
27
|
service.health(request)
|
28
28
|
end
|
29
29
|
|
30
|
-
def upsert_route(guid:, host:, path: '', internal: false)
|
31
|
-
|
30
|
+
def upsert_route(guid:, host:, path: '', internal: false, vip: nil)
|
31
|
+
if internal && vip.nil?
|
32
|
+
raise Cloudfoundry::Copilot::Client::PilotError, "vip required for internal routes"
|
33
|
+
end
|
34
|
+
route = Api::Route.new(guid: guid, host: host, path: path, internal: internal, vip: vip)
|
32
35
|
request = Api::UpsertRouteRequest.new(route: route)
|
33
36
|
service.upsert_route(request)
|
34
37
|
rescue GRPC::BadStatus => e
|
@@ -28,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
28
28
|
optional :host, :string, 2
|
29
29
|
optional :path, :string, 3
|
30
30
|
optional :internal, :bool, 4
|
31
|
+
optional :vip, :string, 5
|
31
32
|
end
|
32
33
|
add_message "api.UpsertRouteRequest" do
|
33
34
|
optional :route, :message, 1, "api.Route"
|
@@ -42,7 +43,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
42
43
|
add_message "api.RouteMapping" do
|
43
44
|
optional :capi_process_guid, :string, 1
|
44
45
|
optional :route_guid, :string, 2
|
45
|
-
optional :route_weight, :
|
46
|
+
optional :route_weight, :uint32, 3
|
46
47
|
optional :app_port, :int32, 4
|
47
48
|
end
|
48
49
|
add_message "api.MapRouteRequest" do
|
data/lib/copilot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf-copilot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloud Foundry Routing Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grpc
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- bin/dockerized-rebuild-proto
|
95
95
|
- bin/generate-protos
|
96
96
|
- bin/push-gem
|
97
|
+
- bin/run-tests-in-docker
|
97
98
|
- bin/test
|
98
99
|
- lib/cf-copilot.rb
|
99
100
|
- lib/copilot/protos/cloud_controller_pb.rb
|