Module: Chef::Resource::SslCertificate::Subject

Included in:
Chef::Resource::SslCertificate
Defined in:
libraries/resource_ssl_certificate_subject.rb

Overview

ssl_certificate Chef Resource certificate subject related methods.

Constant Summary collapse

ATTRS =
%w(
  common_name
  country
  city
  state
  organization
  department
  email
).freeze

Instance Method Summary collapse

Instance Method Details

#city(arg = nil) ⇒ Object


63
64
65
# File 'libraries/resource_ssl_certificate_subject.rb', line 63

def city(arg = nil)
  set_or_return(:city, arg, kind_of: [String])
end

#common_name(arg = nil) ⇒ Object Also known as: domain


53
54
55
# File 'libraries/resource_ssl_certificate_subject.rb', line 53

def common_name(arg = nil)
  set_or_return(:common_name, arg, kind_of: String, required: true)
end

#country(arg = nil) ⇒ Object


59
60
61
# File 'libraries/resource_ssl_certificate_subject.rb', line 59

def country(arg = nil)
  set_or_return(:country, arg, kind_of: [String])
end

#department(arg = nil) ⇒ Object


75
76
77
# File 'libraries/resource_ssl_certificate_subject.rb', line 75

def department(arg = nil)
  set_or_return(:department, arg, kind_of: [String])
end

#email(arg = nil) ⇒ Object


79
80
81
# File 'libraries/resource_ssl_certificate_subject.rb', line 79

def email(arg = nil)
  set_or_return(:email, arg, kind_of: [String])
end

#initialize_subject_defaultsObject


49
50
51
# File 'libraries/resource_ssl_certificate_subject.rb', line 49

def initialize_subject_defaults
  initialize_attribute_defaults(Subject::ATTRS)
end

#organization(arg = nil) ⇒ Object


71
72
73
# File 'libraries/resource_ssl_certificate_subject.rb', line 71

def organization(arg = nil)
  set_or_return(:organization, arg, kind_of: [String])
end

#state(arg = nil) ⇒ Object


67
68
69
# File 'libraries/resource_ssl_certificate_subject.rb', line 67

def state(arg = nil)
  set_or_return(:state, arg, kind_of: [String])
end