diff --git a/python/protos/voltha.proto b/python/protos/voltha.proto
new file mode 100644
index 0000000..2563bb0
--- /dev/null
+++ b/python/protos/voltha.proto
@@ -0,0 +1,555 @@
+/*
+ * Top-level Voltha API definition
+ *
+ * For details, see individual definition files.
+ */
+
+syntax = "proto3";
+
+option go_package = "github.com/opencord/voltha-protos/go/voltha";
+
+package voltha;
+
+import "google/protobuf/empty.proto";
+import "google/api/annotations.proto";
+
+import "yang_options.proto";
+
+import public "meta.proto";
+import public "common.proto";
+import public "health.proto";
+import public "logical_device.proto";
+import public "device.proto";
+import public "adapter.proto";
+import public "openflow_13.proto";
+import "omci_mib_db.proto";
+
+
+option java_package = "org.opencord.voltha";
+option java_outer_classname = "VolthaProtos";
+option csharp_namespace = "Opencord.Voltha.Voltha";
+
+message DeviceGroup {
+
+    string id = 1 [(access) = READ_ONLY];
+
+    repeated LogicalDevice logical_devices = 2 [(child_node) = {key: "id"}];
+
+    repeated Device devices = 3 [(child_node) = {key: "id"}];
+}
+
+message DeviceGroups {
+    repeated DeviceGroup items = 1;
+}
+
+
+message AlarmFilterRuleKey {
+    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+    enum AlarmFilterRuleKey {
+        id = 0;
+        type = 1;
+        severity = 2;
+        resource_id = 3;
+        category = 4;
+        device_id = 5;
+    }
+}
+
+message AlarmFilterRule {
+    AlarmFilterRuleKey.AlarmFilterRuleKey key = 1;
+    string value = 2;
+}
+message AlarmFilter {
+    string id = 1 [(access) = READ_ONLY];
+
+    repeated AlarmFilterRule rules = 2;
+}
+
+message AlarmFilters {
+    repeated AlarmFilter filters = 1;
+}
+
+message Logging {
+    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;
+
+    string instance_id = 1  [(access) = READ_ONLY];
+
+    HealthStatus health = 2 [(child_node) = {}];
+
+}
+
+message CoreInstances {
+    option (yang_message_rule) = CREATE_BOTH_GROUPING_AND_CONTAINER;
+    repeated CoreInstance items = 1;
+}
+
+// Voltha represents the Voltha cluster data.  Each Core instance will hold a subset of
+// 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;
+
+    string version = 1 [(access) = READ_ONLY];
+
+    repeated Adapter adapters = 2 [(child_node) = {key: "id"}];
+
+    repeated LogicalDevice logical_devices = 3 [(child_node) = {key: "id"}];
+
+    repeated Device devices = 4 [(child_node) = {key: "id"}];
+
+    repeated DeviceType device_types = 5 [(child_node) = {key: "id"}];
+
+    repeated DeviceGroup device_groups = 6 [(child_node) = {key: "id"}];
+
+    repeated AlarmFilter alarm_filters = 7 [(child_node) = {key: "id"}];
+
+    repeated
+        omci.MibDeviceData omci_mib_database = 28
+        [(child_node) = {key: "device_id"}];
+}
+
+// Device Self Test Response
+message SelfTestResponse {
+    option (yang_child_rule) = MOVE_TO_PARENT_LEVEL;
+
+	enum SelfTestResult  {
+	    SUCCESS = 0;
+	    FAILURE = 1;
+	    NOT_SUPPORTED = 2;
+	    UNKNOWN_ERROR = 3;
+    }
+    SelfTestResult result = 1;
+}
+
+message OfAgentSubscriber {
+    // ID of ofagent instance
+    string ofagent_id = 1;
+
+    // ID of voltha instance to which the ofagent is subscribed
+    string voltha_id = 2;
+}
+
+// Identifies a membership group a Core belongs to
+message Membership {
+    //  Group name
+    string group_name = 1;
+
+    // Unique ID of a container within that group
+    string id = 2;
+}
+
+/*
+ * Voltha APIs
+ *
+ */
+service VolthaService {
+
+    // Get more information on a given physical device
+    rpc UpdateLogLevel(Logging) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            get: "/api/v1/logs"
+        };
+    }
+
+    // Set the membership group of a Voltha Core
+    rpc UpdateMembership(Membership) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/membership"
+            body: "*"
+        };
+    }
+
+    // Get high level information on the Voltha cluster
+    rpc GetVoltha(google.protobuf.Empty) returns(Voltha) {
+        option (google.api.http) = {
+            get: "/api/v1"
+        };
+    }
+
+    // List all Voltha cluster core instances
+    rpc ListCoreInstances(google.protobuf.Empty) returns(CoreInstances) {
+        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';
+    }
+
+    // Get details on a Voltha cluster instance
+    rpc GetCoreInstance(ID) returns(CoreInstance) {
+        option (google.api.http) = {
+            get: "/api/v1/instances/{id}"
+        };
+    }
+
+    // List all active adapters (plugins) in the Voltha cluster
+    rpc ListAdapters(google.protobuf.Empty) returns(Adapters) {
+        option (google.api.http) = {
+            get: "/api/v1/adapters"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'adapters';
+    }
+
+
+    // List all logical devices managed by the Voltha cluster
+    rpc ListLogicalDevices(google.protobuf.Empty) returns(LogicalDevices) {
+        option (google.api.http) = {
+            get: "/api/v1/logical_devices"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'logical_devices';
+    }
+
+    // Get additional information on a given logical device
+    rpc GetLogicalDevice(ID) returns(LogicalDevice) {
+        option (google.api.http) = {
+            get: "/api/v1/logical_devices/{id}"
+        };
+    }
+
+    // List ports of a logical device
+    rpc ListLogicalDevicePorts(ID) returns(LogicalPorts) {
+        option (google.api.http) = {
+            get: "/api/v1/logical_devices/{id}/ports"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'ports';
+    }
+
+    // Gets a logical device port
+    rpc GetLogicalDevicePort(LogicalPortId) returns(LogicalPort) {
+        option (google.api.http) = {
+            get: "/api/v1/logical_devices/{id}/ports/{port_id}"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'port';
+    }
+
+    // Enables a logical device port
+    rpc EnableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/logical_devices/{id}/ports/{port_id}/enable"
+        };
+    }
+
+    // Disables a logical device port
+    rpc DisableLogicalDevicePort(LogicalPortId) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/logical_devices/{id}/ports/{port_id}/disable"
+        };
+    }
+
+    // List all flows of a logical device
+    rpc ListLogicalDeviceFlows(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';
+    }
+
+    // Update flow table for logical device
+    rpc UpdateLogicalDeviceFlowTable(openflow_13.FlowTableUpdate)
+            returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/logical_devices/{id}/flows"
+            body: "*"
+        };
+    }
+
+    // List all flow groups of a logical device
+    rpc ListLogicalDeviceFlowGroups(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';
+    }
+
+    // Update group table for device
+    rpc UpdateLogicalDeviceFlowGroupTable(openflow_13.FlowGroupTableUpdate)
+            returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/logical_devices/{id}/flow_groups"
+            body: "*"
+        };
+    }
+
+    // List all physical devices controlled by the Voltha cluster
+    rpc ListDevices(google.protobuf.Empty) returns(Devices) {
+        option (google.api.http) = {
+            get: "/api/v1/devices"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'devices';
+    }
+
+    // List all physical devices IDs controlled by the Voltha cluster
+    rpc ListDeviceIds(google.protobuf.Empty) returns(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';
+    }
+
+    // Request to a voltha Core to reconcile a set of devices based on their IDs
+    rpc ReconcileDevices(IDs) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/deviceids"
+            body: "*"
+        };
+    }
+
+    // Get more information on a given physical device
+    rpc GetDevice(ID) returns(Device) {
+        option (google.api.http) = {
+            get: "/api/v1/devices/{id}"
+        };
+    }
+
+    // Pre-provision a new physical device
+    rpc CreateDevice(Device) returns(Device) {
+        option (google.api.http) = {
+            post: "/api/v1/devices"
+            body: "*"
+        };
+    }
+
+    // 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) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/enable"
+        };
+    }
+
+    // Disable a device
+    rpc DisableDevice(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) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/reboot"
+        };
+    }
+
+    // Delete a device
+    rpc DeleteDevice(ID) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            delete: "/api/v1/devices/{id}/delete"
+        };
+    }
+
+    // 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) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/image_downloads/{name}"
+            body: "*"
+        };
+    }
+
+    // Get image download status on a device
+    // The request retrieves progress on device and updates db record
+    rpc GetImageDownloadStatus(ImageDownload) returns(ImageDownload) {
+        option (google.api.http) = {
+            get: "/api/v1/devices/{id}/image_downloads/{name}/status"
+        };
+    }
+
+    // Get image download db record
+    rpc GetImageDownload(ImageDownload) returns(ImageDownload) {
+        option (google.api.http) = {
+            get: "/api/v1/devices/{id}/image_downloads/{name}"
+        };
+    }
+
+    // List image download db records for a given device
+    rpc ListImageDownloads(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) {
+        option (google.api.http) = {
+            delete: "/api/v1/devices/{id}/image_downloads/{name}"
+        };
+    }
+
+    // Activate the specified image at a standby partition
+    // to active partition.
+    // Depending on the device implementation, this call
+    // may or may not cause device reboot.
+    // 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) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/image_downloads/{name}/image_update"
+            body: "*"
+        };
+    }
+
+    // Revert the specified image at standby partition
+    // to active partition, and revert to previous image
+    // Depending on the device implementation, this call
+    // may or may not cause device reboot.
+    // 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) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/image_downloads/{name}/image_revert"
+            body: "*"
+        };
+    }
+
+    // List ports of a device
+    rpc ListDevicePorts(ID) returns(Ports) {
+        option (google.api.http) = {
+            get: "/api/v1/devices/{id}/ports"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'ports';
+    }
+
+    // List pm config of a device
+    rpc ListDevicePmConfigs(ID) returns(PmConfigs) {
+        option (google.api.http) = {
+            get: "/api/v1/devices/{id}/pm_configs"
+        };
+    }
+
+    // Update the pm config of a device
+    rpc UpdateDevicePmConfigs(voltha.PmConfigs) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/pm_configs"
+            body: "*"
+        };
+    }
+
+    // List all flows of a device
+    rpc ListDeviceFlows(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';
+    }
+
+    // List all flow groups of a device
+    rpc ListDeviceFlowGroups(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';
+    }
+
+    // List device types known to Voltha
+    rpc ListDeviceTypes(google.protobuf.Empty) returns(DeviceTypes) {
+        option (google.api.http) = {
+            get: "/api/v1/device_types"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'device_types';
+    }
+
+    // Get additional information on a device type
+    rpc GetDeviceType(ID) returns(DeviceType) {
+        option (google.api.http) = {
+            get: "/api/v1/device_types/{id}"
+        };
+    }
+
+    // List all device sharding groups
+    rpc ListDeviceGroups(google.protobuf.Empty) returns(DeviceGroups) {
+        option (google.api.http) = {
+            get: "/api/v1/device_groups"
+        };
+        option (voltha.yang_xml_tag).xml_tag = 'device_groups';
+    }
+
+    // Stream control packets to the dataplane
+    rpc StreamPacketsOut(stream openflow_13.PacketOut)
+        returns(google.protobuf.Empty) {
+        // This does not have an HTTP representation
+    }
+
+    // Receive control packet stream
+    rpc ReceivePacketsIn(google.protobuf.Empty)
+        returns(stream openflow_13.PacketIn) {
+        // This does not have an HTTP representation
+    }
+
+    rpc ReceiveChangeEvents(google.protobuf.Empty)
+        returns(stream openflow_13.ChangeEvent) {
+        // This does not have an HTTP representation
+    }
+
+    // Get additional information on a device group
+    rpc GetDeviceGroup(ID) returns(DeviceGroup) {
+        option (google.api.http) = {
+            get: "/api/v1/device_groups/{id}"
+        };
+    }
+
+    rpc CreateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
+        option (google.api.http) = {
+            post: "/api/v1/alarm_filters"
+            body: "*"
+        };
+    }
+
+    rpc GetAlarmFilter(ID) returns(AlarmFilter) {
+        option (google.api.http) = {
+            get: "/api/v1/alarm_filters/{id}"
+        };
+    }
+
+    rpc UpdateAlarmFilter(AlarmFilter) returns(AlarmFilter) {
+        option (google.api.http) = {
+            put: "/api/v1/alarm_filters/{id}"
+            body: "*"
+        };
+    }
+
+    rpc DeleteAlarmFilter(ID) returns(google.protobuf.Empty) {
+        option (google.api.http) = {
+            delete: "/api/v1/alarm_filters/{id}"
+        };
+    }
+
+    rpc ListAlarmFilters(google.protobuf.Empty) returns(AlarmFilters) {
+        option (google.api.http) = {
+            get: "/api/v1/alarm_filters"
+        };
+    }
+
+    rpc GetImages(ID) returns(Images) {
+        option (google.api.http) = {
+            get: "/api/v1/devices/{id}/images"
+        };
+    }
+
+    rpc SelfTest(ID) returns(SelfTestResponse) {
+        option (google.api.http) = {
+            post: "/api/v1/devices/{id}/self_test"
+        };
+    }
+
+    rpc Subscribe (OfAgentSubscriber) returns (OfAgentSubscriber) {
+    }
+}
+
