华为乾坤-修改RADIUS模板:响应示例

时间:2025-05-12 15:31:55

响应示例

返回状态码为200:成功修改RADIUS服务器模板信息。

HTTP/1.1 200 OK
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
	"errcode" : "0",
	"errmsg" : "",
	"data" : {
		"name" : "radius1",
		"description" : "radius1",
		"multipleBackupServerConfig" : true,
		"radiusServerType" : "thirdPartyServer",
		"iaeDtoList" : [
			{
				"iaeId" : "ce67b74c-01ac-4e2a-81af-0908d98ea242",
				"iaeName" : "iae12",
				"iaeIp" : "192.168.1.1",
				"iaeAd" : "example.com",
				"iaeIpv6" : "FC00::0",
				"weight" : 80,
				"slaveIaeId" : "ce67b74c-01ac-4e2a-81af-0908d98ea242",
				"slaveIaeName" : "iae12",
				"slaveIaeIp" : "192.168.1.1",
				"slaveIaeAd" : "example.com",
				"slaveIaeIpv6" : "FC00::0"
			}
		],
		"authServerList" : [
			{
				"serverAddressType" : "ip",
				"serverAddress" : "192.168.1.1",
				"port" : 10,
				"weight" : 80
			}
		],
		"accountServerList" : [
			{
				"serverAddressType" : "ip",
				"serverAddress" : "192.168.1.1",
				"port" : 10,
				"weight" : 80
			}
		],
		"masterAuthServer" : {
			"serverAddressType" : "ip",
			"serverAddress" : "192.168.1.1",
			"port" : 10
		},
		"slaveAuthServer" : {
			"serverAddressType" : "ip",
			"serverAddress" : "192.168.1.2",
			"port" : 10
		},
		"masterAccountServer" : {
			"serverAddressType" : "ip",
			"serverAddress" : "192.168.1.1",
			"port" : 10
		},
		"slaveAccountServer" : {
			"serverAddressType" : "ip",
			"serverAddress" : "192.168.1.2",
			"port" : 10
		},
		"realtimeAccounting" : {
			"realtimeEnable" : true,
			"realtimeInterval" : 10
		},
		"serverSelectionPolicy" : "master-backup",
		"serverSelectionAlgorithm" : "packets",
		"dpskConfig" : {
			"supportDpsk" : true,
			"dpskEncryptionMode" : "aes256gcm"
		},
		"prohibitAttribute" : {
			"enable" : true,
			"attributes" : [
				{
					"attributeName" : "HW-Input-Peak-Information-Rate",
					"prohibitReceive" : true,
					"prohibitSend" : true
				}
			]
		},
		"radiusAttributeConfig" : {
			"enable" : true,
			"attributes" : [
				{
					"attributeName" : "Service-Type",
					"attributeValue" : "241",
					"optionValue" : "auth-type-mac",
					"macValue" : "10",
					"dot1xValue" : "2",
					"portalValue" : "4"
				}
			]
		},
		"calledStationId" : {
			"enable" : true,
			"attributeValue" : "ap-mac",
			"includeSsid" : true,
			"delimiter" : "+"
		},
		"macFormatSetting" : {
			"macFormat" : true,
			"letter" : "uppercase",
			"connector" : "hyphen-split",
			"mode" : "XX"
		},
		"enableAutomaticServerStatusDetection" : true,
		"automaticServerStatusDetection" : {
			"name" : "test",
			"password" : "null",
			"upServerInterval" : ""
		},
		"enableAuthRequestRetransmitConfig" : true,
		"authRequestRetransmitConfig" : {
			"timeoutRetransmissionTimes" : 3,
			"timeoutInterval" : 5,
			"serverDownDuration" : 5
		},
		"sourceIpEnable" : true,
		"nassPortIdFormat" : "new",
		"translateExtendList" : [
			{
				"accessAccept" : true,
				"accountResponse" : false,
				"srcVendorId" : 9,
				"srcSubId" : 2,
				"destAttributeName" : "HW-Input-Committed-Burst-Size"
			}
		],
		"startAccountingFail" : true,
		"configName" : "abc",
		"id" : "fbb684c8-0d37-496f-bafa-4b06db151e2e"
	}
}

返回状态码为400:校验异常。

HTTP/1.1 400 Bad Request
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

返回状态码为500:内部服务错误。

HTTP/1.1 500 Internal Server Error
Date: Sun,11 May 2025 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
support.huaweicloud.com/qiankuncmn-qiankuncs/toctopics/zh-cn_topic_0000001852680846.html