Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSG Python sdk proto def #5

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions net/happygears/proto/NSGPythonSDK.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
syntax = "proto3";

package net.happygears.proto.nsg_python_sdk;
import "net/happygears/proto/NSG.proto";

message ServiceInfo {
string script = 1;
string port = 2;
}

message StatusResp {
string status = 1;
}

message TagsAppRequest {
nsg.Device device = 1;
}

message KeyedTagList {
repeated string tags = 1;
sumit-ct marked this conversation as resolved.
Show resolved Hide resolved
bool is_device = 2;
bool is_interface = 3;
nsg.DataSource ds = 4;
int64 index = 5;
string monitoring_variable_hint = 6;
}

message TagUpdateJournal {
repeated KeyedTagList added = 1;
repeated KeyedTagList removed = 2;
}

message VariablesAppRequest {
nsg.Device device = 1;
}

message PollingVariable {
sumit-ct marked this conversation as resolved.
Show resolved Hide resolved
int64 index = 1;
string component_name = 2;
nsg.Component.Class component_class = 3; // cc_backplane, cc_chassis, cc_powerSupply etc. Not really used
string OID = 4;
bool SNMP_walk = 5; // if true, then OID is used to do snmp walk, otherwise we do SNMP get
nsg.DataType data_type = 6; // counter, counter64, gauge etc.
nsg.DataSource dsc = 7; // DS_Interface, DS_AclCounter, DS_ChassisAlarm etc: used to find correct component by index
double sensor_scale = 8;
repeated string tags = 9;
}

message PollingVariables {
repeated PollingVariable variables = 1;
}

message PollingVariableMap {
map <string, PollingVariables> polling_variables = 1;
}

service Lifecycle {
rpc Heartbeat(ServiceInfo) returns (StatusResp);
}

service AppRequest {
rpc Tags(TagsAppRequest) returns (TagUpdateJournal);
rpc Variables(VariablesAppRequest) returns (PollingVariableMap);
}