Revision 4e795668
Added by ccnifo about 7 years ago
lib/facter/util/pulp.rb | ||
---|---|---|
return nil if status.nil?
|
||
# Strip color from command output
|
||
status.gsub!(/\e\[([;\d]+)?m/, '')
|
||
/^This consumer is registered to the server\s\[(?<server_id>.*)\]\swith\sthe\sID\s\[(?<consumer_id>.*)\]\.$/.match(status)
|
||
/^This consumer is registered to the server\s\[(.*)\]\swith\sthe\sID\s\[(.*)\]\.$/.match(status)
|
||
result = {:server_id => $1, :consumer_id => $2}
|
||
end
|
||
|
||
def self.pulp_consumer_id
|
Also available in: Unified diff
Fixes GH-243 - Ruby 1.8 compatible syntax for facts (#246)