← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~smoser/maas/metadata-service-add-version into lp:maas

 

Scott Moser has proposed merging lp:~smoser/maas/metadata-service-add-version into lp:maas.

Requested reviews:
  Jeroen T. Vermeulen (jtv)
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~smoser/maas/metadata-service-add-version/+merge/96505

  Name this initial version for metadata service (2012-03-01).
  
  This sets a specific name for this version of the metadata service.
  
  By doing this, we can, in the future let 'latest' refer to the generic
  idea of "the latest version", but we can support clients that want a given
  version of the content.
  
  The version of cloud-init in 12.04 will request:
     <url>/metadata/2012-03-01/<field>
  
  And there-by identify the behavior of the server that it is expecting, and
  ensuring that it will not be broken as long as servers implement that behavior
  under that version.
  
  Regarding the format of the version (YYYY-MM-DD) this is what amazon uses
  in their metadata service, I'm by no means stuck to it.

-- 
https://code.launchpad.net/~smoser/maas/metadata-service-add-version/+merge/96505
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~smoser/maas/metadata-service-add-version into lp:maas.
=== modified file 'src/metadataserver/api.py'
--- src/metadataserver/api.py	2012-02-27 07:33:08 +0000
+++ src/metadataserver/api.py	2012-03-08 02:24:17 +0000
@@ -72,7 +72,7 @@
 
 def check_version(version):
     """Check that `version` is a supported metadata version."""
-    if version != 'latest':
+    if version not in ('latest', '2012-03-01')
         raise UnknownMetadataVersion("Unknown metadata version: %s" % version)
 
 
@@ -86,7 +86,7 @@
 class IndexHandler(MetadataViewHandler):
     """Top-level metadata listing."""
 
-    fields = ('latest',)
+    fields = ('latest', '2012-03-01')
 
 
 class VersionIndexHandler(MetadataViewHandler):


Follow ups