Skip to content

Commit

Permalink
renamed mirror_flagOUT to mirror_flag_out
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Crauwels committed Feb 7, 2017
1 parent 45ed582 commit 2055e3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/puppet/provider/proxy_mysql_query_rule/proxysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def self.instances
@client_addr, @proxy_addr, @proxy_port, @destination_hostgroup,
@digest, @match_digest, @match_pattern, @negate_match_pattern, @replace_pattern,
@cache_ttl, @reconnect, @timeout, @retries, @delay, @error_msg, @log, @comment,
@mirror_flagOUT, @mirror_hostgroup = mysql([defaults_file, "-NBe", query].compact).split(/\s/)
@mirror_flag_out, @mirror_hostgroup = mysql([defaults_file, "-NBe", query].compact).split(/\s/)
name = "mysql_query_rule-#{rule_id}"

instances << new(
Expand Down Expand Up @@ -54,7 +54,7 @@ def self.instances
:error_msg => @error_msg,
:log => @log,
:comment => @comment,
:mirror_flagOUT => @mirror_flagOUT,
:mirror_flag_out => @mirror_flag_out,
:mirror_hostgroup => @mirror_hostgroup
)
end
Expand Down Expand Up @@ -98,7 +98,7 @@ def create
error_msg = make_sql_value(@resource.value(:error_msg) || nil)
log = make_sql_value(@resource.value(:log) || nil)
comment = make_sql_value(@resource.value(:comment) || nil)
mirror_flagOUT = make_sql_value(@resource.value(:mirror_flagOUT) || nil)
mirror_flag_out = make_sql_value(@resource.value(:mirror_flag_out) || nil)
mirror_hostgroup = make_sql_value(@resource.value(:mirror_hostgroup) || nil)

query = "INSERT INTO `mysql_query_rules` ("
Expand All @@ -111,7 +111,7 @@ def create
query << "#{client_addr}, #{proxy_addr}, #{proxy_port}, #{destination_hostgroup}, "
query << "#{digest}, #{match_digest}, #{match_pattern}, #{negate_match_pattern}, #{replace_pattern}, "
query << "#{cache_ttl}, #{reconnect}, #{timeout}, #{retries}, #{delay}, #{error_msg}, #{log}, #{comment}, "
query << "#{mirror_flagOUT}, #{mirror_hostgroup})"
query << "#{mirror_flag_out}, #{mirror_hostgroup})"
mysql([defaults_file, '-e', query].compact)
@property_hash[:ensure] = :present

Expand Down Expand Up @@ -267,8 +267,8 @@ def comment=(value)
@property_flush[:comment] = value
end

def mirror_flagOUT=(value)
@property_flush[:mirror_flagOUT] = value
def mirror_flag_out=(value)
@property_flush[:mirror_flag_out] = value
end

def mirror_hostgroup=(value)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/type/proxy_mysql_query_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
newvalue(/\d+/)
end

newproperty(:mirror_flagOUT) do
newproperty(:mirror_flag_out) do
desc 'see https://github.com/sysown/proxysql/blob/master/doc/mirroring.md'
newvalue(/\d+/)
end
Expand Down

0 comments on commit 2055e3e

Please sign in to comment.