This project is mirrored from https://gitee.com/mirrors/nomad.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
  1. 22 Feb, 2019 1 commit
  2. 21 Feb, 2019 1 commit
  3. 20 Feb, 2019 13 commits
  4. 19 Feb, 2019 5 commits
  5. 16 Feb, 2019 2 commits
    • Mahmood Ali's avatar
    • Mahmood Ali's avatar
      drivers: restore port_map old json support · afb0c5ac
      Mahmood Ali authored
      This ensures that `port_map` along with other block like attribute
      declarations (e.g. ulimit, labels, etc) can handle various hcl and json
      syntax that was supported in 0.8.
      
      In 0.8.7, the following declarations are effectively equivalent:
      
      ```
      // hcl block
      port_map {
        http = 80
        https = 443
      }
      
      // hcl assignment
      port_map = {
        http  = 80
        https = 443
      }
      
      // json single element array of map (default in API response)
      {"port_map": [{"http": 80, "https": 443}]}
      
      // json array of individual maps (supported accidentally iiuc)
      {"port_map: [{"http": 80}, {"https": 443}]}
      ```
      
      We achieve compatbility by using `NewAttr("...", "list(map(string))",
      false)` to be serialized to a `map[string]string` wrapper, instead of using
      `BlockAttrs` declaration.  The wrapper merges the list of maps
      automatically, to ease driver development.
      
      This approach is closer to how v0.8.7 implemented the fields [1][2], and
      despite its verbosity, seems to perserve 0.8.7 behavior in hcl2.
      
      This is o...
      afb0c5ac
  6. 14 Feb, 2019 14 commits
  7. 12 Feb, 2019 4 commits