<?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: mgmt_cli csv multiple service ports addition in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-csv-multiple-service-ports-addition/m-p/172178#M7503</link>
    <description>&lt;P&gt;Effectively, you’re specifying name/value pairs in the CSV file.&lt;BR /&gt;The header row contains the name, the other rows contain the values.&lt;BR /&gt;Unfortunately, there is no way to specify multiple values other than the method you describe (e.g. service.1, service.2) and is consistent with how you’d construct the mgmt_cli call without a CSV file.&lt;BR /&gt;Bottom line: this is expected behavior.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 14:51:02 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2023-02-21T14:51:02Z</dc:date>
    <item>
      <title>mgmt_cli csv multiple service ports addition</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-csv-multiple-service-ports-addition/m-p/172040#M7501</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to create access rules using CSV (bulk method). As you all may know, there can be multiple sources, destinations or services in the rule however, the service parameter in CSV only allows one value a time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried all combinations to have mgmt_cli parse the CSV column values as list but it doesn't seem to be working. The only way I get it working is by defining multiple columns, like:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;layer,source,destination,&lt;U&gt;&lt;STRONG&gt;service.1,service.2,service.3,service.4,service.5,&lt;/STRONG&gt;&lt;/U&gt;action,name,position,track&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Network,dummy-src-1,dummy-dest-1,http,https,ssh,http_proxy,,accept,this-is-a-dummy-rule,2,log&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;As it can be seen, I had to leave service.5 field Null like ,, for the call to be successful. It is though not very scalable and there are times when it will be required to add maybe 10 services. Yes, a Group can be an option but let's keep at as a last resort.&lt;/P&gt;&lt;P&gt;I have tried:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;layer,source,destination,&lt;U&gt;&lt;STRONG&gt;service,&lt;/STRONG&gt;&lt;/U&gt;action,name,position,track&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Network,dummy-src-1,dummy-dest-1,[http,https,ssh,http_proxy],accept,this-is-a-dummy-rule,2,log&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Line 2: code: "generic_err_object_not_found"&lt;BR /&gt;message: "Requested object [HTTPS, HTTP] not found"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;layer,source,destination,&lt;U&gt;&lt;STRONG&gt;service,&lt;/STRONG&gt;&lt;/U&gt;action,name,position,track&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Network,dummy-src-1,dummy-dest-1,["http","https","ssh","http_proxy"],accept,this-is-a-dummy-rule,2,log&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Error occured during parsing of CSV file.&lt;BR /&gt;Line 2 column 6: Unexpected character in csv file. Double-quotes are expected to come in pairs.&lt;BR /&gt;Failed to read parameters file [add_rules.csv]: Invalid format&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;And multiple other combinations that will make this post very long without any luck.&lt;/P&gt;&lt;P&gt;This is a very practical example so does anyone know how to get that working in a&amp;nbsp;&lt;STRONG&gt;scalable&amp;nbsp;&lt;/STRONG&gt;fashion?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 11:12:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-csv-multiple-service-ports-addition/m-p/172040#M7501</guid>
      <dc:creator>MubashirKhan</dc:creator>
      <dc:date>2023-02-20T11:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: mgmt_cli csv multiple service ports addition</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-csv-multiple-service-ports-addition/m-p/172178#M7503</link>
      <description>&lt;P&gt;Effectively, you’re specifying name/value pairs in the CSV file.&lt;BR /&gt;The header row contains the name, the other rows contain the values.&lt;BR /&gt;Unfortunately, there is no way to specify multiple values other than the method you describe (e.g. service.1, service.2) and is consistent with how you’d construct the mgmt_cli call without a CSV file.&lt;BR /&gt;Bottom line: this is expected behavior.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:51:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/mgmt-cli-csv-multiple-service-ports-addition/m-p/172178#M7503</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-02-21T14:51:02Z</dc:date>
    </item>
  </channel>
</rss>

