Produced by Araxis Merge on 10/2/2017 7:00:31 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | cds.zip\cds\product\tests | Rakefile | Thu Mar 16 15:17:48 2017 UTC |
| 2 | cds.zip\cds\product\tests | Rakefile | Mon Oct 2 11:30:36 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 132 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | require "j son" | |
| 2 | require Fi le.dirname (__FILE__) + '/Patie ntSynchron izer.rb' | |
| 3 | require 'n et/ssh' | |
| 4 | ||
| 5 | JSON.creat e_id = nil | |
| 6 | ||
| 7 | task :scpC DSILogs, : driver do |t, args| | |
| 8 | logDir = "./cdsi_l ogs" | |
| 9 | logs = [ "catalina. out"] | |
| 10 | key = kn ife_search _for_key_n ame("cdsin vocation", args[:dri ver]) | |
| 11 | user = " REDACTED " | |
| 12 | ip = kni fe_search_ for_ip("cd sinvocatio n") | |
| 13 | Dir.mkdi r("#{logDi r}") unles s File.exi sts?("#{lo gDir}") | |
| 14 | logs.eac h do |logn ame| | |
| 15 | sh('sc p', '-o', 'StrictHos tKeyChecki ng=no', '- i', "#{key }", "#{use r}@#{ip}:/ usr/local/ tomcat8-8/ logs/#{log name}", "# {logDir}") | |
| 16 | end | |
| 17 | end | |
| 18 | ||
| 19 | def knife_ search_for _ip(machin e_name) | |
| 20 | release = File.rea d(File.dir name(__FIL E__) + "/. ./../infra structure/ properties /releaseVe rsion") | |
| 21 | stack = ENV['JOB_N AME'] || E NV['USER'] || "#{ENV ['USER']}- #{release} " | |
| 22 | if ENV.k ey?('BUNDL E_BIN_PATH ') | |
| 23 | raw_se arch = Bun dler.with_ clean_env { `/opt/ch efdk/bin/k nife searc h node \'r ole:#{mach ine_name} AND stack: #{stack}\' -Fj --con fig ~/Proj ects/vista core/.chef /knife.rb` } | |
| 24 | else | |
| 25 | raw_se arch = `/o pt/chefdk/ bin/knife search nod e \'role:# {machine_n ame} AND s tack:#{sta ck}\' -Fj --config ~ /Projects/ vistacore/ .chef/knif e.rb` | |
| 26 | end | |
| 27 | parsed_s earch = JS ON.parse(r aw_search) | |
| 28 | fail "Mo re than on e node wit h that nam e found" i f parsed_s earch["res ults"] > 1 | |
| 29 | fail "No node with that name found" if parsed_se arch["resu lts"] == 0 | |
| 30 | ip = par sed_search ["rows"][0 ]['automat ic']['ipad dress'] | |
| 31 | end | |
| 32 | ||
| 33 | def knife_ search_for _key_name( machine_na me, driver ) | |
| 34 | release = File.rea d(File.dir name(__FIL E__) + "/. ./../infra structure/ properties /releaseVe rsion") | |
| 35 | stack = ENV['JOB_N AME'] || E NV['USER'] || "#{ENV ['USER']}- #{release} " | |
| 36 | driver = = "aws" ? key_box = "#{machine _name}-#{s tack}-noin t" : key_b ox = "#{ma chine_name }-#{stack} " | |
| 37 | raw_sear ch = `/opt /chefdk/bi n/knife se arch node \'name:#{k ey_box}\' -Fj --conf ig ~/Proje cts/vistac ore/.chef/ knife.rb` | |
| 38 | parsed_s earch = JS ON.parse(r aw_search) | |
| 39 | fail "Mo re than on e key was found for: #{machine _name}" if parsed_se arch["resu lts"] > 1 | |
| 40 | fail "No key was f ound for: #{machine_ name}" if parsed_sea rch["resul ts"] == 0 | |
| 41 | begin | |
| 42 | key = parsed_sea rch["rows" ][0]['norm al']["chef _provision ing"]["ref erence"][" key_name"] | |
| 43 | rescue N oMethodErr or | |
| 44 | begin | |
| 45 | key = parsed_s earch["row s"][0]['no rmal']["ch ef_provisi oning"]["l ocation"][ "key_name" ] | |
| 46 | rescue | |
| 47 | rais e %/ | |
| 48 | No a ttribute f ound for # {machine_n ame}-#{sta ck} at: [' rows'][0][ 'normal'][ 'chef_prov isioning'] ['location ']['key_na me'] | |
| 49 | or [ 'rows'][0] ['normal'] ['chef_pro visioning' ]['referen ce']['key_ name'] | |
| 50 | / | |
| 51 | end | |
| 52 | end | |
| 53 | key_name = File.ex pand_path( key, "#{EN V['HOME']} /Projects/ vistacore/ .chef/keys ") | |
| 54 | end | |
| 55 | ||
| 56 | task :sync Cache do | |
| 57 | patient_ sync_list = [ | |
| 58 | "9E7A; 140", | |
| 59 | "9E7A; 253", | |
| 60 | "9E7A; 100184" | |
| 61 | ] | |
| 62 | ||
| 63 | ENV["JDS _IP"] = kn ife_search _for_ip("j ds") | |
| 64 | ENV["VX_ SYNC_IP"] = knife_se arch_for_i p("vxsync_ client") | |
| 65 | PatientS ynchronize r.wait_unt il_operati onal_data_ loaded "ht tp://#{ENV ["JDS_IP"] }:9080", 6 00, ["9E7A ", "C877"] | |
| 66 | PatientS ynchronize r.synchron ize_patien t_list "ht tp://#{ENV ["VX_SYNC_ IP"]}:8080 ", 3600, p atient_syn c_list | |
| 67 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.