Ubuntu Pastebin

Paste from json at Wed, 8 Feb 2017 10:29:27 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  // CloudSchema returns the schema used to validate input for add-cloud.  Since                                                                                                               
  // this provider does support custom clouds, this always returns non-nil                                                                                                                     
  func (e environProvider) CloudSchema() *jsonschema.Schema {                                                                                                                                  
      return &jsonschema.Schema{                                                                                                                                                               
          Type:     []jsonschema.Type{jsonschema.ObjectType},                                                                                                                                  
          Required: []string{cloud.EndpointKey, cloud.AuthTypesKey, cloud.RegionsKey},                                                                                                         
          Order:    []string{cloud.EndpointKey, cloud.AuthTypesKey, cloud.RegionsKey},                                                                                                         
          Properties: map[string]*jsonschema.Schema{                                                                                                                                           
              cloud.EndpointKey: {                                                                                                                                                             
                  Singular: "the API endpoint url for the cloud",                                                                                                                              
                  Type:     []jsonschema.Type{jsonschema.StringType},                                                                                                                          
                  Format:   jsonschema.FormatURI,                                                                                                                                              
              },                                                                                                                                                                               
              cloud.AuthTypesKey: &jsonschema.Schema{                                                                                                                                          
                  // don't need a prompt, since there's only one choice.                                                                                                                       
                  Type: []jsonschema.Type{jsonschema.ArrayType},                                                                                                                               
                  Enum: []interface{}{[]string{string(cloud.UserPassAuthType)}},                                                                                                               
              },                                                                                                                                                                               
              cloud.RegionsKey: {                                                                                                                                                              
                  Type:     []jsonschema.Type{jsonschema.ObjectType},                                                                                                                          
                  Singular: "region",                                                                                                                                                          
                  Plural:   "regions",                                                                                                                                                         
                  AdditionalProperties: &jsonschema.Schema{                                                                                                                                    
                      Type:          []jsonschema.Type{jsonschema.ObjectType},                                                                                                                 
                     MaxProperties: jsonschema.Int(1),                                                                                                                                        
                     Properties: map[string]*jsonschema.Schema{                                                                                                                               
                         "identity-domain": &jsonschema.Schema{                                                                                                                               
                             Singular: "the api identity domain name for the oracle account",                                                                                                 
                             Type:     []jsonschema.Type{jsonschema.StringType},                                                                                                              
                         },                                                                                                                                                                   
                     },                                                                                                                                                                       
                  },                                                                                                                                                                           
              },                                                                                                                                                                               
          },                                                                                                                                                                                   
      }                                                                                                                                                                                        
  }
Download as text