<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Deploying Domain on VSX in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77408#M4535</link>
    <description>not too sure if I understood correctly but vsx_provisioning_tool runs on mgmt and it pushes out config to actual gateway &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
    <pubDate>Fri, 06 Mar 2020 07:50:50 GMT</pubDate>
    <dc:creator>Kaspars_Zibarts</dc:creator>
    <dc:date>2020-03-06T07:50:50Z</dc:date>
    <item>
      <title>Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77272#M4528</link>
      <description>&lt;P&gt;I am trying to deploy a new domain through the web api on R80.20 but I am stuck with an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -s -k -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -X POST -d '{ "name" : "Domain01", "servers" : { "ip-address" : "10.11.12.10", "name" : "Domain01-mgmt", "multi-domain-server" : "CPMGT03", "comments" : "Customer01" }}' $cp_api_url/add-domain&lt;BR /&gt;!{&lt;BR /&gt;! "code" : "generic_err_invalid_parameter",&lt;BR /&gt;! "message" : "Invalid parameter for [servers]. Invalid value"&lt;/P&gt;&lt;P&gt;As far as I can tell from the API reference, it should be fine: &lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/#web/add-domain~v1.3%20" target="_blank"&gt;https://sc1.checkpoint.com/documents/latest/APIs/#web/add-domain~v1.3%20&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another thing:&lt;/P&gt;&lt;P&gt;When it comes time to deploy the VS, I will be using a command that looks something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -H "X-chkp-sid: $SID" -X POST -d '{"script-name":"VSX Provisioning","script":"vsx_provisioning_tool -s localhost -u admin -p admin-password -o add vd name $cp_vs_name vsx $VSX_Cluster type vs main_ip $NB_VM_PRI_IP, $NB_VS_INT","targets":"$MDM_Server"}' $cp_api_url/run-script | ./jq&lt;/P&gt;&lt;P&gt;What do I define '"targets":"$MDM_Server"' as? Where do I find the information that is to go in my variable $MDM-server? It might be simple answer, but I cannot see it logically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All this is on a R80.20 MDM-server.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 10:11:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77272#M4528</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-03-05T10:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77274#M4529</link>
      <description>You need to use servers.multi-domain-server.&lt;BR /&gt;The VS script I don't know but you do need to make sure that the provioning is done in the correct domain.</description>
      <pubDate>Thu, 05 Mar 2020 10:32:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77274#M4529</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2020-03-05T10:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77303#M4531</link>
      <description>&lt;P&gt;Ok, I'll give that a try for the Domain deployment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for VSX deployment I have been leaning up against this post: &lt;A href="https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Creating-VSX-Virtual-Systems-using-REST-API/td-p/20682" target="_blank"&gt;https://community.checkpoint.com/t5/API-CLI-Discussion-and-Samples/Creating-VSX-Virtual-Systems-using-REST-API/td-p/20682&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Which has lead me to do a sequence like this:&lt;/P&gt;&lt;P&gt;SID=`curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -X POST "$cp_api_url/login" -d "{\"user\":\"$cp_user\",\"password\":\"$password\"}" -s | awk -F\" '/sid/ {print $4}'`&lt;/P&gt;&lt;P&gt;&amp;lt; above Domain deployment to $cp_api_url/add-domain &amp;gt;&lt;BR /&gt;&amp;lt; above VSX deployment using $cp_api_url/run-script &amp;gt;&lt;/P&gt;&lt;P&gt;And then afterwards logging out of MDS and then into domain to do stuff like add objects, rules, sections etc., which works fine.&lt;/P&gt;&lt;P&gt;Should I do the following instead:&lt;/P&gt;&lt;P&gt;1. Login to MDS using above command&lt;BR /&gt;2. Deploy Domain&lt;BR /&gt;3. Logout of MDS&amp;nbsp; ($cp_api_url/logout)&lt;BR /&gt;4. Login to Domain like this: SID=`curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -X POST "$cp_api_url/login" -d "{\"user\":\"$cp_user\",\"password\":"\"$password\"",\"domain\":\"$CP_Domain\"}" | awk -F\" '/sid/ {print $4}'`&lt;BR /&gt;5. Deploy VSX&lt;BR /&gt;6. Wait for task to finish&lt;BR /&gt;7. Deploy objects, rules, sections etc.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Still need to figure out what the "target": refers to though... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 14:13:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77303#M4531</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-03-05T14:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77382#M4533</link>
      <description>vsx_provisioning_tool runs on the VSX gateway, which would be the target for your run-script API call.</description>
      <pubDate>Fri, 06 Mar 2020 01:51:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77382#M4533</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-03-06T01:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77407#M4534</link>
      <description>&lt;P&gt;Still not sure I understand, because the vsx_provisioning_tool runs on the MDM server.&lt;/P&gt;&lt;P&gt;Example: If I have my multi Domain Server to be fwmgmt01 and each node in the cluster (called VSX_Cluster_1) is called fw01a and fw01b.Should my target then be VSX_Cluster_1 or fw01a+fw01b ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 07:47:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77407#M4534</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-03-06T07:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77408#M4535</link>
      <description>not too sure if I understood correctly but vsx_provisioning_tool runs on mgmt and it pushes out config to actual gateway &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Fri, 06 Mar 2020 07:50:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77408#M4535</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2020-03-06T07:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77411#M4536</link>
      <description>&lt;P&gt;I agree with&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/17364"&gt;@Maarten_Sjouw&lt;/a&gt;&amp;nbsp;seems like domain / CMA is not set correctly in your command&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;url -s -k -H "Content-Type: application/json" -H "Accept: bla" -H "X-chkp-sid: $SID" -X POST -d '{"script-name":"VSX Provisioning","script":"vsx_provisioning_tool -s &lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;STRIKE&gt;&lt;FONT color="#FF0000"&gt;localhost&lt;/FONT&gt;&lt;/STRIKE&gt;&lt;/STRONG&gt;&lt;/FONT&gt; -u admin -p admin-password -o add vd name $cp_vs_name vsx $VSX_Cluster type vs main_ip &lt;FONT size="4"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;$NB_VM_PRI_IP, $NB_VS_INT&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;","targets":"$MDM_Server"}' $cp_api_url/run-script | ./jq&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;so you would need to supply correct CMA IP (where actual VS will belong) instead of &lt;STRONG&gt;localhost&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Plus I'm not entirely sure why do you have to variables passed two main_ip? it should be jus a single IP of that VS.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 08:02:45 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77411#M4536</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2020-03-06T08:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77445#M4537</link>
      <description>Normally when you run the provisioning tool you FIRST run the mdsenv 'domain' to make sure the right domain is set.&lt;BR /&gt;Then on the management server you execute a command like this:&lt;BR /&gt;vsx_provisioning_tool -s localhost -u admin -p  add vd name VS-01 vsx VSX_cluster_1 type vs main_ip 100.100.100.100&lt;BR /&gt;This will then create the VS in Management and on the VSX cluster. The interaction between API and the tool is the part that I have no clue about, but it could be that the target in this case would be the DMS.</description>
      <pubDate>Fri, 06 Mar 2020 12:57:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77445#M4537</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2020-03-06T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77451#M4538</link>
      <description>you can avoid mdsenv step if you specify -s option and then CMA IP address &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;so it's hard to say how it would interact with API run script. I would try running with -s plus IP addr as it's more explicit</description>
      <pubDate>Fri, 06 Mar 2020 13:01:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77451#M4538</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2020-03-06T13:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77478#M4542</link>
      <description>Hm, yeah, I clearly got that wrong.&lt;BR /&gt;The run-script API can only target physical devices (MDS server, gateways), not a CMA or VS.&lt;BR /&gt;Your run-script command will therefore have to account for this (e.g. switch to appropriate domain context, then run vsx_provisioning_tool).</description>
      <pubDate>Fri, 06 Mar 2020 15:57:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/77478#M4542</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2020-03-06T15:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/78006#M4568</link>
      <description>&lt;P&gt;Thanks, I have corrected the localhost parameter. Makes sense too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the two main ip variables, there are only one. They are seperated by a komma. $NB_VM_PRI_IP is the primary ip fetched from Netbox IPAM in an earlier step and $NB_VS_INT is the generated string for adding interfaces to the vs, fetched from Netbox IPAM. I had to make sure that I could deploy a random amount of interfaces, based on how many was documented in our IPAM.&lt;/P&gt;&lt;P&gt;The idea is to document first, then deploy in production based on what is documented in our IPAM. That could be 1 nic or 8.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 18:29:35 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/78006#M4568</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-03-11T18:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/78728#M4606</link>
      <description>&lt;P&gt;I have now tried a few things to try and deploy a new domain, none of which have worked.&lt;/P&gt;&lt;P&gt;cp_api_url="&lt;A href="https://fwmgmt.mydomain.net/web_api" target="_blank"&gt;https://fwmgmt.mydomain.net/web_api&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;SID=`curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -X POST "$cp_api_url/login" -d "{\"user\":\"cp_username\",\"password\":\"$password\"}" -s | awk -F\" '/sid/ {print $4}'`&lt;/P&gt;&lt;P&gt;Above works just fine, below is fubar:&lt;/P&gt;&lt;P&gt;First attempt is by the book, according to API reference guide (&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#web/add-domain~v1.5%20" target="_self"&gt;API Reference link&lt;/A&gt;) :&lt;/P&gt;&lt;P&gt;curl -s -k -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -X POST -d '{ "name" : "Domain01", "servers" : { "ip-address" : "172.20.20.1", "name" : "Domain01-mgmt", "multi-domain-server" : "cpMGT01", "comments" : "Domain-test" }}' $cp_api_url/add-domain&lt;/P&gt;&lt;P&gt;Second attempt is from suggestions in this thread:&lt;BR /&gt;curl -s -k -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -X POST -d '{ "name" : "Domain01", "servers.ip-address" : "172.20.20.1", "servers.name" : "Domain01-mgmt", "servers.multi-domain-server" : "cpMGT01", "servers.comments" : "Domain-test" }' $cp_api_url/add-domain&lt;/P&gt;&lt;P&gt;The error code I get is "generic_err_invalid_parameter" and it is frustrating as h...!&lt;/P&gt;&lt;P&gt;I am beginning to think something is completely wrong in the documentation!&lt;/P&gt;&lt;P&gt;Can someone shed any light on this?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 19:11:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/78728#M4606</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-03-18T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/80726#M4673</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;After a while of testing I am not any further with this vsx_provisioning_tool via web api at all. It's fighting me all the way!&lt;/FONT&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;After logging into domain I tryed running this command:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;$SID is login id.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -H "X-chkp-sid: $SID" -X POST -d '{"script-name":"VSX Provisioning","script":"vsx_provisioning_tool -s 10.64.54.250 -u testuser -p testpass -o add vd name vs-Test vsx VSX_Cluster_2 type vs main_ip 7.7.7.1, add interface name bond1.3333 ip 7.7.7.1/29, add interface name bond1.3334 ip 192.168.100.1/24","targets":"MDM-server"}' $cp_api_url/run-script | jq&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif" size="4"&gt;I get this error:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;{&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; "code": "generic_err_object_not_found",&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; "message": "Requested object [MDM-server] not found"&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;}&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I have tried the following as value for MDM-server:&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;MDM-server name (which I successfully deployed a domain to)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;hostname&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;DNS-name&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;cluster-name&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;firewall-node A&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;firewall-node B&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Nothing works. &lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;API defines target as: &lt;SPAN class="description to_check_for_rewrite"&gt;On what targets to execute this command. Targets may be identified by their name, or object unique identifier.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;What does that mean?!? Can someone tell me what name I am looking for?&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Apr 2020 09:05:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/80726#M4673</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-04-03T09:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/80728#M4674</link>
      <description>&lt;P&gt;I finally got the domain-deployment working:&lt;/P&gt;&lt;P&gt;The test-script is like this:&lt;/P&gt;&lt;P&gt;cp_user=$1&lt;BR /&gt;password=$2&lt;BR /&gt;CP_Domain=TestDomain&lt;BR /&gt;CMA_IP=10.64.54.250&lt;BR /&gt;CMA=Test-mgmt&lt;BR /&gt;MDM_Server=CPMGT01&lt;BR /&gt;cp_api_url="https://fwmgmt/web_api"&lt;BR /&gt;cp_vs_name=vs-Test&lt;BR /&gt;VSX_Cluster=VSX_Cluster_1&lt;BR /&gt;NB_VM_PRI_IP=7.7.7.1&lt;BR /&gt;NB_VS_INT="add interface name bond1.3333 ip 7.7.7.1/29, add interface name bond1.3334 ip 192.168.100.1/24"&lt;/P&gt;&lt;P&gt;# check if an array contains a specific value&lt;BR /&gt;containsElement () {&lt;BR /&gt;local array="${@:2}"&lt;BR /&gt;for((i=0;i&amp;lt;${#array[@]};i++))&lt;BR /&gt;do&lt;BR /&gt;if [ "${array[$i]}" == "$1" ]; then&lt;BR /&gt;return 0&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;return 1&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;# check the status of a task. is it "in progress"? if 'yes' return 0, else return '1'&lt;BR /&gt;is_status_in_progress() {&lt;BR /&gt;# call the 'show-task' API, save result to a JSON file.&lt;BR /&gt;curl -s -k -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -X POST -d '{ "task-id" : "'$CP_TASKID'" }' $cp_api_url/show-task | jq &amp;gt; show_task_result.json&lt;BR /&gt;# use JQ to get the status. $STATUS is an array becuase there could be 'child' tasks.&lt;BR /&gt;STATUS=$(jq -r '.tasks[].status' show_task_result.json)&lt;BR /&gt;PERCENTAGE=$(jq -r '.tasks[]."progress-percentage"' show_task_result.json)&lt;BR /&gt;# go over the array look for 'in progress'&lt;BR /&gt;containsElement "in progress" ${STATUS[@]}&lt;BR /&gt;IS_IN_PROGRESS=$?&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;# as long as the task is in progress, wait 3 seconds and check again.&lt;BR /&gt;wait_for_task() {&lt;BR /&gt;is_status_in_progress&lt;BR /&gt;while [ $IS_IN_PROGRESS == "0" ]&lt;BR /&gt;do&lt;BR /&gt;echo "in progress. $PERCENTAGE Percent completed"&lt;BR /&gt;is_status_in_progress&lt;BR /&gt;sleep 3&lt;BR /&gt;done&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;SID=`curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -X POST "$cp_api_url/login" -d "{\"user\":\"$cp_user\",\"password\":\"$password\"}" -s | awk -F\" '/sid/ {print $4}'`&lt;/P&gt;&lt;P&gt;CP_TASKID=`curl -s -k -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -X POST -d '{"name":"'$CP_Domain'","servers":{"ip-address":"'$CMA_IP'","name":"'$CMA'","multi-domain-server":"'$MDM_Server'"}}' $cp_api_url/add-domain | jq | grep '"task-id"' | awk -F'["]' '{ print $4 }'`&lt;BR /&gt;#Wait for deployment is done&lt;BR /&gt;echo "Deploying new domain $CP_Domain"&lt;BR /&gt;wait_for_task&lt;BR /&gt;#Add domain to trusted-client&lt;BR /&gt;echo "Deployment status for domain $CP_Domain: ${STATUS[@]}"&lt;BR /&gt;#reset task-id variable&lt;BR /&gt;CP_TASKID=&lt;BR /&gt;echo "Adding Domain to trusted-client AnyHost"&lt;BR /&gt;curl -s -k -H "Content-Type: application/json" -H "X-chkp-sid: $SID" -X POST -d '{"name":"AnyHost","domains-assignment":{"add":"'$CP_Domain'"}}' $cp_api_url/set-trusted-client # send to log&lt;BR /&gt;#publish Trusted client addition&lt;BR /&gt;CP_TASKID=`curl -s -k -H "Content-Type: application/json" -H "Accept: bla" -H "X-chkp-sid: $SID" -X POST -d '{}' $cp_api_url/publish | jq | grep '"task-id"' | awk -F'["]' '{ print $4 }'`&lt;BR /&gt;echo "Publishing new trusted client config"&lt;BR /&gt;wait_for_task&lt;BR /&gt;echo "Publishing status for trusted client AnyHost for $CP_Domain: ${STATUS[@]}"&lt;/P&gt;&lt;P&gt;&amp;lt;here would go further deployment scripting, like VSX deployment&amp;gt;&lt;/P&gt;&lt;P&gt;echo "logging out"&lt;BR /&gt;#curl -k -H "Content-Type: application/json" -H "Accept: bla" -H "X-chkp-sid: $SID" -X POST -d '{}' $cp_api_url/logout&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;rm ./show_task_result.json&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully someone else can make use of this somewhere.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 09:10:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/80728#M4674</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-04-03T09:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/80730#M4675</link>
      <description>&lt;P&gt;Breaktrough!!&lt;/P&gt;&lt;P&gt;I needed to set target to the CMA that is created during the domain deployment in /add-domain. That made it work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2020 10:11:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/80730#M4675</guid>
      <dc:creator>ias_gc-dk</dc:creator>
      <dc:date>2020-04-03T10:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Deploying Domain on VSX</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/98196#M5207</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to use the vsx_provisioning tool for the first time.&amp;nbsp; I've created a script which contains the following:&lt;/P&gt;&lt;P&gt;add vd name TestVS vsx VSXCL type vs instances 4 instance6 0 main_ip 1.1.1.1 calc_topo_auto false, which running this I get&lt;/P&gt;&lt;P&gt;Failed to get object &amp;lt;One of the VSX cluster nodes&amp;gt; (table=network_object,uid=)&lt;/P&gt;&lt;P&gt;Failed to execute line number 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how to troubleshoot this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 08:38:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/Deploying-Domain-on-VSX/m-p/98196#M5207</guid>
      <dc:creator>genisis__</dc:creator>
      <dc:date>2020-10-05T08:38:30Z</dc:date>
    </item>
  </channel>
</rss>

