Module: HammerCLIForeman::References

Defined in:
lib/hammer_cli_foreman/references.rb

Class Method Summary collapse

Class Method Details

.all_parameters(dsl) ⇒ Object



140
141
142
143
144
145
146
# File 'lib/hammer_cli_foreman/references.rb', line 140

def self.all_parameters(dsl)
  dsl.build do
    collection :all_parameters, _("All parameters"), :numbered => false do
      custom_field Fields::KeyValue
    end
  end
end

.compute_profiles(dsl) ⇒ Object



59
60
61
62
63
64
65
# File 'lib/hammer_cli_foreman/references.rb', line 59

def self.compute_profiles(dsl)
  dsl.build do
    collection :compute_profiles, _("Compute profiles"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.compute_resources(dsl) ⇒ Object



67
68
69
70
71
72
73
# File 'lib/hammer_cli_foreman/references.rb', line 67

def self.compute_resources(dsl)
  dsl.build do
    collection :compute_resources, _("Compute resources"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.domains(dsl) ⇒ Object



99
100
101
102
103
104
105
# File 'lib/hammer_cli_foreman/references.rb', line 99

def self.domains(dsl)
  dsl.build do
    collection :domains, _("Domains"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.external_usergroups(dsl) ⇒ Object



164
165
166
167
168
169
170
# File 'lib/hammer_cli_foreman/references.rb', line 164

def self.external_usergroups(dsl)
  dsl.build do
    collection :external_usergroups, _("External user groups"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.hostgroups(dsl) ⇒ Object



115
116
117
118
119
120
121
# File 'lib/hammer_cli_foreman/references.rb', line 115

def self.hostgroups(dsl)
  dsl.build do
    collection :hostgroups, _("Hostgroups"), :numbered => false do
      custom_field Fields::Reference, :name_key => :title
    end
  end
end

.media(dsl) ⇒ Object



75
76
77
78
79
80
81
# File 'lib/hammer_cli_foreman/references.rb', line 75

def self.media(dsl)
  dsl.build do
    collection :media, _("Installation media"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.operating_systems(dsl) ⇒ Object



148
149
150
151
152
153
154
# File 'lib/hammer_cli_foreman/references.rb', line 148

def self.operating_systems(dsl)
  dsl.build do
    collection :operatingsystems, _("Operating systems"), :numbered => false do
      custom_field Fields::Reference, :name_key => :title
    end
  end
end

.parameters(dsl) ⇒ Object



132
133
134
135
136
137
138
# File 'lib/hammer_cli_foreman/references.rb', line 132

def self.parameters(dsl)
  dsl.build do
    collection :parameters, _("Parameters"), :numbered => false do
      custom_field Fields::KeyValue
    end
  end
end

.partition_tables(dsl) ⇒ Object



91
92
93
94
95
96
97
# File 'lib/hammer_cli_foreman/references.rb', line 91

def self.partition_tables(dsl)
  dsl.build do
    collection :ptables, _("Partition Tables"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.provisioning_templates(dsl) ⇒ Object



83
84
85
86
87
88
89
# File 'lib/hammer_cli_foreman/references.rb', line 83

def self.provisioning_templates(dsl)
  dsl.build do
    collection :provisioning_templates, _("Templates"), :numbered => false do
      custom_field Fields::Template
    end
  end
end

.realms(dsl) ⇒ Object



107
108
109
110
111
112
113
# File 'lib/hammer_cli_foreman/references.rb', line 107

def self.realms(dsl)
  dsl.build do
    collection :realms, _("Realms"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.roles(dsl) ⇒ Object



156
157
158
159
160
161
162
# File 'lib/hammer_cli_foreman/references.rb', line 156

def self.roles(dsl)
  dsl.build do
    collection :roles, _("Roles"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.smart_proxies(dsl) ⇒ Object



51
52
53
54
55
56
57
# File 'lib/hammer_cli_foreman/references.rb', line 51

def self.smart_proxies(dsl)
  dsl.build do
    collection :smart_proxies, _("Smart proxies"), :numbered => false do
      custom_field Fields::Reference
    end
  end
end

.subnets(dsl) ⇒ Object



123
124
125
126
127
128
129
# File 'lib/hammer_cli_foreman/references.rb', line 123

def self.subnets(dsl)
  dsl.build do
    collection :subnets, _("Subnets"), :numbered => false do
      custom_field Fields::Reference, :details => :network_address
    end
  end
end

.taxonomies(dsl) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/hammer_cli_foreman/references.rb', line 13

def self.taxonomies(dsl)
  dsl.build do
    collection :locations, _("Locations"), :numbered => false, :hide_blank => true do
      custom_field Fields::Reference, :name_key => :title
    end
    collection :organizations, _("Organizations"), :numbered => false, :hide_blank => true do
      custom_field Fields::Reference, :name_key => :title
    end
  end
end

.timestamps(dsl) ⇒ Object



6
7
8
9
10
11
# File 'lib/hammer_cli_foreman/references.rb', line 6

def self.timestamps(dsl)
  dsl.build do
    field :created_at, _("Created at"), Fields::Date
    field :updated_at, _("Updated at"), Fields::Date
  end
end

.usergroups(dsl) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/hammer_cli_foreman/references.rb', line 32

def self.usergroups(dsl)
  dsl.build do
    collection :usergroups, _("User groups"), :numbered => true do
      field :name, _("Usergroup")
      field :id, _("Id"), Fields::Id
      collection :roles, _("Roles"), :numbered => false do
        custom_field Fields::Reference
      end
    end
    collection :cached_usergroups, _("Inherited User groups"), :numbered => true do
      field :name, _("Usergroup")
      field :id, _("Id"), Fields::Id
      collection :roles, _("Roles"), :numbered => false do
        custom_field Fields::Reference
      end
    end
  end
end

.users(dsl) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/hammer_cli_foreman/references.rb', line 24

def self.users(dsl)
  dsl.build do
    collection :users, _("Users"), :numbered => false do
      custom_field Fields::Reference, :name_key => :login
    end
  end
end