Skip to contentSkip to conversation

doc: updated json sample code for fifo interface

PATCH Superseded Lukasz Krakowiak 3 participants 9 messages Mar 29, 2019 – May 13, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: updated json sample code for fifo interface

Updated doc for JSON sample code related to vm_power_manager fifo inteface: "command": "destroy", "command": "power". Corrected typo in doc vm_power_management.rst: 'json' instead of 'jason'.

---
 doc/guides/sample_app_ug/vm_power_management.rst | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
doc/guides/sample_app_ug/vm_power_management.rst +4 -3
index 14d432e78..0182a92b3 100644
@@ -384,7 +384,7 @@ the file.
 
 The fifo is at /tmp/powermonitor/fifo
 
-The jason string can be a policy or instruction, and takes the following
+The json string can be a policy or instruction, and takes the following
 format:
 
   .. code-block:: javascript
@@ -597,7 +597,7 @@ Profile destroy example:
 
   .. code-block:: javascript
 
-    {"profile": {
+    {"policy": {
       "name": "ubuntu",
       "command": "destroy",
     }}
@@ -606,8 +606,9 @@ Power command example:
 
   .. code-block:: javascript
 
-    {"command": {
+    {"instruction": {
       "name": "ubuntu",
+      "command": "power",
       "unit": "SCALE_MAX",
       "resource_id": 10
     }}
Signature · 1 line
2.19.2.windows.1
#1 lore raw

PATCH v2 1/1 doc: updated json sample code for fifo interface

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power". Corrected typo in doc vm_power_management.rst: 'json' instead of 'jason'.

---
v2:
* coding style improved

---
 doc/guides/sample_app_ug/vm_power_management.rst | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
doc/guides/sample_app_ug/vm_power_management.rst +4 -3
index 14d432e78..0182a92b3 100644
@@ -384,7 +384,7 @@ the file.
 
 The fifo is at /tmp/powermonitor/fifo
 
-The jason string can be a policy or instruction, and takes the following
+The json string can be a policy or instruction, and takes the following
 format:
 
   .. code-block:: javascript
@@ -597,7 +597,7 @@ Profile destroy example:
 
   .. code-block:: javascript
 
-    {"profile": {
+    {"policy": {
       "name": "ubuntu",
       "command": "destroy",
     }}
@@ -606,8 +606,9 @@ Power command example:
 
   .. code-block:: javascript
 
-    {"command": {
+    {"instruction": {
       "name": "ubuntu",
+      "command": "power",
       "unit": "SCALE_MAX",
       "resource_id": 10
     }}
Signature · 1 line
2.19.2.windows.1
Acked-by on v2 1/1
#2 lore raw
Quoted 37 lines · Lukasz Krakowiak

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power". Corrected typo in doc vm_power_management.rst: 'json' instead of 'jason'.

---
v2:
* coding style improved

---
  doc/guides/sample_app_ug/vm_power_management.rst | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
doc/guides/sample_app_ug/vm_power_management.rst +2 -2
index 14d432e78..0182a92b3 100644
@@ -384,7 +384,7 @@ the file.
 
  The fifo is at /tmp/powermonitor/fifo
 
-The jason string can be a policy or instruction, and takes the following
+The json string can be a policy or instruction, and takes the following
  format:
 
    .. code-block:: javascript
@@ -597,7 +597,7 @@ Profile destroy example:
 
    .. code-block:: javascript
 
-    {"profile": {
+    {"policy": {
        "name": "ubuntu",
        "command": "destroy",
      }}

doc/guides/sample_app_ug/vm_power_management.rst Power command example: · line 614

Quoted 10 lines
doc/guides/sample_app_ug/vm_power_management.rst +2 -1
@@ -606,8 +606,9 @@ Power command example:
 
    .. code-block:: javascript
 
-    {"command": {
+    {"instruction": {
        "name": "ubuntu",
+      "command": "power",
        "unit": "SCALE_MAX",
        "resource_id": 10
      }}
#3 lore raw
In reply to Lukasz Krakowiak

29/03/2019 11:22, Lukasz Krakowiak:

Quoted 10 lines

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power". Corrected typo in doc vm_power_management.rst: 'json' instead of 'jason'.

---
v2:
* coding style improved

The SoB must be above the ---
Please add a line "Fixes:"

#4 lore raw

23/04/2019 00:30, Thomas Monjalon:

Quoted 6 lines

29/03/2019 11:22, Lukasz Krakowiak:

Quoted 5 lines

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power". Corrected typo in doc vm_power_management.rst: 'json' instead of 'jason'.

Quoted 8 lines
Quoted 5 lines

---
v2:
* coding style improved

The SoB must be above the ---
Please add a line "Fixes:"

Why there is no update?

#5 lore raw

PATCH v3 1/1 doc: updated json sample code for fifo interface

In reply to Lukasz Krakowiak

From: Lukasz Krakowiak <[email protected]>

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power".

---
v2:
* coding style improved
v3:
* move Signed-off-by: to correct location in patch file.
* rebase to master

---
 doc/guides/sample_app_ug/vm_power_management.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
doc/guides/sample_app_ug/vm_power_management.rst +3 -2
index 109d10957..5d9a26172 100644
@@ -597,7 +597,7 @@ Profile destroy example:
 
   .. code-block:: javascript
 
-    {"profile": {
+    {"policy": {
       "name": "ubuntu",
       "command": "destroy",
     }}
@@ -606,8 +606,9 @@ Power command example:
 
   .. code-block:: javascript
 
-    {"command": {
+    {"instruction": {
       "name": "ubuntu",
+      "command": "power",
       "unit": "SCALE_MAX",
       "resource_id": 10
     }}
Signature · 1 line
2.17.1
#6 lore raw

13/05/2019 11:04, David Hunt:

Quoted 4 lines

From: Lukasz Krakowiak <[email protected]>

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power".

There is no explanation about why this change is required. Was there some changes in the code?
If yes, please provide Fixes: reference so we can know where to backport.

#7 lore raw

PATCH v4 1/1 doc: updated json sample code for fifo interface

In reply to David Hunt

From: Lukasz Krakowiak <[email protected]>

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power".

There is no code change to go with this doc update, it is to fix the docs to match the implementation in the code.

Fixes a63504a90f ("examples/power: add JSON string handling")
---
 doc/guides/sample_app_ug/vm_power_management.rst | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
doc/guides/sample_app_ug/vm_power_management.rst +3 -2
index 109d10957..5d9a26172 100644
@@ -597,7 +597,7 @@ Profile destroy example:
 
   .. code-block:: javascript
 
-    {"profile": {
+    {"policy": {
       "name": "ubuntu",
       "command": "destroy",
     }}
@@ -606,8 +606,9 @@ Power command example:
 
   .. code-block:: javascript
 
-    {"command": {
+    {"instruction": {
       "name": "ubuntu",
+      "command": "power",
       "unit": "SCALE_MAX",
       "resource_id": 10
     }}
Signature · 1 line
2.17.1
#8 lore raw

13/05/2019 16:13, David Hunt:

Quoted 5 lines

From: Lukasz Krakowiak <[email protected]>

Updated doc for JSON sample code related to vm_power_manager fifo interface: "command": "destroy", "command": "power".

Quoted 7 lines

There is no code change to go with this doc update, it is to fix the docs to match the implementation in the code.

Fixes a63504a90f ("examples/power: add JSON string handling")

Applied, thanks