<?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: VendorConfigXml in Service Profile in Management</title>
    <link>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994190#M4171</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/319015"&gt;@Elliot Dierksen&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Thank you for your reply.&lt;/P&gt;
&lt;P&gt;With your tips to parse XML elements in Service Profile, I successfully make modifications on service profile using the following Python code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;print("*** Update service profiles ***")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SpVendorXml001 = '&amp;lt;items&amp;gt;&amp;lt;VoicemailServiceCredentialsSource&amp;gt;2&amp;lt;/VoicemailServiceCredentialsSource&amp;gt;&amp;lt;/items&amp;gt;'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SpVendorXml002 = '&amp;lt;items&amp;gt;&amp;lt;UseUDS&amp;gt;true&amp;lt;/UseUDS&amp;gt;&amp;lt;UseUserCredential&amp;gt;false&amp;lt;/UseUserCredential&amp;gt;&amp;lt;RecursiveSearch1&amp;gt;true&amp;lt;/RecursiveSearch1&amp;gt;&amp;lt;SearchTimeout&amp;gt;5&amp;lt;/SearchTimeout&amp;gt;&amp;lt;AllowJabberUserstoSearchandAddSecurityGroups&amp;gt;false&amp;lt;/AllowJabberUserstoSearchandAddSecurityGroups&amp;gt;&amp;lt;/items&amp;gt;'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spXmlOptions001 = ET.fromstring(SpVendorXml001)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spXmlOptions002 = ET.fromstring(SpVendorXml002)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray001 = []&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray002 = []&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;for i in spXmlOptions001:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray001.append(i)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ucm.update_service_profile(name='SP_Collab1k_All', serviceProfileInfos={ 'serviceProfileInfo': [ { 'profileName': 'Voicemail Profile', 'serviceProfileXml': { '_value_1': spVendorXmlArray001 }}]})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;time.sleep(timer01)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;for j in spXmlOptions002:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray002.append(j)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ucm.update_service_profile(name='SP_Collab1k_All', serviceProfileInfos={ 'serviceProfileInfo': [ { 'profileName': 'Directory Profile', 'serviceProfileXml': { '_value_1': spVendorXmlArray002 }}]})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;time.sleep(timer02)&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jan 2024 08:47:10 GMT</pubDate>
    <dc:creator>mikael.andre</dc:creator>
    <dc:date>2024-01-11T08:47:10Z</dc:date>
    <item>
      <title>VendorConfigXml in Service Profile</title>
      <link>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4993367#M4168</link>
      <description>&lt;P&gt;Hi dev team,&lt;/P&gt;
&lt;P&gt;On CUCM running on version 14.0.1.13900-155, I would like, via API, to modify the "Credentials source for voicemail service" parameter in the Service Profile from "not set" to "Unified CM - IM and Presense".&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ServiceProfile_CredentialSource.png" style="width: 601px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/206900i844CAF1F18436761/image-size/large?v=v2&amp;amp;px=999" role="button" title="ServiceProfile_CredentialSource.png" alt="ServiceProfile_CredentialSource.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;According to the AXL documentation &lt;A href="https://pubhub.devnetcloud.com/media/axl-schema-reference/docs/Files/AXLSoap_addServiceProfile.html#Link2EA" target="_self"&gt;AxlSoap_addServiceProfile&lt;/A&gt;&amp;nbsp;, this is done at the serviceProfileXml parameter level.&lt;/P&gt;
&lt;P&gt;When I do a “get” on an existing service profile, there are parameters but they are encoded.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ServiceProfile_VendorConfigXml.png" style="width: 881px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/206899iE411552B3F20D6F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="ServiceProfile_VendorConfigXml.png" alt="ServiceProfile_VendorConfigXml.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Is there any documentation regarding possible values?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 08:23:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4993367#M4168</guid>
      <dc:creator>mikael.andre</dc:creator>
      <dc:date>2024-01-10T08:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: VendorConfigXml in Service Profile</title>
      <link>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994135#M4170</link>
      <description>&lt;P&gt;That means _value_1 is an array. I might not be using the exact correct python data type description, but that is why it dumps the data that way. Here is a similar thing I did to parse the vendor XML for a phone. I think this depends on the lxml library which I import.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;from lxml import etree

                loc = 0
                for elem in vendorxml:
                        if elem.tag == 'spanToPCPort':
                                if Debug:
                                        print('Found spanToPCPort',elem.text,'at loc',loc)
                                vendorxml[loc].text = '1'
                                break
                        loc += 1
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 07:11:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994135#M4170</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2024-01-11T07:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: VendorConfigXml in Service Profile</title>
      <link>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994190#M4171</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/319015"&gt;@Elliot Dierksen&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;Thank you for your reply.&lt;/P&gt;
&lt;P&gt;With your tips to parse XML elements in Service Profile, I successfully make modifications on service profile using the following Python code:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;print("*** Update service profiles ***")&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SpVendorXml001 = '&amp;lt;items&amp;gt;&amp;lt;VoicemailServiceCredentialsSource&amp;gt;2&amp;lt;/VoicemailServiceCredentialsSource&amp;gt;&amp;lt;/items&amp;gt;'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;SpVendorXml002 = '&amp;lt;items&amp;gt;&amp;lt;UseUDS&amp;gt;true&amp;lt;/UseUDS&amp;gt;&amp;lt;UseUserCredential&amp;gt;false&amp;lt;/UseUserCredential&amp;gt;&amp;lt;RecursiveSearch1&amp;gt;true&amp;lt;/RecursiveSearch1&amp;gt;&amp;lt;SearchTimeout&amp;gt;5&amp;lt;/SearchTimeout&amp;gt;&amp;lt;AllowJabberUserstoSearchandAddSecurityGroups&amp;gt;false&amp;lt;/AllowJabberUserstoSearchandAddSecurityGroups&amp;gt;&amp;lt;/items&amp;gt;'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spXmlOptions001 = ET.fromstring(SpVendorXml001)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spXmlOptions002 = ET.fromstring(SpVendorXml002)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray001 = []&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray002 = []&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;for i in spXmlOptions001:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray001.append(i)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ucm.update_service_profile(name='SP_Collab1k_All', serviceProfileInfos={ 'serviceProfileInfo': [ { 'profileName': 'Voicemail Profile', 'serviceProfileXml': { '_value_1': spVendorXmlArray001 }}]})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;time.sleep(timer01)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;for j in spXmlOptions002:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;spVendorXmlArray002.append(j)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ucm.update_service_profile(name='SP_Collab1k_All', serviceProfileInfos={ 'serviceProfileInfo': [ { 'profileName': 'Directory Profile', 'serviceProfileXml': { '_value_1': spVendorXmlArray002 }}]})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;time.sleep(timer02)&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 08:47:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994190#M4171</guid>
      <dc:creator>mikael.andre</dc:creator>
      <dc:date>2024-01-11T08:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: VendorConfigXml in Service Profile</title>
      <link>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994326#M4173</link>
      <description>&lt;P&gt;Glad to hear you got it working. I would encourage you to look more at the etree (ET as you have it imported) libraries. You can use it to build items and then put the XML tree together. It is (IMHO) much easier and less error prone than trying to build the XML from text manually.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 13:21:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/vendorconfigxml-in-service-profile/m-p/4994326#M4173</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2024-01-11T13:21:03Z</dc:date>
    </item>
  </channel>
</rss>

