Sha256: 6a9c1ec29e0138804fca9384328658af2fdf4c0167c3eaa3fabe856ed524995b

Contents?: true

Size: 1.45 KB

Versions: 33

Compression:

Stored size: 1.45 KB

Contents

module Fog
  module ContainerInfra
    class OpenStack
      class Real
        def get_cluster(uuid_or_name)
          request(
            :expects => [200],
            :method  => 'GET',
            :path    => "clusters/#{uuid_or_name}"
          )
        end
      end

      class Mock
        def get_cluster(_uuid_or_name)
          response = Excon::Response.new
          response.status = 200
          response.body = {
            "status"              => "CREATE_COMPLETE",
            "uuid"                => "746e779a-751a-456b-a3e9-c883d734946f",
            "stack_id"            => "9c6f1169-7300-4d08-a444-d2be38758719",
            "created_at"          => "2016-08-29T06:51:31+00:00",
            "api_address"         => "https://172.24.4.6:6443",
            "discovery_url"       => "https://discovery.etcd.io/cbeb580da58915809d59ee69348a84f3",
            "updated_at"          => "2016-08-29T06:53:24+00:00",
            "master_count"        => 1,
            "coe_version"         => "v1.2.0",
            "cluster_template_id" => "0562d357-8641-4759-8fed-8173f02c9633",
            "master_addresses"    => ["172.24.4.6"],
            "node_count"          => 1,
            "node_addresses"      => ["172.24.4.13"],
            "status_reason"       => "Stack CREATE completed successfully",
            "create_timeout"      => 60,
            "name"                => "k8s"
          }
          response
        end
      end
    end
  end
end

Version data entries

33 entries across 31 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.10 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.1.30 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.1.29 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.9 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.1.28 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.8 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.7 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.6 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.5 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.4 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.3 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.2 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.3.0 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.2.4 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.2.3 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.2.2 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.2.1 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-openstack-0.2.0 lib/fog/container_infra/openstack/requests/get_cluster.rb
fog-zj-0.1.28 lib/fog/container_infra/openstack/requests/get_cluster.rb