<?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 After creating a custom setup.xml for an app I'm developing, why do I not see my custom XML? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/After-creating-a-custom-setup-xml-for-an-app-I-m-developing-why/m-p/230047#M2952</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'm trying to create a custom setup.xml for the app which I'm developing. After writing the setup.xml, restmap.xml, myconfig_parser.py file, I'm not able to see my custom xml as part of "&lt;A href="https://XX.XX.XX.XX:8089/services" target="_blank"&gt;https://XX.XX.XX.XX:8089/services&lt;/A&gt;" itself.&lt;/P&gt;

&lt;P&gt;Can someone please check and verify if I have provided all the right inputs and tell me if there is anything wrong in the code?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;API.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setupentity]
server = 1.2.3.4
ise_username = admin
ise_password = password
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;restmap.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[admin:myendpoint]
match=/myisecustom
members=isecustomendpoint

[admin_external:isecustomendpoint]
handlertype = python
handlerfile = ise_python_handler.py
handleractions = list, edit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;setup,xml&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
  &amp;lt;block title="ISE Active Session Setup"  endpoint="myisecustom/isecustomendpoint" entity="setupentity"&amp;gt;
      &amp;lt;input field="server"&amp;gt;
             &amp;lt;label&amp;gt;IP Address &amp;lt;/label&amp;gt;
             &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
      &amp;lt;/input&amp;gt;
         &amp;lt;input field="ise_username"&amp;gt;
             &amp;lt;label&amp;gt;UserName&amp;lt;/label&amp;gt;
             &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
      &amp;lt;/input&amp;gt;
     &amp;lt;input field="ise_password"&amp;gt;
             &amp;lt;label&amp;gt;Password&amp;lt;/label&amp;gt;
             &amp;lt;type&amp;gt;password&amp;lt;/type&amp;gt;
      &amp;lt;/input&amp;gt;
 &amp;lt;/block&amp;gt;
&amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;ise_python_handler.py&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;import splunk.admin as admin
import splunk.entity as entity
import os

class Config(admin.MConfigHandler):

  def setup(self):
    if self.requestedAction == admin.ACTION_EDIT:
      for arg in ['server', 'ise_username', 'ise_password']:
        self.supportedArgs.addOptArg(arg)

  def handleList(self, confInfo):
    confDict = self.readConf('ISE')

    #if None != confDict:
    #  for stanza, settings in confDict.items():
    #    for key, val in settings.items():
    #      confInfo[stanza].append(key, val)
    #   confInfo[stanza].append('changed', '1')

  def handleEdit(self, confInfo):
    name = self.callerArgs.id
    args = self.callerArgs

    if self.callerArgs.data['server'][0] in [None, '']:
      self.callerArgs.data['server'][0] = ''

    if self.callerArgs.data['ise_username'][0] in [None, '']:
      self.callerArgs.data['ise_username'][0] = ''

    if self.callerArgs.data['ise_password'][0] in [None, '']:
      self.callerArgs.data['ise_password'][0] = ''

    self.writeConf('ISE' , 'setupentity', self.callerArgs.data)


# initialize the handler
admin.init(Config, admin.CONTEXT_NONE)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 10:03:12 GMT</pubDate>
    <dc:creator>ppurokit</dc:creator>
    <dc:date>2020-09-29T10:03:12Z</dc:date>
    <item>
      <title>After creating a custom setup.xml for an app I'm developing, why do I not see my custom XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/After-creating-a-custom-setup-xml-for-an-app-I-m-developing-why/m-p/230047#M2952</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'm trying to create a custom setup.xml for the app which I'm developing. After writing the setup.xml, restmap.xml, myconfig_parser.py file, I'm not able to see my custom xml as part of "&lt;A href="https://XX.XX.XX.XX:8089/services" target="_blank"&gt;https://XX.XX.XX.XX:8089/services&lt;/A&gt;" itself.&lt;/P&gt;

&lt;P&gt;Can someone please check and verify if I have provided all the right inputs and tell me if there is anything wrong in the code?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;API.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setupentity]
server = 1.2.3.4
ise_username = admin
ise_password = password
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;restmap.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[admin:myendpoint]
match=/myisecustom
members=isecustomendpoint

[admin_external:isecustomendpoint]
handlertype = python
handlerfile = ise_python_handler.py
handleractions = list, edit
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;setup,xml&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;setup&amp;gt;
  &amp;lt;block title="ISE Active Session Setup"  endpoint="myisecustom/isecustomendpoint" entity="setupentity"&amp;gt;
      &amp;lt;input field="server"&amp;gt;
             &amp;lt;label&amp;gt;IP Address &amp;lt;/label&amp;gt;
             &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
      &amp;lt;/input&amp;gt;
         &amp;lt;input field="ise_username"&amp;gt;
             &amp;lt;label&amp;gt;UserName&amp;lt;/label&amp;gt;
             &amp;lt;type&amp;gt;text&amp;lt;/type&amp;gt;
      &amp;lt;/input&amp;gt;
     &amp;lt;input field="ise_password"&amp;gt;
             &amp;lt;label&amp;gt;Password&amp;lt;/label&amp;gt;
             &amp;lt;type&amp;gt;password&amp;lt;/type&amp;gt;
      &amp;lt;/input&amp;gt;
 &amp;lt;/block&amp;gt;
&amp;lt;/setup&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;ise_python_handler.py&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;import splunk.admin as admin
import splunk.entity as entity
import os

class Config(admin.MConfigHandler):

  def setup(self):
    if self.requestedAction == admin.ACTION_EDIT:
      for arg in ['server', 'ise_username', 'ise_password']:
        self.supportedArgs.addOptArg(arg)

  def handleList(self, confInfo):
    confDict = self.readConf('ISE')

    #if None != confDict:
    #  for stanza, settings in confDict.items():
    #    for key, val in settings.items():
    #      confInfo[stanza].append(key, val)
    #   confInfo[stanza].append('changed', '1')

  def handleEdit(self, confInfo):
    name = self.callerArgs.id
    args = self.callerArgs

    if self.callerArgs.data['server'][0] in [None, '']:
      self.callerArgs.data['server'][0] = ''

    if self.callerArgs.data['ise_username'][0] in [None, '']:
      self.callerArgs.data['ise_username'][0] = ''

    if self.callerArgs.data['ise_password'][0] in [None, '']:
      self.callerArgs.data['ise_password'][0] = ''

    self.writeConf('ISE' , 'setupentity', self.callerArgs.data)


# initialize the handler
admin.init(Config, admin.CONTEXT_NONE)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/After-creating-a-custom-setup-xml-for-an-app-I-m-developing-why/m-p/230047#M2952</guid>
      <dc:creator>ppurokit</dc:creator>
      <dc:date>2020-09-29T10:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: After creating a custom setup.xml for an app I'm developing, why do I not see my custom XML?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/After-creating-a-custom-setup-xml-for-an-app-I-m-developing-why/m-p/230048#M2953</link>
      <description>&lt;P&gt;Did you put this in default? I had no luck in local.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 22:03:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/After-creating-a-custom-setup-xml-for-an-app-I-m-developing-why/m-p/230048#M2953</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2018-04-19T22:03:55Z</dc:date>
    </item>
  </channel>
</rss>

