Sha256: 7315159a259701497f23b8dcbaffa45596bae6b59ec00f9d2623b83253d5d8d4

Contents?: true

Size: 674 Bytes

Versions: 15

Compression:

Stored size: 674 Bytes

Contents

module Brightbox
  class DatabaseSnapshot < Api
    def self.require_account?
      true
    end

    def self.all
      conn.database_snapshots.all
    end

    def self.get(id)
      conn.database_snapshots.get(id)
    end

    def update(options)
      self.class.conn.update_database_snapshot(id, options)
      reload
      self
    end

    def destroy
      fog_model.destroy
    end

    def self.default_field_order
      %i[id status created_on size name]
    end

    def to_row
      a = fog_model.attributes
      a[:status] = fog_model.state
      a[:locked] = locked?
      a[:created_on] = fog_model.created_at.strftime("%Y-%m-%d")
      a
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
brightbox-cli-5.0.0.alpha lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.8.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.7.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.6.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.5.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.5.0.rc1 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.4.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.3.2 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.3.1 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.3.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.2.1 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.2.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.1.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.0.0 lib/brightbox-cli/database_snapshot.rb
brightbox-cli-4.0.0.rc2 lib/brightbox-cli/database_snapshot.rb