Sha256: 726d1b8a07179d79dbc4eeffb3489edd8276bcb86c1bcbb14e02cb607af04672

Contents?: true

Size: 1.37 KB

Versions: 17

Compression:

Stored size: 1.37 KB

Contents

module Fog
  module Compute
    class Fogdocker
      # Create attributes
      #'Hostname' => '',
      #'User' => '',
      #'Memory' => 0,
      #'MemorySwap' => 0,
      #'AttachStdin' => false,
      #'AttachStdout' => true,
      #'AttachStderr' => true,
      #'PortSpecs' => nil,
      #'Tty' => false,
      #'OpenStdin' => false,
      #'StdinOnce' => false,
      #'Env' => nil,
      #'Cmd' => ['date'],
      #'Dns' => nil,
      #'Image' => 'base',
      #'Volumes' => {
      #    '/tmp' =>  {}
      #},
      #'VolumesFrom' => '',
      #'WorkingDir' => '',
      #'ExposedPorts' => {
      #    '22/tcp' => {}
      #}
      class Real
        def container_create(attrs)
          downcase_hash_keys Docker::Container.create(camelize_hash_keys(attrs)).json
        end
      end

      class Mock
        def container_create(attrs)
          {'id'         => '2ce79789656e4f7474624be6496dc6d988899af30d556574389a19aade2f9650',
           'image'      => 'mattdm/fedora:f19',
           'command'    => '/bin/bash',
           'created'    => '1389876158',
           'status'     => 'Up 45 hours',
           'state'      => {'running' => 'true'},
           'ports'      =>  nil,
           'sizerw'     =>  0,
           'sizerootfs' =>  0,
           'name'       => '123123123',
           'names'      =>  ['/boring_engelbert']
          }
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/fogdocker/requests/compute/container_create.rb
fog-1.27.0 lib/fog/fogdocker/requests/compute/container_create.rb
fog-1.26.0 lib/fog/fogdocker/requests/compute/container_create.rb
fog-1.25.0 lib/fog/fogdocker/requests/compute/container_create.rb
nsidc-fog-1.24.1 lib/fog/fogdocker/requests/compute/container_create.rb
fog-1.24.0 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.11 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.10 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.9 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.8 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.7 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.6 lib/fog/fogdocker/requests/compute/container_create.rb
fog-1.23.0 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.4 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.3 lib/fog/fogdocker/requests/compute/container_create.rb
ns-fog-1.22.2 lib/fog/fogdocker/requests/compute/container_create.rb
fog-1.22.1 lib/fog/fogdocker/requests/compute/container_create.rb