File: helper.rb

package info (click to toggle)
ruby-fog-aws 3.33.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,180 kB
  • sloc: ruby: 75,405; javascript: 14; makefile: 9; sh: 4
file content (103 lines) | stat: -rw-r--r-- 3,926 bytes parent folder | download | duplicates (6)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
class AWS
  module Elasticache
    module Formats
      BASIC = {
        'ResponseMetadata' => {'RequestId' => String}
      }

      # Cache Security Groups
      SECURITY_GROUP = {
        'EC2SecurityGroups'       => Array,
        'CacheSecurityGroupName'  => String,
        'Description'             => String,
        'OwnerId'                 => String,
      }
      SINGLE_SECURITY_GROUP = BASIC.merge('CacheSecurityGroup' => SECURITY_GROUP)
      DESCRIBE_SECURITY_GROUPS = {'CacheSecurityGroups' => [SECURITY_GROUP]}

      CACHE_SUBNET_GROUP = {
        'CacheSubnetGroupName' => String,
        'CacheSubnetGroupDescription' => String,
        'VpcId' => String,
        'Subnets' => [String]
      }

      CREATE_CACHE_SUBNET_GROUP = BASIC.merge({
         'CreateCacheSubnetGroupResult' => {
           'CacheSubnetGroup' => CACHE_SUBNET_GROUP
         }
       })

      DESCRIBE_CACHE_SUBNET_GROUPS = BASIC.merge({
        'DescribeCacheSubnetGroupsResult' => {
          'CacheSubnetGroups' => [CACHE_SUBNET_GROUP]
        }
      })

      # Cache Parameter Groups
      PARAMETER_GROUP = {
        'CacheParameterGroupFamily' => String,
        'CacheParameterGroupName'   => String,
        'Description'               => String,
      }
      SINGLE_PARAMETER_GROUP = BASIC.merge('CacheParameterGroup' => PARAMETER_GROUP)
      DESCRIBE_PARAMETER_GROUPS = BASIC.merge('CacheParameterGroups' => [PARAMETER_GROUP])
      MODIFY_PARAMETER_GROUP = {'CacheParameterGroupName' => String }
      PARAMETER_SET = {
        'Parameters'                      => Array,
        'CacheNodeTypeSpecificParameters' => Array,
      }
      ENGINE_DEFAULTS = PARAMETER_SET.merge('CacheParameterGroupFamily' => String)
      # Cache Clusters - more parameters get added as the lifecycle progresses
      CACHE_CLUSTER = {
        'AutoMinorVersionUpgrade'     => String,  # actually TrueClass or FalseClass
        'CacheSecurityGroups'         => Array,
        'CacheClusterId'              => String,
        'CacheClusterStatus'          => String,
        'CacheNodeType'               => String,
        'Engine'                      => String,
        'EngineVersion'               => String,
        'CacheParameterGroup'         => Hash,
        'NumCacheNodes'               => Integer,
        'PreferredMaintenanceWindow'  => String,
        'CacheNodes'                  => Array,
        'PendingModifiedValues'       => Hash,
      }
      CACHE_CLUSTER_RUNNING   = CACHE_CLUSTER.merge({
        'CacheClusterCreateTime'      => DateTime,
        'PreferredAvailabilityZone'   => String,
      })
      CACHE_CLUSTER_MODIFIED  = CACHE_CLUSTER_RUNNING.merge({
        'NotificationConfiguration'   => Hash,
        'PendingModifiedValues'       => Hash,
      })
      SINGLE_CACHE_CLUSTER    = BASIC.merge('CacheCluster' => CACHE_CLUSTER)
      DESCRIBE_CACHE_CLUSTERS = BASIC.merge('CacheClusters' => [CACHE_CLUSTER])

      EVENT = {
        'Date'                        => DateTime,
        'Message'                     => String,
        'SourceIdentifier'            => String,
        'SourceType'                  => String,
      }
      EVENT_LIST = [EVENT]

      RESERVED_CACHE_CLUSTER = {
        'CacheNodeCount'                => Integer,
        'CacheNodeType'                 => String,
        'Duration'                      => Integer,
        'FixedPrice'                    => Float,
        'OfferingType'                  => String,
        'ProductDescription'            => String,
        'RecurringCharges'              => Array,
        'ReservedCacheNodeId'           => String,
        'ReservedCacheNodesOfferingId'  => String,
        'StartTime'                     => DateTime,
        'State'                         => String,
        'UsagePrice'                    => Float
      }
      RESERVED_CACHE_CLUSTER_LIST = [RESERVED_CACHE_CLUSTER]

    end
  end
end