Skip to content

Commit

Permalink
Remove unused errors from API / protobuf defs
Browse files Browse the repository at this point in the history
[#154750060]
  • Loading branch information
goonzoid committed Mar 2, 2018
1 parent 49f0ccd commit 08d8320
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 133 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ interface](https://godoc.org/github.com/cloudfoundry/bbs#InternalClient) to modi

## Code Generation

The protobuf models in this repository require version 3 of the `protoc` compiler.

The protobuf models in this repository require version 3.5 or later of the `protoc` compiler.

### OSX

Expand All @@ -44,7 +43,6 @@ go install github.com/gogo/protobuf/protoc-gen-gogoslick

Run `go generate ./...` from the root directory of this repository to generate code from the `.proto` files as well as to generate fake implementations of certain interfaces for use in test code.


### Generating ruby models for BBS models

The following documentation assume the following versions:
Expand Down
200 changes: 89 additions & 111 deletions models/error.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions models/error.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ option (gogoproto.goproto_enum_prefix_all) = true;

message Error {
enum Type {
reserved 1, 2, 10, 20, 23, 25; // previously used and removed values

UnknownError = 0;
InvalidDomain = 1 [deprecated=true];

UnkownVersion = 2 [deprecated=true];
InvalidRecord = 3;
InvalidRequest = 4;
InvalidResponse = 5;
Expand All @@ -21,8 +21,6 @@ message Error {
FailedToOpenEnvelope = 8;
InvalidStateTransition = 9;

Unauthorized = 10 [deprecated=true];

ResourceConflict = 11;
ResourceExists = 12;
ResourceNotFound = 13;
Expand All @@ -33,16 +31,11 @@ message Error {
ActualLRPCannotBeCrashed = 17;
ActualLRPCannotBeFailed = 18;
ActualLRPCannotBeRemoved = 19;
ActualLRPCannotBeStopped = 20 [deprecated=true];
ActualLRPCannotBeUnclaimed = 21;
ActualLRPCannotBeEvacuated = 22;

DesiredLRPCannotBeUpdated = 23 [deprecated=true];

RunningOnDifferentCell = 24;

DesiredLRPSchedulingInfoCannotBeUpdated = 25 [deprecated=true];

GUIDGeneration = 26;

Deserialize = 27;
Expand Down
10 changes: 0 additions & 10 deletions models/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ var (
Message: "cannot remove actual LRP",
}

ErrActualLRPCannotBeStopped = &Error{
Type: Error_ActualLRPCannotBeStopped,
Message: "cannot stop actual LRP",
}

ErrActualLRPCannotBeUnclaimed = &Error{
Type: Error_ActualLRPCannotBeUnclaimed,
Message: "cannot unclaim actual LRP",
Expand All @@ -126,11 +121,6 @@ var (
Message: "cannot evacuate actual LRP",
}

ErrDesiredLRPCannotBeUpdated = &Error{
Type: Error_DesiredLRPCannotBeUpdated,
Message: "cannot update desired LRP",
}

ErrGUIDGeneration = &Error{
Type: Error_GUIDGeneration,
Message: "cannot generate random guid",
Expand Down

0 comments on commit 08d8320

Please sign in to comment.