show callhome
show callhome
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome",
"msg": "Success",
"code": "200",
"body": {
"output_state": "callhome disabled\n",
"info": "Callhome Information:\n",
"per_name": "contact person name(sysContact):",
"name": "who@where\n",
"email_info": "contact person's email:",
"email_conf": "sl-sch-test@cisco.com\n",
"ph_info": "contact person's phone number:",
"str_addr": "street addr:",
"site_id": "site id:",
"cust_id": "customer id:",
"contr_id": "contract id:",
"swi_pri": "switch priority:",
"swi_pri_value": "7\n",
"dup_mess": "duplicate message throttling : enabled\n",
"per_inv": "periodic inventory : enabled\n",
"per_time": "periodic inventory time-period : 1 day\n",
"per_timeofday": "periodic inventory timeofday : 07:10 (HH:MM)\n",
"dist": "Distribution : Disabled\n"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show callhome destination-profile
show callhome destination-profile
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome destination-profile",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome destination-profile ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_call_info": {
"ROW_call_info": [
{
"dest_full_info": "\nfull_txt destination profile information\n",
"max_mess_size": "maximum message size:2500000\n",
"mess_format": "message format:full-txt\n",
"mess_level": "message-level:0\n",
"trans_method": "transport-method:email\n",
"email_info": "email addresses configured:\n",
"url_info": "url addresses configured:\n",
"alert_groups": "alert groups configured:\n",
"alert_conf": "all\n"
},
{
"dest_short_info": "short_txt destination profile information\n",
"max_mess_size": "maximum message size:4000\n",
"mess_format": "message format:short-txt\n",
"mess_level": "message-level:0\n",
"trans_method": "transport-method:email\n",
"email_info": "email addresses configured:\n",
"url_info": "url addresses configured:\n",
"alert_groups": "alert groups configured:\n",
"alert_conf": "all\n"
},
{
"dest_xml_info": "CiscoTAC-1 destination profile information\n",
"max_mess_size": "maximum message size:2500000\n",
"mess_format": "message format:XML\n",
"mess_level": "message-level:0\n",
"trans_method": "transport-method:email and http\n",
"email_info": "email addresses configured:\n",
"email_conf": "sl-sch-test@cisco.com\n",
"url_info": "url addresses configured:\n",
"url_conf": "http://tools-stage.cisco.com/its/service/oddce/services/DDCEService\n",
"alert_groups": "alert groups configured:\n",
"alert_conf": "cisco-tac\n"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome destination-profile command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show callhome destination-profile profile CiscoTAC-1
show callhome destination-profile profile CiscoTAC-1
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome destination-profile profile CiscoTAC-1",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome destination-profile profile CiscoTAC-1 ",
"msg": "Success",
"code": "200",
"body": {
"tac_xml_info": "CiscoTAC-1 destination profile information\n",
"max_mess_size": "maximum message size:2500000\n",
"mess_level": "message-level:0\n",
"trans_method": "transport-method:email and http\n",
"email_info": "email addresses configured:\n",
"email_conf": "sl-sch-test@cisco.com\n",
"url_info": "url addresses configured:\n",
"url_conf": "http://tools-stage.cisco.com/its/service/oddce/services/DDCEService\n",
"alert_groups": "alert groups configured:\n",
"alert_conf": "cisco-tac\n"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome destination-profile profile CiscoTAC-1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show callhome destination-profile profile full-txt-destination
show callhome destination-profile profile full-txt-destination
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome destination-profile profile full-txt-destination",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome destination-profile profile full-txt-destination",
"msg": "Success",
"code": "200",
"body": {
"full_txt_info": "full_txt destination profile information\n",
"max_mess_size": "maximum message size:2500000\n",
"mess_level": "message-level:0\n",
"trans_method": "transport-method:email\n",
"email_info": "email addresses configured:\n",
"url_info": "url addresses configured:\n",
"alert_groups": "alert groups configured:\n",
"alert_conf": "all\n"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome destination-profile profile full-txt-destination command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show callhome destination-profile profile short-txt-destination
show callhome destination-profile profile short-txt-destination
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome destination-profile profile short-txt-destination",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome destination-profile profile short-txt-destination",
"msg": "Success",
"code": "200",
"body": {
"shrt_txt_info": "short_txt destination profile information\n",
"max_mess_size": "maximum message size:4000\n",
"mess_level": "message-level:0\n",
"trans_method": "transport-method:email\n",
"email_info": "email addresses configured:\n",
"url_info": "url addresses configured:\n",
"alert_groups": "alert groups configured:\n",
"alert_conf": "all\n"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome destination-profile profile short-txt-destination command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show callhome transport
show callhome transport
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome transport",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome transport",
"msg": "Success",
"code": "200",
"body": {
"vrf": "http vrf:management\n",
"from_email": "from email addr:SLDUT@cisco.com\n",
"smtp_ser": "\nsmtp server:10.104.99.98\n",
"smtp_ser_port": "smtp server port:25\n",
"smtp_ser_vrf": "smtp server vrf:management\n",
"smtp_ser_prior": "smtp server priority:0\n",
"http_prox": "http proxy server:\n",
"http_port": "http proxy server port:\n",
"http_state": "http proxy status:Disabled\n"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome transport command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show callhome transport-email
show callhome transport-email
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show callhome transport-email",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show callhome transport-email",
"msg": "Success",
"code": "200",
"body": {
"from_email": "SLDUT@cisco.com",
"smtp_server": "10.104.99.98",
"smtp_server_port": ":25"
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show callhome transport-email command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|