// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";
package nos_client;

message NOS_SW {
	string ztp_device_sw_url = 1;
  bytes ztp_device_sw_file = 2;
}

// For ONIE Requests
message NOS_SW_REQ {
  string serial_number = 1;
  string eth_addr = 2;
  string vendor_id = 3;
  string machine = 4;
  string machine_rev = 5;
  string arch = 6;
  string security_key = 7;
  string operation = 8;
}

message Config_Script {
  string config_script_url = 1;
  bytes config_script_file = 2;
}

message Config_Script_REQ {
  string agent = 1;
  string machine = 2; 
  string serial_number = 3;
  string eth_addr = 4;
  string version = 5;
}

message Status_Notification {
  string status = 1;
  string serial_number = 2;
  string eth_addr = 3;
}

message Empty{}

service nos_client {
    rpc GetNOSFile            (NOS_SW_REQ) returns (NOS_SW) {}
    rpc GetConfigScriptFile   (Config_Script_REQ) returns (Config_Script) {}
    rpc NotifyStatus          (Status_Notification) returns (Empty) {}
}
