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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c80431d4b64e781a4d9584982ebb539886ad282
4
- data.tar.gz: 225d49a0f05050accfae05b4df68d45e8d6b951e
3
+ metadata.gz: 269865176708a705ed2d0f3b2a2ad84461cf7a57
4
+ data.tar.gz: f17028b7c22a936bfc89ae230fca77d0397b7d87
5
5
  SHA512:
6
- metadata.gz: 487a0fe583e56791ff00b68fce3e457fc0178690b689db5cbbb993c631c33cd9dc1ea3a9b270f5f85f21cb14f32eea45fda31252357c093724647ec94bbdf2dc
7
- data.tar.gz: aca51603f1c4921a84151d547c901dcf051bb2e8a7f092830ad24dcdbc12f668036fa16d0af88c991503ec095e5a30906ceef119745de2b7440c66b0dcbf0273
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
- ### Run all of the associated ruby specs
15
+
16
+ ### How to build and install the `cf-copilot` ruby gem
16
17
  ```
17
18
  pushd sdk/ruby
18
- bin/test
19
+ bin/build-and-install-copilot-gem
19
20
  popd
20
21
  ```
21
22
 
22
- ### How to build and install the `cf-copilot` ruby gem
23
+ ### How to run tests
23
24
  ```
24
25
  pushd sdk/ruby
25
- bin/build-and-install-copilot-gem
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
- set -euo pipefail
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
- pushd "${COPILOT_ROOT}/cmd"
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."
@@ -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
- route = Api::Route.new(guid: guid, host: host, path: path, internal: internal)
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, :int32, 3
46
+ optional :route_weight, :uint32, 3
46
47
  optional :app_port, :int32, 4
47
48
  end
48
49
  add_message "api.MapRouteRequest" do
@@ -1,5 +1,5 @@
1
1
  module Cloudfoundry
2
2
  module Copilot
3
- VERSION = '0.0.12'.freeze
3
+ VERSION = '0.0.13'.freeze
4
4
  end
5
5
  end
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.12
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-03-26 00:00:00.000000000 Z
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