Top Level Namespace
Defined Under Namespace
Modules: Helpers, RHN
Classes: Activationkey, Activationkeys, ActivationkeysSet, Channel, Channels, ChannelsSet, Configchannel, Configchannels, ConfigchannelsSet, Configuration, Host, Kickstart, KickstartFilepreservation, KickstartFilepreservations, KickstartFilepreservationsSet, KickstartKey, KickstartKeys, KickstartKeysSet, KickstartSnippet, KickstartSnippets, KickstartSnippetsSet, Kickstarts, KickstartsSet, Launcher, Operation, OperationSet, Org, OrgTrust, OrgTrusts, OrgTrustsSet, Orgs, OrgsSet, SatOperator, System, SystemCustominfo, SystemCustominfos, SystemCustominfosSet, Systemgroup, Systemgroups, SystemgroupsSet, Systems, SystemsSet, User, Users, UsersSet
Instance Method Summary
collapse
Instance Method Details
#config_syntax ⇒ Object
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
# File 'lib/satops.rb', line 111
def config_syntax
s{
Activationkeys:
update: true
Configchannels:
update: true
Channels:
update: true
delete: false
iss: false
Kickstarts:
update: true
KickstartFilepreservations:
update: true
KickstartKeys:
update: true
key_type: GPG
KickstartSnippets:
update: true
Orgs:
update: true
entitlements: false
OrgTrusts:
update: true
SystemCustominfos:
update: true
Systems:
update: true
Systemgroups:
update: true
Users:
update: true
deactivated: false
delete: false
exclude:
- admin
- satadmin
password: "rhnapi"
}
end
|
#overwrite_net_http ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/satops.rb', line 56
def overwrite_net_http
Net::HTTP.class_eval do
alias_method :old_initialize, :initialize
def initialize(*args)
old_initialize(*args)
@ssl_context = OpenSSL::SSL::SSLContext.new
@ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE
end
end
end
|
#satellites_syntax ⇒ Object
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
# File 'lib/satops.rb', line 181
def satellites_syntax
s{
--- !ruby/object:Configuration
source: !ruby/object:Host
name: sat1.example.org
user:
:login: admin
:passwd: redhat
target: !ruby/object:Host
name: sat2.example.org
user:
:login: admin
:passwd: redhat
}
end
|
#syntax ⇒ Object
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# File 'lib/satops.rb', line 74
def syntax
s{
Usage:
satops show sat | config
satops -s <sat file> -c <config file> [-dltw] destroy
satops -s <sat file> -c <config file> [-dltw] export <directory> ascii | bin
satops -s <sat file> -c <config file> [-dltw] import <directory> ascii | bin
satops -s <sat file> -c <config file> [-dltw] run <Ruby file>
satops -s <sat file> -c <config file> [-dltw]
satops -s <sat file> -c <config file> [-dltw] sync
satops [-h]
Mandatory Configuration:
Sat file: Source and Target RHN Satellites definition
Config file: RHN Satellite objects and options
Objects must be included to be processed
Use 'show sat|config' command for generating either templates
Options:
-d, --debug Activate debug output
-l, --log Append logs to file. By default logs go to Standard Output
-t, --tls Activate SSL (HTTPS) sessions
-w, --warnings Activate Ruby Verbose
-h, --help Display this help and exit
Commands:
destroy Delete all objects on target RHN Satellite
export Export RHN Satellite objects to files (ascci or binary formats) into <directory>
Remove objects on target RHN Satellite not present in source RHN Satellite
import Import RHN Satellite object from files (ascii or binary) located into <directory>
run Execute Ruby 'plug-in' file
sync Synchronise objects from source RHN Satellite to target RHN Satellite
show Generate configuration file examples
}
end
|