Sha256: 9702226d7faff94f3edd6a247268a5e72235fd3acb36967ceeee5e39fc3bd465

Contents?: true

Size: 1.03 KB

Versions: 6

Compression:

Stored size: 1.03 KB

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

# (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
#
#    Licensed under the Apache License, Version 2.0 (the "License");
#    you may not use this file except in compliance with the License.
#    You may obtain a copy of the License at
#
#        http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.

require 'rubygems'
require 'require_relative'

#
# compute module
#
module Compute
  def delete_forge(oFC, name)
    instances = oFC.oCompute.servers.all(:name => name)
    instances.each do|instance|
      # make sure we don't delete another forge because fog filters
      # the name in a "like syntax" way
      oFC.oCompute.servers.get(instance.id).destroy
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
forj-0.0.40 lib/compute.rb
forj-0.0.39 lib/compute.rb
forj-0.0.38 lib/compute.rb
forj-0.0.37 lib/compute.rb
forj-0.0.36 lib/compute.rb
forj-0.0.35 lib/compute.rb