@@ -1255,6 +1255,123 @@ paths:
1255
1255
schema :
1256
1256
$ref : ' #/definitions/Error'
1257
1257
# ----------------------------------------------
1258
+ # Loopback interface object
1259
+ # ----------------------------------------------
1260
+ ' /config/interface/loopback/{id} ' :
1261
+ put :
1262
+ summary : Create/update loopback interface.
1263
+ description : If the interface is already exists, update the attr
1264
+ parameters :
1265
+ - name : id
1266
+ in : path
1267
+ required : true
1268
+ type : integer
1269
+ description : loopback interface number
1270
+ - in : body
1271
+ name : attr
1272
+ required : true
1273
+ description : attributes loopback interface
1274
+ schema :
1275
+ $ref : ' #/definitions/LoopbackEntry'
1276
+ responses :
1277
+ ' 204 ' :
1278
+ description : OK
1279
+ ' 400 ' :
1280
+ description : Malformed arguments for API call
1281
+ schema :
1282
+ $ref : ' #/definitions/Error'
1283
+ ' 401 ' :
1284
+ description : Invalid authentication credentials
1285
+ schema :
1286
+ $ref : ' #/definitions/Error'
1287
+ ' 403 ' :
1288
+ description : Capacity insufficient
1289
+ schema :
1290
+ $ref : ' #/definitions/Error'
1291
+ ' 500 ' :
1292
+ description : Internal service error
1293
+ schema :
1294
+ $ref : ' #/definitions/Error'
1295
+ ' 503 ' :
1296
+ description : Maintanence mode
1297
+ schema :
1298
+ $ref : ' #/definitions/Error'
1299
+ delete :
1300
+ summary : Remove loopback interface
1301
+ description : If the loopback interface doesn't exist, return '404'
1302
+ parameters :
1303
+ - in : path
1304
+ name : id
1305
+ type : integer
1306
+ required : true
1307
+ description : loopback interface number
1308
+ responses :
1309
+ ' 204 ' :
1310
+ description : OK
1311
+ ' 400 ' :
1312
+ description : Malformed arguments for API call
1313
+ schema :
1314
+ $ref : ' #/definitions/Error'
1315
+ ' 401 ' :
1316
+ description : Invalid authentication credentials
1317
+ schema :
1318
+ $ref : ' #/definitions/Error'
1319
+ ' 404 ' :
1320
+ description : Object not found
1321
+ schema :
1322
+ $ref : ' #/definitions/Error'
1323
+ ' 500 ' :
1324
+ description : Internal service error
1325
+ schema :
1326
+ $ref : ' #/definitions/Error'
1327
+ ' 503 ' :
1328
+ description : Maintanence mode
1329
+ schema :
1330
+ $ref : ' #/definitions/Error'
1331
+ get :
1332
+ summary : Get loopback interface information
1333
+ description : If the loopback interface doesn't exist, return '404'
1334
+ parameters :
1335
+ - name : id
1336
+ in : path
1337
+ required : true
1338
+ type : integer
1339
+ description : loopback interface number
1340
+ responses :
1341
+ ' 200 ' :
1342
+ description : OK
1343
+ schema :
1344
+ type : object
1345
+ required :
1346
+ - id
1347
+ - attr
1348
+ properties :
1349
+ id :
1350
+ type : integer
1351
+ description : loopback interface number
1352
+ attr :
1353
+ $ref : ' #/definitions/LoopbackEntry'
1354
+ ' 400 ' :
1355
+ description : Malformed arguments for API call
1356
+ schema :
1357
+ $ref : ' #/definitions/Error'
1358
+ ' 401 ' :
1359
+ description : Invalid authentication credentials
1360
+ schema :
1361
+ $ref : ' #/definitions/Error'
1362
+ ' 404 ' :
1363
+ description : Object not found
1364
+ schema :
1365
+ $ref : ' #/definitions/Error'
1366
+ ' 500 ' :
1367
+ description : Internal service error
1368
+ schema :
1369
+ $ref : ' #/definitions/Error'
1370
+ ' 503 ' :
1371
+ description : Maintanence mode
1372
+ schema :
1373
+ $ref : ' #/definitions/Error'
1374
+ # ----------------------------------------------
1258
1375
# Schema definitions
1259
1376
# ----------------------------------------------
1260
1377
definitions :
@@ -1400,3 +1517,18 @@ definitions:
1400
1517
ip_addr :
1401
1518
type : string
1402
1519
description : IP address of directly attached device to the switch
1520
+ LoopbackEntry :
1521
+ type : object
1522
+ required :
1523
+ - description
1524
+ properties :
1525
+ description :
1526
+ type : string
1527
+ ipv4_addr :
1528
+ type : string
1529
+ ipv6_addr :
1530
+ type : string
1531
+ ip_redirects :
1532
+ type : boolean
1533
+ ip_proxy_arp :
1534
+ type : boolean
0 commit comments