VOL-3266: Added documentation for starting to manage a device

Change-Id: I2abf8c6e39f9edf523ff81ef0e06b57905245d18
diff --git a/docs/ManagingDevice.md b/docs/ManagingDevice.md
new file mode 100644
index 0000000..d5ad632
--- /dev/null
+++ b/docs/ManagingDevice.md
@@ -0,0 +1,54 @@
+# Managing a device
+
+The first API that a NEM would need to excute to start managing a hardware is the StartManagingDevice.
+
+## StartManagingDevice
+![Managing a Device](managing_device.png "Start Managing an OLT")
+``` protobuf
+service NativeHWManagementService {
+    // Initializes context for a device and sets up required states
+    // In the call to StartManagingDevice, the fields of ModifiableComponent which are relevant
+    // and their meanings in this context is mentioned below:
+    // name = The unique name that needs to be assigned to this hardware;
+    // class = COMPONENT_TYPE_UNDEFINED;
+    // parent = nil;
+    // alias = Optional;
+    // asset_id = Optional;
+    // uri = IP Address of the Hardware;
+    rpc StartManagingDevice(ModifiableComponent) returns(stream StartManagingDeviceResponse);
+}
+```
+The `uri` is what would carry the IP address of the device and the `name` should be something that would uniquely identify the device.
+
+On reception of this rpc, an implementation of Device Manager should validate the IP address and see if it can talk to/setup connection to the device or not. It should setup any required states that might be needed for it's internal implementation.
+
+The NEM would wait for the `StartManagingDeviceResponse` before it will do any futher actions on this device. This response needs to contain the `uuid` assigned to this device. **For futher RPCs it would be the `uuid` that would be used to identify the device.**
+
+*The device manager implementation should ensure that the `uuid` returned is universally unique and* ***does not change across reboots of the device.*** An example could be that the device manager first connects to the device and learns the serial number of the device and then uses this serial number to generate the `uuid` for the device.
+
+## GetPhysicalInventory
+``` protobuf
+// Get the HW inventory details of the Device
+rpc GetPhysicalInventory(PhysicalInventoryRequest) returns(stream PhysicalInventoryResponse);
+```
+
+This RPC is used to retrieve the entire inventory of components of the Hardware. Again the caller has to wait on the response in a stream as implementations of Device Manager could take time to gather all this information.
+
+## GetHWComponentInfo
+``` protobuf
+// Get the details of a particular HW component
+rpc GetHWComponentInfo(HWComponentInfoGetRequest) returns(stream Component);
+```
+In the call to this RPC, both the `name` and the `uuid` of the component need to be passed in the `HWComponentInfoGetRequest`.
+
+The `name` has to be unique for each of the components of the hardware and the `uuid` has to be universally unique. Implementation of Device Manager need to ensure this. Both of these two attributes are generated by the Device Manager.
+## SetHWComponentInfo
+``` protobuf
+// Sets the permissible attributes of a HW component
+rpc SetHWComponentInfo(HWComponentInfoSetRequest) returns(HWComponentInfoSetResponse);
+```
+In the call to this RPC, both the `name` and the `uuid` of the component need to be passed in the `HWComponentInfoSetRequest`.
+
+Using this RPC, it is possible to modify the `name` of a component, and the Device Manager has to ensure that the name is unique, else it should return an error for this RPC. Although the `name` can be modified, it is recommended that NEM implementations do not do this because Device Managers and take advantage of this and come up with efficient implementations.
+
+
diff --git a/docs/events_metrics.drawio b/docs/events_metrics.drawio
new file mode 100755
index 0000000..1a18b6c
--- /dev/null
+++ b/docs/events_metrics.drawio
@@ -0,0 +1 @@
+<mxfile host="app.diagrams.net" modified="2020-06-17T14:32:30.978Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36" etag="EigMuYxAlA4_x8PwkvI_" version="13.2.6" type="device"><diagram id="yPeOgAjgfKf-2OFRMvG_" name="Page-1">7VtZc6M4EP41rtp5CMVt+zFxjknt5KjJTM3O0xYBYasCiBHytb9+W0YCC/ARj7ETT1ypCmpEC/r7ulu0RMcaxLMb6qWjOxKgqGPqwaxjXXZM07BNs8P/9GCeS7qmnQuGFAeiUyl4wv8hIdSFdIwDlCkdGSERw6kq9EmSIJ8pMo9SMlW7hSRSR029IaoJnnwvqkt/4ICNcmnP0Uv5Z4SHIzmyoYszsSc7C0E28gIyXRJZVx1rQAlh+VE8G6CIG0/aJb/uesXZ4sYoStg2F3y36JdfGLF/ncfn7/GL7z59npwJLRMvGosH7phuBPouQgJq4a7ZXJjC/TUm8sRZtgDqHDoYdjorT8LRkP9/SBH1GKHQ4f7qboFPnJIEbjWDxl83Xx8H8H8QYZB8kkPCveej5jqE2YobMCkZJwHij2P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jO7aUMQbu9NuY3hy30NCc5wKPXdNaKBIc8wKQ/uaY/TLX6Vs0DZh68UDUbE/f7zlazBIG2qrq/YBnlRFouYQer5achiAjfBiHnyPpsvFhi3KE7pantD94kW3FFr8F4ZbFLif+ORuUd/GyVCuaQxeVd0uxA0GeJc2uQGOiWrEbTIBNybcIf5wo1ySaRIRL7iN+ervn26N72ngMXQHAQf72YAkIR6OqVj2+8NNo2naHgxwmlUBozols45eFahXYn9QsASfh5AFP1aluxqyWAqCWEOTfNtCAS5uAHxJg+4lwaJkVFFVGwx0x7nXbSAZPnUuWV2VS1ZT8bl3UC41VZ93DVu/F4SkIEu9ZJcYmGvJ47sa0XONlWFrzvGKyPcug/wV9++PML/KNc2KazbugjqkZ/ZP1DPX+F+To+6yW+dEOOlUFiTMhnRxUE5Kxcr6ksdnASEl8dqpx8f0YAu8nQre7rGnB/IZTnDj7L43Fry9XbRmS9gdb1/NvjF7e5tszC2W7A62a7LB3B9bKN/3Fkr5Wcop76E0V6wZn/QmSrNp5e5je/2ChHtP9W9ur73Z1h7ad/PJTOsYt/j9DDTL7+PygFB+ZWhd/Q8=</diagram></mxfile>
\ No newline at end of file
diff --git a/docs/managing_device.drawio b/docs/managing_device.drawio
new file mode 100755
index 0000000..60b311d
--- /dev/null
+++ b/docs/managing_device.drawio
@@ -0,0 +1 @@
+<mxfile host="app.diagrams.net" modified="2020-06-26T12:05:52.057Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36" etag="YWQTOr6kjvNCYbqAhE6m" version="13.3.0" type="device"><diagram id="u7MiE9SF2knlp-uFeZNf" name="Page-1">3Vhtk6I4EP41flyLJIjyUeflbqt2dqz16vZzJFFSFwkHYXX2118HghCj48yc7s4uZQl0N53Q/TzdIQNys9n9UdA8fVCMywEO2G5AbgcYoxDjgfkF7KmRjEncCNaFYNaoEyzEd26FgZVWgvHSMdRKSS1yV5ioLOOJdmS0KNTWN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9dWQCLsp/PLoA0dLjeXTFVLyS3Yjn4Dn/zoBsyZ4/7+Mq0rdlsXDvzqubdxUHaY2Ys1Lxz5i4VMminTldlMgLMJapUkvCxXlfHXVZggqXczlE5ry+n8YwmnZaOREgh6KiVGrSp9Ph05LwS8qdnWaB+ad6JnsnW48Oi2OWq3tqrhdhXbWOKgpzOqIbnU7uTB6pLgI42TvLbAnEg93Hbbzg3bu817cvcf</diagram></mxfile>
\ No newline at end of file
diff --git a/docs/managing_device.png b/docs/managing_device.png
new file mode 100755
index 0000000..5542ce3
--- /dev/null
+++ b/docs/managing_device.png
Binary files differ