Sha256: 913e25f5d76d61c528dc422b8e9c97ac8b56ba0d6cb6dd569a8d723ec5a13288

Contents?: true

Size: 813 Bytes

Versions: 7

Compression:

Stored size: 813 Bytes

Contents

# -*- coding: utf-8 -*-
require "magellan/cli/resources"

module Magellan
  module Cli
    module Resources

      class TransactionRouter < Base
        self.resource_key = "functions~transaction_router"
        self.resource_dependency = {"stage" => Stage.parameter_name}

        desc "create NAME", I18n.t(:create, scope: [:resources_common, :cmd], resource_name: resource_name)
        def create(name)
          s = load_selection!(Stage::VERSION_PARAMETER_NAME)
          params = {
            self.class.parameter_name => {
              "stage_version_id" => s["id"],
              "name" => name,
              # "instance_base_name" => name,
            }
          }
          post_json("/admin/#{self.resource_key}/new.json", params)
          select(name)
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
magellan-cli-0.4.4 lib/magellan/cli/resources/transaction_router.rb
magellan-cli-0.4.3 lib/magellan/cli/resources/transaction_router.rb
magellan-cli-0.4.2 lib/magellan/cli/resources/transaction_router.rb
magellan-cli-0.4.1 lib/magellan/cli/resources/transaction_router.rb
magellan-cli-0.4.0 lib/magellan/cli/resources/transaction_router.rb
magellan-cli-0.3.4 lib/magellan/cli/resources/transaction_router.rb
magellan-cli-0.3.3 lib/magellan/cli/resources/transaction_router.rb