Jump to: navigation, search

Difference between revisions of "Trove/minor-config-edits"

(Created page with "== Description == To improve the user experience for configuration edits, we want to add a '''created''' timestamp, '''updated''' timestamp, and '''number of instances''' ass...")
 
(Dropped instance_count from configuration-list return, cleaned up description text.)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Description ==
 
== Description ==
  
To improve the user experience for configuration edits, we want to add a '''created''' timestamp, '''updated''' timestamp, and '''number of instances''' associated with the configuration group on the list configurations call and list configurations details call.
+
To improve the user experience for configuration edits, we'd like to add '''created''' and '''updated''' timestamps associated with configuration groups on the list configurations call and list configuration details call. We'd also like to add an instance count to the configuration details call, to reflect the number of instances with the configuration group applied.
  
Blueprint: TBD
+
Blueprint: https://blueprints.launchpad.net/trove/+spec/minor-config-edits
  
 
== Justification/Benefits ==
 
== Justification/Benefits ==
  
The '''updated''' timestamp is a good secondary success indicator for making config edits, as well as serving as a potential time marker for correlating when detrimental config changes were made. It would also help to see how many instances use a particular config and users will be able to see up front how many instances the config changes will effect.
+
The '''updated''' timestamp is a good secondary success indicator for making config edits, as well as serving as a potential time marker for correlating when detrimental config changes were made. It would also help to see how many instances use a particular config and users will be able to see up front how many instances the config changes will affect.
  
 
== Impacts ==
 
== Impacts ==
Line 16: Line 16:
 
=== Database ===
 
=== Database ===
  
This involves database migration to add '''created''' and '''updated''' columns of type datetime to the trove/configurations db
+
This involves database migration to add '''created''' and '''updated''' columns of type datetime to the trove/configurations db.
  
 
=== ReST API ===
 
=== ReST API ===
  
The GET /configurations call will return something like this:
+
(Lines in <span style="color:blue">blue</span> are new.)
 +
 
 +
The GET /configurations call will return:
  
 
  {
 
  {
Line 28: Line 30:
 
           "name": "Enhanced Performance Settings",
 
           "name": "Enhanced Performance Settings",
 
           "description": "Performance Enhancing Settings",
 
           "description": "Performance Enhancing Settings",
           "instance_count": "1",
+
           "datastore_version_id": "8d458990-db80-4569-936e-6b359d664449",
           "created": "2014-05-25T21:53:10Z",
+
           <span style="color:blue">"created": "2014-05-25T21:53:10Z",
           "updated": "2014-05-25T21:53:10Z"
+
           "updated": "2014-05-25T21:53:10Z"</span>
 
       },
 
       },
 
       {
 
       {
Line 36: Line 38:
 
           "name": "Another great configuration group",
 
           "name": "Another great configuration group",
 
           "description": "Super Speed MySQL",
 
           "description": "Super Speed MySQL",
           "instance_count": 0,
+
           "datastore_version_id": "8d458990-db80-4569-936e-6b359d664449",
           "created": "2014-05-25T21:53:10Z",
+
           <span style="color:blue">"created": "2014-05-25T21:53:10Z",
           "updated": "2014-05-25T21:53:10Z"
+
           "updated": "2014-05-25T21:53:10Z"</span>
 
       }
 
       }
 
   ]
 
   ]
 
  }
 
  }
  
The GET /configurations/{id} call will return something like this:
+
The GET /configurations/{id} call will return:
  
 
  {
 
  {
   "configurations": {
+
   "configuration": {
 
       "id": "12345678-1111-2222-3333-444444444444",
 
       "id": "12345678-1111-2222-3333-444444444444",
 
       "name": "Enhanced Performance Settings",
 
       "name": "Enhanced Performance Settings",
 
       "description": "Performance Enhancing Settings",
 
       "description": "Performance Enhancing Settings",
       "created": "2012-01-25T21:53:10Z",
+
       <span style="color:blue">"created": "2012-01-25T21:53:10Z",
       "updated": "2012-01-25T21:53:10Z",
+
       "updated": "2012-01-25T21:53:10Z",</span>
 
       "values": {
 
       "values": {
 
           "ft_min_word_len": "2",
 
           "ft_min_word_len": "2",
 
           "key_buffer_size": "300M"
 
           "key_buffer_size": "300M"
 
       },
 
       },
       "instance_count": "1",
+
       <span style="color:blue">"instance_count": 1</span>
      "instances": [
 
          {
 
              "id": "dea5a2f7-3ec7-4496-adab-0abb5a42d635",
 
              "name": "json_rack_instance"
 
          }
 
      ]
 
 
   }
 
   }
 
  }
 
  }
  
 
== Comments/Questions From Community ==
 
== Comments/Questions From Community ==

Latest revision as of 18:51, 5 June 2014

Description

To improve the user experience for configuration edits, we'd like to add created and updated timestamps associated with configuration groups on the list configurations call and list configuration details call. We'd also like to add an instance count to the configuration details call, to reflect the number of instances with the configuration group applied.

Blueprint: https://blueprints.launchpad.net/trove/+spec/minor-config-edits

Justification/Benefits

The updated timestamp is a good secondary success indicator for making config edits, as well as serving as a potential time marker for correlating when detrimental config changes were made. It would also help to see how many instances use a particular config and users will be able to see up front how many instances the config changes will affect.

Impacts

Configuration

None

Database

This involves database migration to add created and updated columns of type datetime to the trove/configurations db.

ReST API

(Lines in blue are new.)

The GET /configurations call will return:

{
  "configurations": [
      {
          "id": "12345678-1111-2222-3333-444444444444",
          "name": "Enhanced Performance Settings",
          "description": "Performance Enhancing Settings",
          "datastore_version_id": "8d458990-db80-4569-936e-6b359d664449",
          "created": "2014-05-25T21:53:10Z",
          "updated": "2014-05-25T21:53:10Z"
      },
      {
          "id": "11111111-2222-3333-4444-444444444444",
          "name": "Another great configuration group",
          "description": "Super Speed MySQL",
          "datastore_version_id": "8d458990-db80-4569-936e-6b359d664449",
          "created": "2014-05-25T21:53:10Z",
          "updated": "2014-05-25T21:53:10Z"
      }
  ]
}

The GET /configurations/{id} call will return:

{
  "configuration": {
      "id": "12345678-1111-2222-3333-444444444444",
      "name": "Enhanced Performance Settings",
      "description": "Performance Enhancing Settings",
      "created": "2012-01-25T21:53:10Z",
      "updated": "2012-01-25T21:53:10Z",
      "values": {
          "ft_min_word_len": "2",
          "key_buffer_size": "300M"
      },
      "instance_count": 1
  }
}

Comments/Questions From Community