Sha256: eb050726274c9872bbd1705a018a685278c283c4b210432d74590e1c6a693023

Contents?: true

Size: 650 Bytes

Versions: 54

Compression:

Stored size: 650 Bytes

Contents

class Ey::Core::Client::KeypairDeployment < Ey::Core::Model
  extend Ey::Core::Associations

  identity :id

  has_one :keypair
  has_one :target, resource: :environment, collection: :environments

  def save!
    requires :keypair, :environment

    params = {
      "url"         => self.collection.url,
      "keypair"     => self.keypair.identity,
      "environment" => self.environment.identity,
    }

    if new_record?
      merge_attributes(self.connection.create_keypair_deployment(params).body["keypair_deployment"])
    else raise NotImplementedError  #  update
    end
  end

  alias environment= target=
  alias environment target
end

Version data entries

54 entries across 54 versions & 3 rubygems

Version Path
ey-core-3.6.0.autoscaling1 lib/ey-core/models/keypair_deployment.rb
ey-core-3.6.4 lib/ey-core/models/keypair_deployment.rb
ey-core-3.6.3 lib/ey-core/models/keypair_deployment.rb
ey-core-3.6.1 lib/ey-core/models/keypair_deployment.rb
groove-ey-core-3.6.3 lib/ey-core/models/keypair_deployment.rb
groove-ey-core-3.6.2 lib/ey-core/models/keypair_deployment.rb
groove-ey-core-3.6.1 lib/ey-core/models/keypair_deployment.rb
ey-core-3.5.0 lib/ey-core/models/keypair_deployment.rb
ey-core-3.4.4 lib/ey-core/models/keypair_deployment.rb
ey-core-3.4.2 lib/ey-core/models/keypair_deployment.rb
ey-core-3.4.1 lib/ey-core/models/keypair_deployment.rb
ey-core-3.4.0 lib/ey-core/models/keypair_deployment.rb
ey-core-3.3.1 lib/ey-core/models/keypair_deployment.rb
ey-core-3.3.0 lib/ey-core/models/keypair_deployment.rb
ey-core-3.2.6 lib/ey-core/models/keypair_deployment.rb
ey-core-3.2.5 lib/ey-core/models/keypair_deployment.rb
ey-core-3.2.4 lib/ey-core/models/keypair_deployment.rb
ey-core-3.2.3 lib/ey-core/models/keypair_deployment.rb
ey-core-3.2.2 lib/ey-core/models/keypair_deployment.rb
ey-core-3.2.1 lib/ey-core/models/keypair_deployment.rb