Splunk Dev

After creating a custom setup.xml for an app I'm developing, why do I not see my custom XML?

ppurokit
Path Finder

Hi All,

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 "https://XX.XX.XX.XX:8089/services" itself.

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?

API.conf

[setupentity]
server = 1.2.3.4
ise_username = admin
ise_password = password

restmap.conf

[admin:myendpoint]
match=/myisecustom
members=isecustomendpoint

[admin_external:isecustomendpoint]
handlertype = python
handlerfile = ise_python_handler.py
handleractions = list, edit

setup,xml

<setup>
  <block title="ISE Active Session Setup"  endpoint="myisecustom/isecustomendpoint" entity="setupentity">
      <input field="server">
             <label>IP Address </label>
             <type>text</type>
      </input>
         <input field="ise_username">
             <label>UserName</label>
             <type>text</type>
      </input>
     <input field="ise_password">
             <label>Password</label>
             <type>password</type>
      </input>
 </block>
</setup>

ise_python_handler.py

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)
0 Karma

fk319
Builder

Did you put this in default? I had no luck in local.

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...