Skip to content

Commit

Permalink
change binding to many bind targets to one user defined message
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbalogh committed Dec 4, 2024
1 parent 398243d commit 900717d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 23 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,30 +144,45 @@ Use the Bindings message in bind.proto to extend the logical infrastructure by a

This is done by binding logical endpoints to any data such as:

### type meta data
### Global Metadata

```yaml
bindings:
- infrastructure:
- targets:
- infrasrtucture: Metadata
data:
name: DeviceTypes
description: Key value metadata map of a user specified device type to an infrastructure inventory device name
value:
- @type: type.googleapis.com/google.protobuf.Struct
- device_types:
- key: host
value: dgxa100
- key: switch
value: th3
- @type: type.googleapis.com/google.protobuf.Struct
- device_types:
- key: host
value: dgxa100
- key: switch
value: th3
```

### physical configuration
### Physical Configuration

```yaml
bindings:
- targets:
- device_instance: racksw
- device_instance_index: podsw.0
- device_instance: spinesw
data:
name: OpenConfigInterface
description: Switch configuration
value:
- @type: type.googleapis.com/google.protobuf.Struct
- config:
- type: ...
- mtu: ...
- loopback-mode: ...
- enabled: ...
```

### application
### Application Configuration

```yaml
Expand Down
26 changes: 14 additions & 12 deletions protos/bind.proto
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,8 @@ message Data {
google.protobuf.Any value = 2;
}

// The Binding message offers the option of binding different types of logical
// Infrastructure endpoints to custom attributes.
//
// The format allows for attributes to be applied at a macro level such as
// all devices or at a micro level such as an individual component in a
// specific device instance.
//
// The custom attributes allows for user defined information including but not
// limited to configuration, location, identification.
// Multiple custom attributes can be applied to a single binding value
// packed into an Any type.
message Binding {
// The BindTarget message
message BindTarget {
// The location of infrastructure that matches the binding type format
oneof infrastructure_path {
// the binding is global to the infrastructure and the value provided here
Expand Down Expand Up @@ -115,6 +105,18 @@ message Binding {
// example: host.1.npu.0
string device_instance_index_component_index = 8;
}
}

// The Binding message offers the option of binding different types of logical
// Infrastructure endpoints to any type of user defined data.
//
// The format allows for data to be applied at a macro level such as
// all devices or at a micro level such as an individual component in a
// specific device instance.
message Binding {
// targets is a list of BindTarget messages that share the same
// user defined information stored in the data field
repeated BindTarget targets = 1;

// the data field accomodates any type of user defined information
Data data = 100;
Expand Down

0 comments on commit 900717d

Please sign in to comment.