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 18 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/models/instance.rb, line 57 def initialize(init=nil) super(init) self.actions = [] if self.actions.nil? self.public_addresses = [] if self.public_addresses.nil? self.private_addresses = [] if self.private_addresses.nil? end
# File lib/deltacloud/drivers/gogrid/gogrid_driver.rb, line 24 def authn_feature_failed? return true unless authn_error.nil? end
# File lib/deltacloud/models/instance.rb, line 45 def can_create_image? self.create_image end
# File lib/deltacloud/models/instance.rb, line 49 def hardware_profile instance_profile end
# File lib/deltacloud/models/instance.rb, line 53 def hardware_profile=(profile) instance_profile = profile end
# File lib/deltacloud/models/instance.rb, line 64 def method_missing(name, *args) if name.to_s =~ %ris_(\w+)\?/ self.state.downcase.eql?($1) else raise NoMethodError.new(name.to_s) end end