Class: RHC::Rest::Alias
Instance Method Summary
collapse
Methods inherited from Base
#add_message, #has_param?, #initialize, #link_href, #links, #rest_method, #supports?
#define_attr, #model_name
Methods included from Attributes
#attribute, #attributes, #attributes=, #clear_attribute
Instance Method Details
33
34
35
|
# File 'lib/rhc/rest/alias.rb', line 33
def <=>(a)
return self.name <=> a.name
end
|
#add_certificate(ssl_certificate_content, private_key_content, pass_phrase) ⇒ Object
17
18
19
20
21
22
23
24
25
|
# File 'lib/rhc/rest/alias.rb', line 17
def add_certificate(ssl_certificate_content, private_key_content, pass_phrase)
debug "Running add_certificate for alias #{@id}"
raise RHC::Rest::SslCertificatesNotSupported, "The server does not support SSL certificates for custom aliases." unless supports? :update
foo = rest_method :update, {
:ssl_certificate => ssl_certificate_content,
:private_key => private_key_content,
:pass_phrase => pass_phrase
}
end
|
#delete_certificate ⇒ Object
27
28
29
30
31
|
# File 'lib/rhc/rest/alias.rb', line 27
def delete_certificate
debug "Running delete_certificate for alias #{@id}"
raise RHC::Rest::SslCertificatesNotSupported, "The server does not support SSL certificates for custom aliases." unless supports? :update
rest_method :update, {}
end
|
#destroy ⇒ Object
Also known as:
delete
11
12
13
14
|
# File 'lib/rhc/rest/alias.rb', line 11
def destroy
debug "Deleting alias #{self.id}"
rest_method :delete
end
|
#has_private_ssl_certificate? ⇒ Boolean
7
8
9
|
# File 'lib/rhc/rest/alias.rb', line 7
def has_private_ssl_certificate?
has_private_ssl_certificate
end
|
37
38
39
|
# File 'lib/rhc/rest/alias.rb', line 37
def to_s
self.id
end
|