Updating package names so that package matches go_package.
This is better for consistent package references.
This is needed for the afrouter tests using voltha.pb
Change-Id: I4cfdf26456f92d8bce4fe5b40515ad7ac3d6747d
diff --git a/protos/voltha_protos/adapter.proto b/protos/voltha_protos/adapter.proto
index e8889c5..055de2b 100644
--- a/protos/voltha_protos/adapter.proto
+++ b/protos/voltha_protos/adapter.proto
@@ -12,7 +12,7 @@
message AdapterConfig {
// Common adapter config attributes here
- LogLevel.LogLevel log_level = 1;
+ common.LogLevel.LogLevel log_level = 1;
// Custom (vendor-specific) configuration attributes
google.protobuf.Any additional_config = 64;
diff --git a/protos/voltha_protos/common.proto b/protos/voltha_protos/common.proto
index 24c3c46..880c4ad 100644
--- a/protos/voltha_protos/common.proto
+++ b/protos/voltha_protos/common.proto
@@ -2,7 +2,7 @@
option go_package = "github.com/opencord/voltha-protos/go/common";
-package voltha;
+package common;
import "voltha_protos/yang_options.proto";
diff --git a/protos/voltha_protos/device.proto b/protos/voltha_protos/device.proto
index bbe8894..0b31ed1 100644
--- a/protos/voltha_protos/device.proto
+++ b/protos/voltha_protos/device.proto
@@ -100,7 +100,7 @@
}
message ImageDownload {
- option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+ option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
enum ImageDownloadState {
DOWNLOAD_UNKNOWN = 0;
@@ -176,7 +176,7 @@
}
message Port {
- option (voltha.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+ option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
enum PortType {
UNKNOWN = 0;
@@ -194,9 +194,9 @@
PortType type = 3; // Type of port
- AdminState.AdminState admin_state = 5;
+ common.AdminState.AdminState admin_state = 5;
- OperStatus.OperStatus oper_status = 6;
+ common.OperStatus.OperStatus oper_status = 6;
string device_id = 7; // Unique .id of device that owns this port
@@ -221,7 +221,7 @@
// A Physical Device instance
message Device {
- option (voltha.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+ option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
// Voltha's device identifier
string id = 1 [(access) = READ_ONLY];
@@ -283,13 +283,13 @@
ProxyAddress proxy_address = 19;
- AdminState.AdminState admin_state = 16;
+ common.AdminState.AdminState admin_state = 16;
- OperStatus.OperStatus oper_status = 17 [(access) = READ_ONLY];
+ common.OperStatus.OperStatus oper_status = 17 [(access) = READ_ONLY];
string reason = 22 [(access) = READ_ONLY]; // Used in FAILED state
- ConnectStatus.ConnectStatus connect_status = 18 [(access) = READ_ONLY];
+ common.ConnectStatus.ConnectStatus connect_status = 18 [(access) = READ_ONLY];
// TODO additional common attribute here
diff --git a/protos/voltha_protos/ietf_interfaces.proto b/protos/voltha_protos/ietf_interfaces.proto
index 90e489b..50167cb 100644
--- a/protos/voltha_protos/ietf_interfaces.proto
+++ b/protos/voltha_protos/ietf_interfaces.proto
@@ -2,7 +2,7 @@
option go_package = "github.com/opencord/voltha-protos/go/ietf";
-package ietf_interfaces;
+package ietf;
message Interfaces {
repeated Interface all_interfaces = 1;
diff --git a/protos/voltha_protos/omci_alarm_db.proto b/protos/voltha_protos/omci_alarm_db.proto
index e3f8c0f..4385a6d 100644
--- a/protos/voltha_protos/omci_alarm_db.proto
+++ b/protos/voltha_protos/omci_alarm_db.proto
@@ -17,7 +17,7 @@
option go_package = "github.com/opencord/voltha-protos/go/omci";
-package alarm;
+package omci;
import "voltha_protos/meta.proto";
diff --git a/protos/voltha_protos/openflow_13.proto b/protos/voltha_protos/openflow_13.proto
index 890fc04..6b3ba8a 100644
--- a/protos/voltha_protos/openflow_13.proto
+++ b/protos/voltha_protos/openflow_13.proto
@@ -2023,8 +2023,8 @@
};
message ofp_group_entry {
- ofp_group_desc desc = 1 [(voltha.yang_inline_node).id = 'desc',
- (voltha.yang_inline_node).type = 'openflow_13-ofp_group_desc'];
+ ofp_group_desc desc = 1 [(common.yang_inline_node).id = 'desc',
+ (common.yang_inline_node).type = 'openflow_13-ofp_group_desc'];
ofp_group_stats stats = 2;
};
diff --git a/protos/voltha_protos/voltha.proto b/protos/voltha_protos/voltha.proto
index c9e7347..673fddd 100644
--- a/protos/voltha_protos/voltha.proto
+++ b/protos/voltha_protos/voltha.proto
@@ -44,7 +44,7 @@
message AlarmFilterRuleKey {
- option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+ option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
enum AlarmFilterRuleKey {
id = 0;
@@ -71,14 +71,14 @@
}
message Logging {
- LogLevel.LogLevel level = 1;
+ common.LogLevel.LogLevel level = 1;
string package_name = 2;
}
// CoreInstance represents a core instance. It is data held in memory when a core
// is running. This data is not persistent.
message CoreInstance {
- option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
+ option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
string instance_id = 1 [(access) = READ_ONLY];
@@ -87,7 +87,7 @@
}
message CoreInstances {
- option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
+ option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
repeated CoreInstance items = 1;
}
@@ -95,7 +95,7 @@
// the entire cluster. However, some items (e.g. adapters) will be held by all cores
// for better performance
message Voltha {
- option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
+ option (common.yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
string version = 1 [(access) = READ_ONLY];
@@ -116,13 +116,13 @@
[(child_node) = {key: "device_id"}];
repeated
- alarm.AlarmDeviceData omci_alarm_database = 29
+ omci.AlarmDeviceData omci_alarm_database = 29
[(child_node) = {key: "device_id"}];
}
// Device Self Test Response
message SelfTestResponse {
- option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+ option (common.yang_child_rule) = MOVE_TO_PARENT_LEVEL;
enum SelfTestResult {
SUCCESS = 0;
@@ -190,12 +190,12 @@
option (google.api.http) = {
get: "/api/v1/instances"
};
- option (voltha.yang_xml_tag).xml_tag = 'items';
- option (voltha.yang_xml_tag).list_items_name = 'items';
+ option (common.yang_xml_tag).xml_tag = 'items';
+ option (common.yang_xml_tag).list_items_name = 'items';
}
// Get details on a Voltha cluster instance
- rpc GetCoreInstance(ID) returns(CoreInstance) {
+ rpc GetCoreInstance(common.ID) returns(CoreInstance) {
option (google.api.http) = {
get: "/api/v1/instances/{id}"
};
@@ -206,7 +206,7 @@
option (google.api.http) = {
get: "/api/v1/adapters"
};
- option (voltha.yang_xml_tag).xml_tag = 'adapters';
+ option (common.yang_xml_tag).xml_tag = 'adapters';
}
@@ -215,22 +215,22 @@
option (google.api.http) = {
get: "/api/v1/logical_devices"
};
- option (voltha.yang_xml_tag).xml_tag = 'logical_devices';
+ option (common.yang_xml_tag).xml_tag = 'logical_devices';
}
// Get additional information on a given logical device
- rpc GetLogicalDevice(ID) returns(LogicalDevice) {
+ rpc GetLogicalDevice(common.ID) returns(LogicalDevice) {
option (google.api.http) = {
get: "/api/v1/logical_devices/{id}"
};
}
// List ports of a logical device
- rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) {
+ rpc ListLogicalDevicePorts(common.ID) returns(LogicalPorts) {
option (google.api.http) = {
get: "/api/v1/logical_devices/{id}/ports"
};
- option (voltha.yang_xml_tag).xml_tag = 'ports';
+ option (common.yang_xml_tag).xml_tag = 'ports';
}
// Gets a logical device port
@@ -238,7 +238,7 @@
option (google.api.http) = {
get: "/api/v1/logical_devices/{id}/ports/{port_id}"
};
- option (voltha.yang_xml_tag).xml_tag = 'port';
+ option (common.yang_xml_tag).xml_tag = 'port';
}
// Enables a logical device port
@@ -256,12 +256,12 @@
}
// List all flows of a logical device
- rpc ListLogicalDeviceFlows(ID) returns(openflow_13.Flows) {
+ rpc ListLogicalDeviceFlows(common.ID) returns(openflow_13.Flows) {
option (google.api.http) = {
get: "/api/v1/logical_devices/{id}/flows"
};
- option (voltha.yang_xml_tag).xml_tag = 'flows';
- option (voltha.yang_xml_tag).list_items_name = 'items';
+ option (common.yang_xml_tag).xml_tag = 'flows';
+ option (common.yang_xml_tag).list_items_name = 'items';
}
// Update flow table for logical device
@@ -283,7 +283,7 @@
}
// Get all meter stats for logical device
- rpc GetMeterStatsOfLogicalDevice(ID)
+ rpc GetMeterStatsOfLogicalDevice(common.ID)
returns(openflow_13.MeterStatsReply) {
option (google.api.http) = {
get: "/api/v1/logical_devices/{id}/meters_stats"
@@ -291,12 +291,12 @@
}
// List all flow groups of a logical device
- rpc ListLogicalDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
+ rpc ListLogicalDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
option (google.api.http) = {
get: "/api/v1/logical_devices/{id}/flow_groups"
};
- option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
- option (voltha.yang_xml_tag).list_items_name = 'items';
+ option (common.yang_xml_tag).xml_tag = 'flow_groups';
+ option (common.yang_xml_tag).list_items_name = 'items';
}
// Update group table for device
@@ -313,20 +313,20 @@
option (google.api.http) = {
get: "/api/v1/devices"
};
- option (voltha.yang_xml_tag).xml_tag = 'devices';
+ option (common.yang_xml_tag).xml_tag = 'devices';
}
// List all physical devices IDs controlled by the Voltha cluster
- rpc ListDeviceIds(google.protobuf.Empty) returns(IDs) {
+ rpc ListDeviceIds(google.protobuf.Empty) returns(common.IDs) {
option (google.api.http) = {
get: "/api/v1/deviceids"
};
- option (voltha.yang_xml_tag).xml_tag = 'id';
- option (voltha.yang_xml_tag).list_items_name = 'items';
+ option (common.yang_xml_tag).xml_tag = 'id';
+ option (common.yang_xml_tag).list_items_name = 'items';
}
// Request to a voltha Core to reconcile a set of devices based on their IDs
- rpc ReconcileDevices(IDs) returns(google.protobuf.Empty) {
+ rpc ReconcileDevices(common.IDs) returns(google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/v1/deviceids"
body: "*"
@@ -334,7 +334,7 @@
}
// Get more information on a given physical device
- rpc GetDevice(ID) returns(Device) {
+ rpc GetDevice(common.ID) returns(Device) {
option (google.api.http) = {
get: "/api/v1/devices/{id}"
};
@@ -351,28 +351,28 @@
// Enable a device. If the device was in pre-provisioned state then it
// will transition to ENABLED state. If it was is DISABLED state then it
// will transition to ENABLED state as well.
- rpc EnableDevice(ID) returns(google.protobuf.Empty) {
+ rpc EnableDevice(common.ID) returns(google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/enable"
};
}
// Disable a device
- rpc DisableDevice(ID) returns(google.protobuf.Empty) {
+ rpc DisableDevice(common.ID) returns(google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/disable"
};
}
// Reboot a device
- rpc RebootDevice(ID) returns(google.protobuf.Empty) {
+ rpc RebootDevice(common.ID) returns(google.protobuf.Empty) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/reboot"
};
}
// Delete a device
- rpc DeleteDevice(ID) returns(google.protobuf.Empty) {
+ rpc DeleteDevice(common.ID) returns(google.protobuf.Empty) {
option (google.api.http) = {
delete: "/api/v1/devices/{id}/delete"
};
@@ -381,7 +381,7 @@
// Request an image download to the standby partition
// of a device.
// Note that the call is expected to be non-blocking.
- rpc DownloadImage(ImageDownload) returns(OperationResp) {
+ rpc DownloadImage(ImageDownload) returns(common.OperationResp) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/image_downloads/{name}"
body: "*"
@@ -404,14 +404,14 @@
}
// List image download db records for a given device
- rpc ListImageDownloads(ID) returns(ImageDownloads) {
+ rpc ListImageDownloads(common.ID) returns(ImageDownloads) {
option (google.api.http) = {
get: "/api/v1/devices/{id}/image_downloads"
};
}
// Cancel an existing image download process on a device
- rpc CancelImageDownload(ImageDownload) returns(OperationResp) {
+ rpc CancelImageDownload(ImageDownload) returns(common.OperationResp) {
option (google.api.http) = {
delete: "/api/v1/devices/{id}/image_downloads/{name}"
};
@@ -424,7 +424,7 @@
// If no reboot, then a reboot is required to make the
// activated image running on device
// Note that the call is expected to be non-blocking.
- rpc ActivateImageUpdate(ImageDownload) returns(OperationResp) {
+ rpc ActivateImageUpdate(ImageDownload) returns(common.OperationResp) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
body: "*"
@@ -438,7 +438,7 @@
// If no reboot, then a reboot is required to make the
// previous image running on device
// Note that the call is expected to be non-blocking.
- rpc RevertImageUpdate(ImageDownload) returns(OperationResp) {
+ rpc RevertImageUpdate(ImageDownload) returns(common.OperationResp) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
body: "*"
@@ -446,15 +446,15 @@
}
// List ports of a device
- rpc ListDevicePorts(ID) returns(Ports) {
+ rpc ListDevicePorts(common.ID) returns(Ports) {
option (google.api.http) = {
get: "/api/v1/devices/{id}/ports"
};
- option (voltha.yang_xml_tag).xml_tag = 'ports';
+ option (common.yang_xml_tag).xml_tag = 'ports';
}
// List pm config of a device
- rpc ListDevicePmConfigs(ID) returns(PmConfigs) {
+ rpc ListDevicePmConfigs(common.ID) returns(PmConfigs) {
option (google.api.http) = {
get: "/api/v1/devices/{id}/pm_configs"
};
@@ -469,21 +469,21 @@
}
// List all flows of a device
- rpc ListDeviceFlows(ID) returns(openflow_13.Flows) {
+ rpc ListDeviceFlows(common.ID) returns(openflow_13.Flows) {
option (google.api.http) = {
get: "/api/v1/devices/{id}/flows"
};
- option (voltha.yang_xml_tag).xml_tag = 'flows';
- option (voltha.yang_xml_tag).list_items_name = 'items';
+ option (common.yang_xml_tag).xml_tag = 'flows';
+ option (common.yang_xml_tag).list_items_name = 'items';
}
// List all flow groups of a device
- rpc ListDeviceFlowGroups(ID) returns(openflow_13.FlowGroups) {
+ rpc ListDeviceFlowGroups(common.ID) returns(openflow_13.FlowGroups) {
option (google.api.http) = {
get: "/api/v1/devices/{id}/flow_groups"
};
- option (voltha.yang_xml_tag).xml_tag = 'flow_groups';
- option (voltha.yang_xml_tag).list_items_name = 'items';
+ option (common.yang_xml_tag).xml_tag = 'flow_groups';
+ option (common.yang_xml_tag).list_items_name = 'items';
}
// List device types known to Voltha
@@ -491,11 +491,11 @@
option (google.api.http) = {
get: "/api/v1/device_types"
};
- option (voltha.yang_xml_tag).xml_tag = 'device_types';
+ option (common.yang_xml_tag).xml_tag = 'device_types';
}
// Get additional information on a device type
- rpc GetDeviceType(ID) returns(DeviceType) {
+ rpc GetDeviceType(common.ID) returns(DeviceType) {
option (google.api.http) = {
get: "/api/v1/device_types/{id}"
};
@@ -506,7 +506,7 @@
option (google.api.http) = {
get: "/api/v1/device_groups"
};
- option (voltha.yang_xml_tag).xml_tag = 'device_groups';
+ option (common.yang_xml_tag).xml_tag = 'device_groups';
}
// Stream control packets to the dataplane
@@ -527,7 +527,7 @@
}
// Get additional information on a device group
- rpc GetDeviceGroup(ID) returns(DeviceGroup) {
+ rpc GetDeviceGroup(common.ID) returns(DeviceGroup) {
option (google.api.http) = {
get: "/api/v1/device_groups/{id}"
};
@@ -540,7 +540,7 @@
};
}
- rpc GetAlarmFilter(ID) returns(AlarmFilter) {
+ rpc GetAlarmFilter(common.ID) returns(AlarmFilter) {
option (google.api.http) = {
get: "/api/v1/alarm_filters/{id}"
};
@@ -553,7 +553,7 @@
};
}
- rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) {
+ rpc DeleteAlarmFilter(common.ID) returns(google.protobuf.Empty) {
option (google.api.http) = {
delete: "/api/v1/alarm_filters/{id}"
};
@@ -565,34 +565,34 @@
};
}
- rpc GetImages(ID) returns(Images) {
+ rpc GetImages(common.ID) returns(Images) {
option (google.api.http) = {
get: "/api/v1/devices/{id}/images"
};
}
- rpc SelfTest(ID) returns(SelfTestResponse) {
+ rpc SelfTest(common.ID) returns(SelfTestResponse) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/self_test"
};
}
// OpenOMCI MIB information
- rpc GetMibDeviceData(ID) returns(omci.MibDeviceData) {
+ rpc GetMibDeviceData(common.ID) returns(omci.MibDeviceData) {
option (google.api.http) = {
get: "/api/v1/openomci/{id}/mib"
};
}
// OpenOMCI ALARM information
- rpc GetAlarmDeviceData(ID) returns(alarm.AlarmDeviceData) {
+ rpc GetAlarmDeviceData(common.ID) returns(omci.AlarmDeviceData) {
option (google.api.http) = {
get: "/api/v1/openomci/{id}/alarm"
};
}
// Simulate an Alarm
- rpc SimulateAlarm(SimulateAlarmRequest) returns(OperationResp) {
+ rpc SimulateAlarm(SimulateAlarmRequest) returns(common.OperationResp) {
option (google.api.http) = {
post: "/api/v1/devices/{id}/simulate_larm"
body: "*"
diff --git a/protos/voltha_protos/yang_options.proto b/protos/voltha_protos/yang_options.proto
index 25e6fa7..9c83149 100644
--- a/protos/voltha_protos/yang_options.proto
+++ b/protos/voltha_protos/yang_options.proto
@@ -19,7 +19,7 @@
option go_package = "github.com/opencord/voltha-protos/go/common";
-package voltha;
+package common;
import "google/protobuf/descriptor.proto";