Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
# File lib/deltacloud/drivers/condor/condor_driver.rb, line 21 def self.convert_condor_state(state_id) case state_id when 0,1,5 then 'PENDING' when 2 then 'RUNNING' when 3,4 then 'SHUTTING_DOWN' else raise "Unknown Condor state (#{state_id})" end end
# File lib/deltacloud/drivers/gogrid/gogrid_driver.rb, line 25 def authn_feature_failed? return true unless authn_error.nil? end
# File lib/deltacloud/models/instance.rb, line 39 def can_create_image? self.create_image end
# File lib/deltacloud/models/instance.rb, line 47 def hardware_profile instance_profile end
# File lib/deltacloud/models/instance.rb, line 51 def hardware_profile=(profile) instance_profile = profile end
# File lib/deltacloud/models/instance.rb, line 62 def method_missing(name, *args) if name =~ /is_(\w+)\?/ return true if self.state.downcase.eql?($1) else raise NoMethodError.new(name.to_s) end end
# File lib/deltacloud/models/instance.rb, line 76 def to_hash h = self.to_hash_original h[:public_addresses] = h[:public_addresses].collect do |address| { :address => { :type => address.address_type, :value => address } } end h[:actions] = self.actions.collect do |action| { :"#{action}" => { :method => collections[:instances].operations[action.to_sym].method, :href => collections[:instances].operations[action.to_sym].path.gsub(':id', self.id) }} end h end
Generated with the Darkfish Rdoc Generator 2.