Fixes to docker run 60/77760/1
authorilanap <ilanap@amdocs.com>
Sun, 3 Feb 2019 21:09:11 +0000 (23:09 +0200)
committerilanap <ilanap@amdocs.com>
Sun, 3 Feb 2019 21:09:11 +0000 (23:09 +0200)
different port on jenkins where 8080 already taken

Change-Id: I579a422112dcc5c1deec148f1d233fd1c057b7a2
Issue-ID: SDC-2028
Signed-off-by: ilanap <ilanap@amdocs.com>
catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/1_create_consumer_and_user.rb
catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/recipes/2_check_Backend.rb
catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/consumers.py.erb
catalog-be/sdc-backend-init/chef-repo/cookbooks/sdc-catalog-be-setup/templates/default/user.py.erb

index 1b6d2b7..14085bd 100644 (file)
@@ -3,7 +3,7 @@ template "/tmp/user.py" do
     sensitive true
     mode 0755
     variables({
-      :be_ip => node['Nodes']['BE']
+      :be_ip => node['Nodes']['BE'],
       :be_port => node['BE']['http_port']
     })
 end
@@ -21,7 +21,7 @@ template "/tmp/consumers.py" do
     sensitive true
     mode 0755
     variables({
-      :be_ip => node['Nodes']['BE']
+      :be_ip => node['Nodes']['BE'],
       :be_port => node['BE']['http_port']
     })
 end
index 35dc27f..b929637 100644 (file)
@@ -3,7 +3,7 @@ template "/tmp/check_Backend_Health.py" do
     sensitive true
     mode 0755
     variables({
-      :be_ip => node['Nodes']['BE']
+      :be_ip => node['Nodes']['BE'],
       :be_port => node['BE']['http_port']
     })
 end
index 55de8e9..7133bc9 100644 (file)
@@ -41,7 +41,7 @@ def checkConsumer(consumerName):
 
 def createConsumer( consumerName, consumerSalt, consumerPass ):
     print '[INFO] ' + consumerName
-    command="curl -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" http://"  + ":" + BE_PORT + "/sdc2/rest/v1/consumers/ -d '{\"consumerName\": '" + consumerName + "', \"consumerSalt\": '" + consumerSalt + "',\"consumerPassword\": '" + consumerPass + "'}'"
+    command="curl -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" http://"  + BE_IP  + ":" + BE_PORT + "/sdc2/rest/v1/consumers/ -d '{\"consumerName\": '" + consumerName + "', \"consumerSalt\": '" + consumerSalt + "',\"consumerPassword\": '" + consumerPass + "'}'"
 
     proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE)
 
index 44ef30e..a97e451 100644 (file)
@@ -43,7 +43,7 @@ def checkUser(userName):
 
 def createUser( firstName, lastName, userId , email_dom , role ):
     print '[INFO] create first:[' + firstName + '], last:[' + lastName + '], Id:[' + userId + '], email:[' + userId + '@' + email_dom + '], role:[' + role +']'
-    command="curl -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" http://" + BE_IP + ":" + BE_PORT + "/sdc2/rest/v1/user/ -d '{\"firstName\": '" + firstName + "', \"lastName\": '" + lastName + "',\"userId\": '" + userId + "',\"email\": '" + userId + "@" + email_dom + "',\"role\": '" + role + "'}'"
+    command="curl -s -o /dev/null -w \"%{http_code}\" -X POST -i -H \"Accept: application/json; charset=UTF-8\" -H \"Content-Type: application/json\" -H \"USER_ID: jh0003\" http://" + BE_IP + ":" + BE_PORT + "/sdc2/rest/v1/user/ -d '{\"firstName\": '" + firstName + "', \"lastName\": '" + lastName + "',\"userId\": '" + userId + "',\"email\": '" + userId + "@" + email_dom + "',\"role\": '" + role + "'}'"
 
     proc = subprocess.Popen( command , shell=True , stdout=subprocess.PIPE)
     (out, err) = proc.communicate()