Download as pdf or txt
Download as pdf or txt
You are on page 1of 4558

iMaster NCE-Fabric

V100R021C10

API Development Guide

Issue 01
Date 2022-04-29

HUAWEI TECHNOLOGIES CO., LTD.


Copyright © Huawei Technologies Co., Ltd. 2022. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without prior
written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.

Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.


Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China

Website: https://www.huawei.com
Email: support@huawei.com

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. i


iMaster NCE-Fabric
API Development Guide Contents

Contents

1 RESTFul API Reference........................................................................................................... 1


1.1 Interface Overview.................................................................................................................................................................. 1
1.2 Common Interface Mechanisms........................................................................................................................................ 1
1.2.1 Token Obtaining................................................................................................................................................................... 2
1.2.2 URL Format............................................................................................................................................................................ 4
1.2.3 Returned Response Value................................................................................................................................................. 5
1.2.4 service_name......................................................................................................................................................................... 5
1.3 Common Interface Information......................................................................................................................................... 6
1.4 Prerequisites.............................................................................................................................................................................. 9
1.5 Service Model......................................................................................................................................................................... 10
1.6 Interface Invocation Process............................................................................................................................................. 14
1.6.1 Overall Configuration Process....................................................................................................................................... 14
1.6.2 Communication Between an Intranet and the Internet.......................................................................................17
1.6.3 Load balancing of Traffic from the Internet Using an LB................................................................................... 18
1.6.4 Communication Between an Intranet and an External Private Network Through IPSec VPN...............20
1.6.5 Communication Between VPCs.................................................................................................................................... 22
1.6.6 Communication Within a VPC...................................................................................................................................... 24
1.6.7 Traffic Limiting of VMs Using Security Groups....................................................................................................... 26
1.6.8 Configuring HIROERService Interface Blacklists..................................................................................................... 27
1.6.9 Configuring the HIROAPIGService Interface Blacklist...........................................................................................31
1.7 Authentication Interface.....................................................................................................................................................33
1.8 SNMP........................................................................................................................................................................................ 35
1.8.1 Overview............................................................................................................................................................................... 35
1.8.2 MIB1....................................................................................................................................................................................... 36
1.8.2.1 MIB1................................................................................................................................................................................... 36
1.8.2.2 MIB Description.............................................................................................................................................................. 38
1.8.2.3 Alarm Fields Reported by MIB1................................................................................................................................ 39
1.8.2.4 MIB1 Trap..........................................................................................................................................................................46
1.8.2.4.1 Alarm Notification Trap............................................................................................................................................ 47
1.8.2.4.2 Alarm Synchronization Start Trap......................................................................................................................... 52
1.8.2.4.3 Alarm Synchronization Result Trap...................................................................................................................... 53
1.8.2.4.4 Alarm Synchronization End Trap........................................................................................................................... 58
1.8.2.4.5 KeepAlive Info (Heartbeat) Trap........................................................................................................................... 60

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. ii


iMaster NCE-Fabric
API Development Guide Contents

1.8.2.5 MIB1 Trap Sample..........................................................................................................................................................61


1.8.2.5.1 Active Alarm Notification Trap...............................................................................................................................62
1.8.2.5.2 Active Alarm Synchronization Start Trap............................................................................................................63
1.8.2.5.3 Active Alarm Synchronization Reporting Trap.................................................................................................. 63
1.8.2.5.4 Active Alarm Synchronization End Trap..............................................................................................................64
1.8.2.5.5 Heartbeat Trap............................................................................................................................................................ 65
1.8.3 Collecting Interconnection Parameters...................................................................................................................... 66
1.8.4 Important Notes................................................................................................................................................................ 70
1.8.5 Configuring the SNMP NBI............................................................................................................................................ 72
1.8.5.1 Configuration Operations............................................................................................................................................72
1.8.5.2 Configuring a Security Policy..................................................................................................................................... 85
1.8.5.3 Configuration Parameters........................................................................................................................................... 86
1.8.5.3.1 General Parameters................................................................................................................................................... 86
1.8.5.3.2 Advanced Configuration........................................................................................................................................... 87
1.8.5.3.3 Third-Party NMS....................................................................................................................................................... 100
1.8.6 Testing the SNMP NBI................................................................................................................................................... 106
1.8.6.1 MIB1................................................................................................................................................................................. 107
1.8.7 Configuring the SNMP NBI on the OSS.................................................................................................................. 108
1.8.7.1 Configuring the SNMPv3 NBI.................................................................................................................................. 108
1.8.8 Calling the SNMP NBI................................................................................................................................................... 111
1.8.8.1 MIB1 Subinterfaces..................................................................................................................................................... 112
1.8.8.1.1 Reporting Real-Time Alarms................................................................................................................................ 112
1.8.8.1.2 Changing Filter Criteria.......................................................................................................................................... 112
1.8.8.1.3 Synchronizing Alarms............................................................................................................................................. 114
1.8.8.1.4 Acknowledging Alarms...........................................................................................................................................119
1.8.8.1.5 Unacknowledging Alarms..................................................................................................................................... 121
1.8.8.1.6 Clearing Alarms........................................................................................................................................................ 123
1.8.8.1.7 Reporting Alarm Acknowledgement Status....................................................................................................126
1.8.8.1.8 Reporting Alarm Clearance Status..................................................................................................................... 126
1.9 Interface Reference............................................................................................................................................................ 127
1.9.1 User Authentication Service........................................................................................................................................ 127
1.9.1.1 Obtain a Token............................................................................................................................................................. 127
1.9.1.2 Delete a Token.............................................................................................................................................................. 130
1.9.1.3 Change Personal Password...................................................................................................................................... 132
1.9.1.4 Authenticate a User.................................................................................................................................................... 135
1.9.1.5 Log Out a Session........................................................................................................................................................ 137
1.9.1.6 Authenticate a User V1 (Compatible with Earlier Versions)........................................................................ 140
1.9.1.7 Add an SSO Server Whitelist................................................................................................................................... 143
1.9.1.8 Query SSO Server Whitelists....................................................................................................................................145
1.9.1.9 Delete SSO Server Whitelists in Batches............................................................................................................. 147
1.9.1.10 Modify an SSO Server Whitelist........................................................................................................................... 149
1.9.1.11 Authenticate a User V2 (Compatible with Earlier Versions)...................................................................... 151

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. iii


iMaster NCE-Fabric
API Development Guide Contents

1.9.1.12 Log Out a Session V2 (Compatible with Earlier Versions)......................................................................... 154


1.9.1.13 Authenticate a Common User or a Remote User.......................................................................................... 157
1.9.2 ZTP....................................................................................................................................................................................... 163
1.9.2.1 ZTP Region Management......................................................................................................................................... 164
1.9.2.1.1 Query Global Configurations............................................................................................................................... 164
1.9.2.1.2 Update Global Configurations............................................................................................................................. 166
1.9.2.1.3 Query Detailed Region Information by Region ID........................................................................................169
1.9.2.1.4 Query Basic Region Information......................................................................................................................... 175
1.9.2.1.5 Change the Password of a File Server.............................................................................................................. 178
1.9.2.1.6 Create a Region........................................................................................................................................................ 180
1.9.2.1.7 Modify a Region....................................................................................................................................................... 186
1.9.2.1.8 Delete a Region by ID............................................................................................................................................. 188
1.9.2.2 L3 Multicast Serviceon Logical Router................................................................................................................. 190
1.9.2.2.1 A resource pool needs to be created................................................................................................................. 190
1.9.2.2.2 Query Resource Pools............................................................................................................................................. 195
1.9.2.2.3 Delete Resource Pools............................................................................................................................................ 198
1.9.2.3 ZTP Whitelist Management..................................................................................................................................... 200
1.9.2.3.1 Create a Whitelist.....................................................................................................................................................201
1.9.2.3.2 Query Whitelists....................................................................................................................................................... 204
1.9.2.3.3 Delete Whitelists by region ID............................................................................................................................. 206
1.9.2.4 ZTP Open Topology Management.........................................................................................................................208
1.9.2.4.1 Import Devices.......................................................................................................................................................... 208
1.9.2.4.2 Query Device Information..................................................................................................................................... 216
1.9.2.4.3 Delete a Device......................................................................................................................................................... 224
1.9.2.4.4 Import Layer 2 Links............................................................................................................................................... 226
1.9.2.4.5 Query Layer 2 Link Information.......................................................................................................................... 229
1.9.2.4.6 Import Layer 3 Links............................................................................................................................................... 232
1.9.2.4.7 Query Layer 3 Links................................................................................................................................................. 235
1.9.2.4.8 Query Extended Device Information................................................................................................................. 238
1.9.2.4.9 Query Extended Layer 2 Link Information...................................................................................................... 240
1.9.2.4.10 Query Extended Layer 3 Link Information.................................................................................................... 242
1.9.2.4.11 Clear Topology Information by Region ID.....................................................................................................244
1.9.2.5 Task................................................................................................................................................................................... 245
1.9.2.5.1 Start ZTP Tasks.......................................................................................................................................................... 245
1.9.2.5.2 Stop ZTP Tasks by Region ID................................................................................................................................ 247
1.9.2.5.3 Update Device Ports................................................................................................................................................ 249
1.9.2.5.4 Query ZTP Tasks....................................................................................................................................................... 251
1.9.2.5.5 Query the Information About ZTP Tasks in All Regions............................................................................. 254
1.9.2.5.6 Query Syslog Information About ZTP Devices............................................................................................... 257
1.9.2.5.7 Isolate Devices........................................................................................................................................................... 260
1.9.2.5.8 Replace Devices........................................................................................................................................................ 262
1.9.2.5.9 Reset Devices............................................................................................................................................................. 264

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. iv


iMaster NCE-Fabric
API Development Guide Contents

1.9.2.6 ZTP Underlay Topology Management..................................................................................................................266


1.9.2.6.1 Export Topology Comparison Information...................................................................................................... 266
1.9.2.6.2 Query Topology Comparison Information....................................................................................................... 268
1.9.3 Physical Network.............................................................................................................................................................272
1.9.3.1 Physical Topology........................................................................................................................................................ 272
1.9.3.1.1 Query Device Groups.............................................................................................................................................. 273
1.9.3.1.2 Query Devices............................................................................................................................................................ 278
1.9.3.1.3 Query Host Links...................................................................................................................................................... 284
1.9.3.1.4 Query Hosts............................................................................................................................................................... 290
1.9.3.1.5 Query Device Links.................................................................................................................................................. 293
1.9.3.1.6 Query All Ports.......................................................................................................................................................... 299
1.9.3.1.7 Query Topologies in a Resource Pool................................................................................................................ 304
1.9.3.1.8 Query the DCN Network Topology.................................................................................................................... 308
1.9.3.1.9 Bypass Link Compatibility Configuration for Upgrade................................................................................ 311
1.9.3.1.10 Query the Bypass Link......................................................................................................................................... 312
1.9.3.2 Fabric............................................................................................................................................................................... 315
1.9.3.2.1 Create a Fabric.......................................................................................................................................................... 315
1.9.3.2.2 Query All Fabric Pools............................................................................................................................................ 322
1.9.3.2.3 Query a Fabric by ID............................................................................................................................................... 324
1.9.3.2.4 Update a Fabric by ID............................................................................................................................................. 325
1.9.3.2.5 Delete a Fabric by ID.............................................................................................................................................. 328
1.9.3.2.6 Query a Device Group with a Specified Role in a Specified Fabric.........................................................329
1.9.3.2.7 Query the Name and Usage of a Sub-resource............................................................................................ 332
1.9.3.2.8 Query the Total Number and Usage of Resources....................................................................................... 335
1.9.3.2.9 Query Node Relations............................................................................................................................................ 337
1.9.3.2.10 Update Node Relations........................................................................................................................................340
1.9.3.2.11 Add a Device Group to a Fabric........................................................................................................................ 342
1.9.3.2.12 Remove a Device Group from a Fabric.......................................................................................................... 346
1.9.3.2.13 Query Fabric Node Information........................................................................................................................347
1.9.3.3 Manage VAS Resource Pools................................................................................................................................... 352
1.9.3.3.1 Create a VAS Resource Pool................................................................................................................................. 352
1.9.3.3.2 Query the VAS Resource Pool List...................................................................................................................... 361
1.9.3.3.3 Query Details About a Specified VAS Resource Pool................................................................................... 363
1.9.3.3.4 Modify a Specified VAS Resource Pool............................................................................................................. 365
1.9.3.3.5 Delete a Specified VAS Resource Pool.............................................................................................................. 368
1.9.3.3.6 Add Device Groups to a VAS Resource Pool................................................................................................... 370
1.9.3.3.7 Delete a Device Group from a VAS Resource Pool....................................................................................... 372
1.9.3.3.8 Query Information About Device Groups in a Specified VAS Resource Pool...................................... 374
1.9.3.4 Relationship between Fabric and VAS..................................................................................................................377
1.9.3.4.1 Query Fabric-VAS Mappings by VAS Pool ID.................................................................................................. 377
1.9.3.4.2 Query Fabric VAS Mappings Based on the Fabric ID List...........................................................................379
1.9.3.5 Host Link.........................................................................................................................................................................381

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. v


iMaster NCE-Fabric
API Development Guide Contents

1.9.3.5.1 Import Host Access Links in a Batch................................................................................................................. 381


1.9.3.5.2 Delete Host Access Links in a Batch.................................................................................................................. 385
1.9.3.6 Device Link..................................................................................................................................................................... 388
1.9.3.6.1 Import Inter-Device Links in a Batch................................................................................................................. 388
1.9.3.6.2 Delete Inter-Device Links in a Batch................................................................................................................. 393
1.9.3.7 Open API for Device Discovery............................................................................................................................... 397
1.9.3.7.1 Modify an SNMP Account..................................................................................................................................... 398
1.9.3.7.2 Automatically Discover Devices.......................................................................................................................... 402
1.9.3.7.3 Device Polling Progress.......................................................................................................................................... 405
1.9.3.7.4 Add a Device.............................................................................................................................................................. 409
1.9.3.7.5 Result of the Add Operation................................................................................................................................ 411
1.9.3.7.6 Add Devices................................................................................................................................................................ 414
1.9.3.7.7 Delete Devices........................................................................................................................................................... 422
1.9.3.7.8 Save Authentication Information....................................................................................................................... 426
1.9.3.8 Device Groups............................................................................................................................................................... 429
1.9.3.8.1 Create a Device Group............................................................................................................................................430
1.9.3.8.2 Delete a Device Group........................................................................................................................................... 436
1.9.3.9 Query the Network Link List................................................................................................................................... 438
1.9.3.10 Host Link Status Query........................................................................................................................................... 447
1.9.3.10.1 Query Host Link Status........................................................................................................................................ 447
1.9.4 Public Service.................................................................................................................................................................... 450
1.9.4.1 Controller Resource Preconfiguration...................................................................................................................450
1.9.4.1.1 Preconfigure the Controller.................................................................................................................................. 450
1.9.4.2 External Gateway Management............................................................................................................................. 452
1.9.4.2.1 Query an External Gateway................................................................................................................................. 452
1.9.4.2.2 Update an External Gateway............................................................................................................................... 459
1.9.4.2.3 Delete an External Gateway and Related Interconnection Interfaces................................................... 467
1.9.4.2.4 Query an External Gateway................................................................................................................................. 469
1.9.4.2.5 Query External Gateways...................................................................................................................................... 473
1.9.4.2.6 Update the public IP usage status of an external gateway.......................................................................475
1.9.4.2.7 Query an External Gateway and Related Interconnection Interfaces....................................................478
1.9.4.2.8 Create an External Gateway and Related Interconnection Interfaces (Invoked in Easy Network
Deployment Mode)................................................................................................................................................................... 487
1.9.4.3 Routing Policy............................................................................................................................................................... 495
1.9.4.3.1 Create a Routing Policy.......................................................................................................................................... 496
1.9.4.3.2 Delete a Routing Policy by Router ID................................................................................................................499
1.9.4.3.3 Query a Routing Policy by Router ID................................................................................................................ 501
1.9.4.3.4 Update a Routing Policy by Router ID.............................................................................................................. 503
1.9.4.3.5 NFVI Routing Policy................................................................................................................................................. 505
1.9.4.4 BFD System Configuration Management............................................................................................................510
1.9.4.4.1 Create BFD System Configuration...................................................................................................................... 510
1.9.4.4.2 Query the BFD System Configuration List.......................................................................................................516
1.9.4.4.3 Query BFD System Configuration.......................................................................................................................522

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. vi


iMaster NCE-Fabric
API Development Guide Contents

1.9.4.4.4 Update BFD System Configuration.................................................................................................................... 524


1.9.4.4.5 Delete BFD System Configuration...................................................................................................................... 526
1.9.4.4.6 Add a Device to BFD System Configuration................................................................................................... 528
1.9.4.4.7 Remove a Device from BFD System Configuration...................................................................................... 530
1.9.4.5 Global Resources..........................................................................................................................................................532
1.9.4.5.1 Create a Resource Pool.......................................................................................................................................... 532
1.9.4.5.2 Delete a Resource Pool.......................................................................................................................................... 535
1.9.4.5.3 Create or destroy resource pools in batches...................................................................................................537
1.9.4.6 Easy VPC Management............................................................................................................................................. 539
1.9.4.6.1 Create an Easy VPC................................................................................................................................................. 539
1.9.4.7 DiffServ Domain Management............................................................................................................................... 553
1.9.4.7.1 Create a DiffServ Domain..................................................................................................................................... 553
1.9.4.7.2 Query the DiffServ Domain List.......................................................................................................................... 562
1.9.4.7.3 Query a DiffServ Domain...................................................................................................................................... 568
1.9.4.7.4 Update a DiffServ Domain.................................................................................................................................... 571
1.9.4.7.5 Delete a DiffServ Domain..................................................................................................................................... 574
1.9.4.8 Tenant Management.................................................................................................................................................. 576
1.9.4.8.1 Create a Tenant.........................................................................................................................................................576
1.9.4.8.2 Query All Tenants.....................................................................................................................................................582
1.9.4.8.3 Query a Tenant by ID..............................................................................................................................................587
1.9.4.8.4 Update a Tenant by ID........................................................................................................................................... 589
1.9.4.8.5 Delete a Tenant.........................................................................................................................................................592
1.9.4.8.6 Query the Number of Logical NEs and Fabric Resources Used by a Tenant.......................................593
1.9.5 Neutron.............................................................................................................................................................................. 596
1.9.5.1 Network.......................................................................................................................................................................... 596
1.9.5.1.1 Create a Network..................................................................................................................................................... 596
1.9.5.1.2 Query All Networks................................................................................................................................................. 614
1.9.5.1.3 Query a Network by ID.......................................................................................................................................... 616
1.9.5.1.4 Update a Network by ID........................................................................................................................................619
1.9.5.1.5 Delete a Network by ID......................................................................................................................................... 623
1.9.5.2 Subnet..............................................................................................................................................................................625
1.9.5.2.1 Create a Subnet........................................................................................................................................................ 625
1.9.5.2.2 Query Subnets........................................................................................................................................................... 634
1.9.5.2.3 Query a Subnet by ID............................................................................................................................................. 637
1.9.5.2.4 Update a Subnet by ID........................................................................................................................................... 640
1.9.5.2.5 Delete a Subnet by ID............................................................................................................................................ 643
1.9.5.3 Port................................................................................................................................................................................... 645
1.9.5.3.1 Create a Port.............................................................................................................................................................. 645
1.9.5.3.2 Query All Ports.......................................................................................................................................................... 670
1.9.5.3.3 Query a Port by ID................................................................................................................................................... 674
1.9.5.3.4 Update a Port by ID................................................................................................................................................ 677
1.9.5.3.5 Delete a Port by ID.................................................................................................................................................. 682

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. vii


iMaster NCE-Fabric
API Development Guide Contents

1.9.5.4 Router.............................................................................................................................................................................. 684


1.9.5.4.1 Create a Router......................................................................................................................................................... 684
1.9.5.4.2 Query All Routers..................................................................................................................................................... 694
1.9.5.4.3 Query a Router by ID.............................................................................................................................................. 696
1.9.5.4.4 Update a Router....................................................................................................................................................... 699
1.9.5.4.5 Delete a Router by ID............................................................................................................................................. 702
1.9.5.4.6 Create a Router Link............................................................................................................................................... 704
1.9.5.4.7 Add a Route by Router ID..................................................................................................................................... 708
1.9.5.4.8 Query a Router Link by Router ID...................................................................................................................... 712
1.9.5.4.9 Delete a Router Link by Router ID..................................................................................................................... 715
1.9.5.4.10 Delete a Route by Router ID.............................................................................................................................. 718
1.9.5.4.11 Query a Static Route by Router ID.................................................................................................................. 721
1.9.5.5 Internal Router APIs....................................................................................................................................................723
1.9.5.5.1 Create an Internal Router Interface by ID....................................................................................................... 723
1.9.5.5.2 Query Sunbet IDs..................................................................................................................................................... 727
1.9.5.5.3 Delete an Internal Router Interface by ID....................................................................................................... 729
1.9.5.6 Snat.................................................................................................................................................................................. 731
1.9.5.6.1 Create SNAT............................................................................................................................................................... 731
1.9.5.6.2 Query the SNAT List................................................................................................................................................ 736
1.9.5.6.3 Query SNAT by Name............................................................................................................................................ 740
1.9.5.6.4 Update the SNAT by Name.................................................................................................................................. 742
1.9.5.6.5 Delete SNAT by Name............................................................................................................................................744
1.9.5.7 Floating IP Address..................................................................................................................................................... 746
1.9.5.7.1 Create a Floating IP Address................................................................................................................................ 746
1.9.5.7.2 Query the Floating IP Address List..................................................................................................................... 751
1.9.5.7.3 Query a Floating IP Address by Name..............................................................................................................755
1.9.5.7.4 Update a Floating IP Address Based on the Name...................................................................................... 757
1.9.5.7.5 Delete a Floating IP Address by Name............................................................................................................. 759
1.9.5.8 Qos....................................................................................................................................................................................761
1.9.5.8.1 Create a QoS Policy................................................................................................................................................. 761
1.9.5.8.2 Query the QoS List.................................................................................................................................................. 769
1.9.5.8.3 Query QoS by Name............................................................................................................................................... 775
1.9.5.8.4 Update QoS by Name.............................................................................................................................................777
1.9.5.8.5 Delete a QoS Policy by Name.............................................................................................................................. 779
1.9.5.9 Security Group.............................................................................................................................................................. 781
1.9.5.9.1 Create a Security Group......................................................................................................................................... 781
1.9.5.9.2 Query Security Groups........................................................................................................................................... 785
1.9.5.9.3 Query a Security Group by Name...................................................................................................................... 788
1.9.5.9.4 Update a Security Group by Name.................................................................................................................... 790
1.9.5.9.5 Deleting a Security Group by Name..................................................................................................................792
1.9.5.10 Security Group Rules................................................................................................................................................ 793
1.9.5.10.1 Create a Security Rule.......................................................................................................................................... 793

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. viii


iMaster NCE-Fabric
API Development Guide Contents

1.9.5.10.2 Query Security Rules.............................................................................................................................................799


1.9.5.10.3 Query a Security Rule by Name....................................................................................................................... 803
1.9.5.10.4 Delete a Security Rule by Name.......................................................................................................................805
1.9.5.11 Firewall......................................................................................................................................................................... 807
1.9.5.11.1 Create a Firewall Rule.......................................................................................................................................... 807
1.9.5.11.2 Query All Firewalls................................................................................................................................................ 812
1.9.5.11.3 Query a Firewall Rule by ID............................................................................................................................... 814
1.9.5.11.4 Update a Firewall Rule by ID............................................................................................................................. 817
1.9.5.11.5 Delete a Firewall Rule by ID.............................................................................................................................. 820
1.9.5.12 Firewall Policies.......................................................................................................................................................... 822
1.9.5.12.1 Create a Firewall Policy....................................................................................................................................... 823
1.9.5.12.2 Query All Firewall Policies.................................................................................................................................. 827
1.9.5.12.3 Query a Firewall Policy by ID............................................................................................................................ 829
1.9.5.12.4 Update a Firewall Policy by ID.......................................................................................................................... 831
1.9.5.12.5 Delete a Firewall Policy by ID............................................................................................................................833
1.9.5.12.6 Bind a Firewall Rule to a Firewall Policy....................................................................................................... 835
1.9.5.12.7 Unbind a Firewall Rule from a Firewall Policy............................................................................................ 838
1.9.5.13 FirewallRule................................................................................................................................................................. 839
1.9.5.13.1 Create a Firewall Rule.......................................................................................................................................... 840
1.9.5.13.2 Query All Firewall Rules...................................................................................................................................... 848
1.9.5.13.3 Query a Firewall Rule by ID............................................................................................................................... 851
1.9.5.13.4 Update a Firewall Rule by ID............................................................................................................................. 853
1.9.5.13.5 Delete a Firewall Rule by ID.............................................................................................................................. 855
1.9.5.14 VPN Service................................................................................................................................................................. 857
1.9.5.14.1 Create a VPN Service............................................................................................................................................ 857
1.9.5.14.2 Query All VPN Services........................................................................................................................................ 863
1.9.5.14.3 Query a VPN Service by ID................................................................................................................................. 865
1.9.5.14.4 Update a VPN Service by ID...............................................................................................................................867
1.9.5.14.5 Delete a VPN Service by ID................................................................................................................................ 869
1.9.5.15 IkePolicy........................................................................................................................................................................ 871
1.9.5.15.1 Create an IKE Policy.............................................................................................................................................. 871
1.9.5.15.2 Query All IKE Policies........................................................................................................................................... 877
1.9.5.15.3 Query an IKE Policy by ID................................................................................................................................... 879
1.9.5.15.4 Update an IKE Policy by ID.................................................................................................................................881
1.9.5.15.5 Delete an IKE Policy by ID.................................................................................................................................. 884
1.9.5.16 IPsecPolicy.................................................................................................................................................................... 886
1.9.5.16.1 Create an IPsec Policy by ID............................................................................................................................... 886
1.9.5.16.2 Query All IPsec Policies........................................................................................................................................ 891
1.9.5.16.3 Query an IPsec Policy by ID............................................................................................................................... 894
1.9.5.16.4 Update an IPsec Policy by ID............................................................................................................................. 896
1.9.5.16.5 Delete an IPsec Policy by ID............................................................................................................................... 898
1.9.5.17 Ipsec Site Connection............................................................................................................................................... 900

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. ix


iMaster NCE-Fabric
API Development Guide Contents

1.9.5.17.1 Create an IPsec Site Connection....................................................................................................................... 900


1.9.5.17.2 Query All IPsec Site Connections......................................................................................................................908
1.9.5.17.3 Query an IPsec Site Connection by ID............................................................................................................ 910
1.9.5.17.4 Update an IPsec Site Connection by ID..........................................................................................................912
1.9.5.17.5 Delete an IPsec Site Connection by ID........................................................................................................... 915
1.9.5.18 L2BR............................................................................................................................................................................... 916
1.9.5.18.1 Create L2BRs in Batches...................................................................................................................................... 917
1.9.5.18.2 Update L2BRs in Batches.................................................................................................................................... 925
1.9.5.18.3 Delete L2BRs in Batches...................................................................................................................................... 928
1.9.5.18.4 Create an L2BR....................................................................................................................................................... 931
1.9.5.18.5 Query All L2BRs...................................................................................................................................................... 934
1.9.5.18.6 Query an L2BR by ID............................................................................................................................................ 936
1.9.5.18.7 Update an L2BR by ID.......................................................................................................................................... 938
1.9.5.18.8 Delete an L2BR by ID........................................................................................................................................... 940
1.9.5.19 VpcConnection........................................................................................................................................................... 942
1.9.5.19.1 Create a VPC Communication Instance......................................................................................................... 942
1.9.5.19.2 Query VPC Connections....................................................................................................................................... 952
1.9.5.19.3 Query a VPC Communication Instance.......................................................................................................... 961
1.9.5.19.4 Update a VPC Communication Instance........................................................................................................964
1.9.5.19.5 Delete a VPC Communication Instance......................................................................................................... 968
1.9.5.20 L2 DC/POD Interconnection.................................................................................................................................. 970
1.9.5.20.1 Create a Layer 2 DC/POD Interconnection Instance................................................................................. 970
1.9.5.20.2 L2 DC/POD Interconnection............................................................................................................................... 975
1.9.5.20.3 Query a Layer 2 DC/POD Interconnection Instance by ID...................................................................... 977
1.9.5.20.4 Update a Layer 2 DC/POD Interconnection Instance................................................................................ 979
1.9.5.20.5 Delete a Router DCI.............................................................................................................................................. 981
1.9.5.21 DCI L3............................................................................................................................................................................ 983
1.9.5.21.1 L3 DC/POD Interconnection............................................................................................................................... 983
1.9.5.21.2 L3Dci Subnet......................................................................................................................................................... 1000
1.9.5.21.3 Delete L3 Dci Subnet..........................................................................................................................................1003
1.9.5.22 Heartbeat Connectivity of the Cloud Platform.............................................................................................1007
1.9.5.22.1 Detect Heartbeats Between the Cloud Platform and the Controller................................................ 1007
1.9.5.23 Neutron Routing Whitelist...................................................................................................................................1010
1.9.5.23.1 Query Routing Whitelist Information...........................................................................................................1010
1.9.6 K8S..................................................................................................................................................................................... 1013
1.9.6.1 Container Platform................................................................................................................................................... 1013
1.9.6.1.1 Query All Container Platforms.......................................................................................................................... 1013
1.9.6.1.2 Query a Container Platform by ID................................................................................................................... 1020
1.9.6.1.3 Update a Container Platform by ID................................................................................................................ 1023
1.9.6.1.4 Check Connectivity Between the Container Platform and the Controller......................................... 1035
1.9.6.2 Container Tenant....................................................................................................................................................... 1038
1.9.6.2.1 Create a Tenant...................................................................................................................................................... 1038

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. x


iMaster NCE-Fabric
API Development Guide Contents

1.9.6.2.2 Query All Tenants.................................................................................................................................................. 1044


1.9.6.2.3 Query a Tenant by ID........................................................................................................................................... 1048
1.9.6.2.4 Delete a Tenant by ID.......................................................................................................................................... 1051
1.9.6.3 Container Network................................................................................................................................................... 1053
1.9.6.3.1 Create a Network.................................................................................................................................................. 1053
1.9.6.3.2 Query All Networks...............................................................................................................................................1063
1.9.6.3.3 Query a Network by ID....................................................................................................................................... 1068
1.9.6.3.4 Delete a Network by ID....................................................................................................................................... 1071
1.9.6.4 Container Port............................................................................................................................................................ 1073
1.9.6.4.1 Create a Port........................................................................................................................................................... 1073
1.9.6.4.2 Query All Ports....................................................................................................................................................... 1085
1.9.6.4.3 Query a Port by ID................................................................................................................................................ 1092
1.9.6.4.4 Update a Port by ID.............................................................................................................................................. 1095
1.9.6.4.5 Delete a Port by ID................................................................................................................................................ 1099
1.9.6.5 Container Node.......................................................................................................................................................... 1101
1.9.6.5.1 Create a Container Node.................................................................................................................................... 1101
1.9.6.5.2 Query All Container Nodes................................................................................................................................ 1106
1.9.6.5.3 Query a Container Node by ID......................................................................................................................... 1109
1.9.6.5.4 Update a Container Node by ID....................................................................................................................... 1111
1.9.6.5.5 Delete a Container Node by ID.........................................................................................................................1113
1.9.6.6 Container Services..................................................................................................................................................... 1114
1.9.6.6.1 Create a container service.................................................................................................................................. 1115
1.9.6.6.2 Query Container Services.................................................................................................................................... 1124
1.9.6.6.3 Query a Container Service by ID...................................................................................................................... 1128
1.9.6.6.4 Modify a Container Service................................................................................................................................ 1131
1.9.6.6.5 Delete a container service.................................................................................................................................. 1135
1.9.7 VPC.................................................................................................................................................................................... 1137
1.9.7.1 Logical Network Management............................................................................................................................. 1137
1.9.7.1.1 Create a Logical Network................................................................................................................................... 1138
1.9.7.1.2 Query All Logical Networks............................................................................................................................... 1142
1.9.7.1.3 Query All Logical Networks............................................................................................................................... 1148
1.9.7.1.4 Update a Logical Network by ID...................................................................................................................... 1150
1.9.7.1.5 Delete a Logical Network by ID........................................................................................................................1154
1.9.7.2 Logical Subnet Management................................................................................................................................ 1156
1.9.7.2.1 Create a Subnet...................................................................................................................................................... 1156
1.9.7.2.2 Query Subnets........................................................................................................................................................ 1162
1.9.7.2.3 Query a Subnet by ID........................................................................................................................................... 1170
1.9.7.2.4 Update a Subnet by ID........................................................................................................................................ 1173
1.9.7.2.5 Delete a Subnet by ID.......................................................................................................................................... 1178
1.9.7.3 Logical Switch Management................................................................................................................................. 1180
1.9.7.3.1 Create a Logical Switch....................................................................................................................................... 1180
1.9.7.3.2 Query Logical Switches........................................................................................................................................ 1191

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xi


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.3.3 Query Information About All Logical Access Switches............................................................................. 1203


1.9.7.3.4 Query a Logical Switch by ID............................................................................................................................ 1210
1.9.7.3.5 Update a Logical Switch by ID.......................................................................................................................... 1213
1.9.7.3.6 Delete a Logical Switch by ID............................................................................................................................1220
1.9.7.4 Logical Port Management......................................................................................................................................1221
1.9.7.4.1 Logical Port Management.................................................................................................................................. 1221
1.9.7.4.2 Query All Logical Ports........................................................................................................................................ 1229
1.9.7.4.3 Query Logical Port Information Based on the End Port ID List.............................................................1238
1.9.7.4.4 Query a Logical Port by ID................................................................................................................................. 1240
1.9.7.4.5 Update a Logical Port by ID............................................................................................................................... 1243
1.9.7.4.6 Update a Logical Port by ID............................................................................................................................... 1246
1.9.7.5 Logical Port Group Management........................................................................................................................ 1247
1.9.7.5.1 Create a Logical Port Group...............................................................................................................................1247
1.9.7.5.2 Update a Logical Port Group............................................................................................................................. 1254
1.9.7.5.3 Delete a Logical Port Group...............................................................................................................................1259
1.9.7.6 Logical Router Management.................................................................................................................................1261
1.9.7.6.1 Create a Logical Router....................................................................................................................................... 1261
1.9.7.6.2 Query the Logical Router List............................................................................................................................ 1269
1.9.7.6.3 Query the Logical Router List............................................................................................................................ 1293
1.9.7.6.4 Query Information About All Logical Routers............................................................................................. 1299
1.9.7.6.5 Query Information About a Logical Router.................................................................................................. 1307
1.9.7.6.6 Update a Logical Router..................................................................................................................................... 1311
1.9.7.6.7 Delete a Logical Router....................................................................................................................................... 1314
1.9.7.6.8 Add Static Route Information to a Logical Router.....................................................................................1316
1.9.7.6.9 Update Static Routes on a Logical Router.................................................................................................... 1323
1.9.7.6.10 Query Static Route Information on a Logical Router............................................................................. 1326
1.9.7.6.11 Delete Static Route Information from a Logical Router........................................................................ 1328
1.9.7.6.12 Query Static Routes in Batches Based on Specified Conditions..........................................................1330
1.9.7.6.13 Add BGP Peers to a Logical Router............................................................................................................... 1333
1.9.7.6.14 Update BGP Peers on a Logical Router....................................................................................................... 1343
1.9.7.6.15 Query BGP Peer Information on a Logical Router...................................................................................1346
1.9.7.6.16 Delete BGP Peers from a Logical Router.................................................................................................... 1348
1.9.7.6.17 Query BGP Peer Information in Batches Based on Specified Conditions.........................................1350
1.9.7.6.18 Query Device Groups Bound to a Logical Router.................................................................................... 1353
1.9.7.6.19 Query Device Groups Bound to a Logical Router in Batches...............................................................1356
1.9.7.6.20 Query Routing Policies Bound to a Logical Router................................................................................. 1358
1.9.7.6.21 Bind Routing Policies to a Logical Router...................................................................................................1361
1.9.7.6.22 Unbind Routing Policies from a Logical Router........................................................................................1363
1.9.7.6.23 Bind Device Groups to a Logical Router......................................................................................................1365
1.9.7.6.24 Unbind Device Groups from a Logical Router...........................................................................................1368
1.9.7.6.25 Query the Binding Relationship Between a Logical Router and an External Gateway.............. 1370
1.9.7.6.26 Bind an External Gateway to a Logical Router......................................................................................... 1373

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xii


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.6.27 Switch Active and Standby Fabrics of a Logical Router......................................................................... 1375


1.9.7.7 Logical Interface Management............................................................................................................................ 1377
1.9.7.7.1 Create a Layer 3 Logical Interface................................................................................................................... 1377
1.9.7.7.2 Query Logical Interfaces......................................................................................................................................1388
1.9.7.7.3 Query a Layer 3 Logical Interface by ID........................................................................................................ 1399
1.9.7.7.4 Update a Logical Layer 3 Port........................................................................................................................... 1402
1.9.7.7.5 Delete a Layer 3 Logical Interface................................................................................................................... 1405
1.9.7.8 Logical link Management.......................................................................................................................................1407
1.9.7.8.1 Create a Logical Link............................................................................................................................................ 1407
1.9.7.8.2 Query the Logical Link Information List........................................................................................................ 1414
1.9.7.8.3 Query Logical Link Information........................................................................................................................ 1419
1.9.7.8.4 Delete a Logical Link............................................................................................................................................ 1421
1.9.7.9 End Port Management............................................................................................................................................ 1422
1.9.7.9.1 Create an End Port................................................................................................................................................ 1422
1.9.7.9.2 Query All End Ports............................................................................................................................................... 1425
1.9.7.9.3 Query an End Port by ID..................................................................................................................................... 1432
1.9.7.9.4 Update an End Port by ID................................................................................................................................... 1434
1.9.7.9.5 Delete an End Port by ID.................................................................................................................................... 1437
1.9.7.10 Logical VAS............................................................................................................................................................... 1439
1.9.7.10.1 Create a Logical VAS NE................................................................................................................................... 1439
1.9.7.10.2 Query the Logical VAS List............................................................................................................................... 1446
1.9.7.10.3 Query a Logical VAS NE by ID........................................................................................................................ 1448
1.9.7.10.4 Update a Logical VAS NE by ID......................................................................................................................1450
1.9.7.10.5 Delete a Logical VAS NE by ID....................................................................................................................... 1452
1.9.7.10.6 Query Southbound Configurations Based on VAS ID............................................................................. 1454
1.9.7.10.7 Query a Logical Link by ID on a Logical VAS Device.............................................................................. 1457
1.9.7.10.8 Create an Internal Link by ID on a Logical VAS Device......................................................................... 1462
1.9.7.10.9 Delete an Intenal Link....................................................................................................................................... 1465
1.9.7.10.10 Add New Routes for a Logical VAS Device.............................................................................................. 1467
1.9.7.10.11 Query New Routes for a Logical VAS Device in Batches.....................................................................1471
1.9.7.10.12 Update New Routes for a Logical VAS Device........................................................................................1473
1.9.7.10.13 Delete New Routes from a Logical VAS Device..................................................................................... 1475
1.9.7.11 Logical Topology Management......................................................................................................................... 1477
1.9.7.11.1 Query End Ports on VMs/BMs........................................................................................................................ 1477
1.9.7.11.2 Query the Device Mapping Information of All Logical Interfaces..................................................... 1484
1.9.7.11.3 Query the Device Mapping Information of All Logical Ports...............................................................1489
1.9.7.11.4 Query the Device Mapping Information of All Logical Routers Based on a Specified Condition
....................................................................................................................................................................................................... 1493
1.9.7.11.5 Query the Device Mapping Information of All Logical Switches........................................................1497
1.9.7.11.6 Query VXLAN Tunnels....................................................................................................................................... 1501
1.9.7.11.7 Query All VXLAN Ingress Replication Tables............................................................................................. 1504
1.9.7.12 Logical Topology..................................................................................................................................................... 1507
1.9.7.12.1 Query Device Information Based on Conditions...................................................................................... 1507

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xiii


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.13 Logical Topology (Not Recommended).......................................................................................................... 1517


1.9.7.13.1 Query the Information About the Logical Port Pair................................................................................1517
1.9.7.13.2 Query Logical Router Information................................................................................................................ 1521
1.9.7.13.3 Query Logical Switch Information................................................................................................................. 1524
1.9.7.13.4 Query Subnet Information............................................................................................................................... 1527
1.9.7.13.5 Query Logical Port Mapping Information...................................................................................................1530
1.9.7.13.6 Query Information About All Tenants..........................................................................................................1533
1.9.7.14 VPC Communication.............................................................................................................................................. 1535
1.9.7.14.1 Create VPC Communication............................................................................................................................ 1535
1.9.7.14.2 Query the VPC Interworking List................................................................................................................... 1541
1.9.7.14.3 Query a VPC Interworking Connection by Name.....................................................................................1546
1.9.7.14.4 Update a VPC Interworking Connection by Name.................................................................................. 1548
1.9.7.14.5 Delete a VPC Interworking Connection by Name.................................................................................... 1550
1.9.7.14.6 Create a VPC Communication Instance....................................................................................................... 1551
1.9.7.14.7 Query VPC Connections.................................................................................................................................... 1561
1.9.7.14.8 Query a VPC Communication Instance........................................................................................................1570
1.9.7.14.9 Update a VPC Communication Instance..................................................................................................... 1573
1.9.7.14.10 Delete a VPC Communication Instance.................................................................................................... 1577
1.9.7.15 Application Example of the VPC Communication Policy.......................................................................... 1579
1.9.7.15.1 Create a VPC Communication Policy Application Instance...................................................................1579
1.9.7.15.2 Query the VPC Communication Policy Application Instance List....................................................... 1607
1.9.7.15.3 Query a VPC Communication Policy Application Instance................................................................... 1610
1.9.7.15.4 Update a VPC Communication Policy Application Instance................................................................. 1613
1.9.7.15.5 Delete a VPC Communication Policy Application Instance.................................................................. 1617
1.9.7.16 External Network Management........................................................................................................................ 1619
1.9.7.16.1 Query All Logical Networks............................................................................................................................. 1619
1.9.7.16.2 Query an External Network by ID................................................................................................................. 1622
1.9.7.17 External Network Connection............................................................................................................................ 1624
1.9.7.17.1 Create an External Network Connection.....................................................................................................1624
1.9.7.17.2 Query External Network Connections..........................................................................................................1632
1.9.7.17.3 Query External Network Connections..........................................................................................................1639
1.9.7.17.4 Update an External Connection by ID (Only NAT64 Prefix Update Is Supported)...................... 1642
1.9.7.17.5 Delete an External Network Connection.................................................................................................... 1646
1.9.7.17.6 Add a Subnet to an External Network......................................................................................................... 1647
1.9.7.17.7 Remove a Subnet from an External Network........................................................................................... 1650
1.9.7.17.8 Query Subnets Connecting to an External Network............................................................................... 1652
1.9.7.18 DHCP Group Management..................................................................................................................................1655
1.9.7.18.1 Create a DHCP Group........................................................................................................................................ 1656
1.9.7.18.2 Query DHCP Groups........................................................................................................................................... 1661
1.9.7.18.3 Query a DHCP Group by ID............................................................................................................................. 1667
1.9.7.18.4 Update a DHCP Group...................................................................................................................................... 1669
1.9.7.18.5 Delete a DHCP Group........................................................................................................................................ 1671

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xiv


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.19 Flow Rule................................................................................................................................................................... 1673


1.9.7.19.1 Create a Flow Rule.............................................................................................................................................. 1673
1.9.7.19.2 Delete a Flow Rule.............................................................................................................................................. 1675
1.9.7.20 DHCP Relay Management of Subnet...............................................................................................................1677
1.9.7.20.1 Associate a Subnet with a DHCP Group......................................................................................................1677
1.9.7.20.2 Disassociate a Subnet from a DHCP Group............................................................................................... 1679
1.9.7.21 Logical Router Configuration Management..................................................................................................1680
1.9.7.21.1 Create a Device Group Configuration Service on a Logical Router, Including the Best-Effort Path
and FRR.......................................................................................................................................................................................1681
1.9.7.21.2 Query Device Group Configuration Services of a Logical Router, Including the Best-Effort Path
and FRR.......................................................................................................................................................................................1687
1.9.7.21.3 Configuring Service Parameters for a Logical Router Group, Including Best-Effort Path and FRR
....................................................................................................................................................................................................... 1694
1.9.7.21.4 Query a Device Group Configuration Service by ID on a Logical Router, Including the Best-Effort
Path and FRR............................................................................................................................................................................ 1699
1.9.7.21.5 Update a Device Group Configuration Service by ID on a Logical Router, Including the Best-
Effort Path and FRR................................................................................................................................................................ 1701
1.9.7.21.6 Delete a Device Group Configuration Service by ID from a Logical Router, Including the Best-
Effort Path and FRR................................................................................................................................................................ 1704
1.9.7.22 Loopback Interface Management..................................................................................................................... 1706
1.9.7.22.1 Create a Loopback Interface........................................................................................................................... 1706
1.9.7.22.2 Query the Loopback Interface List................................................................................................................ 1710
1.9.7.22.3 Query a Loopback Interface............................................................................................................................ 1715
1.9.7.22.4 Update a Loopback Interface.......................................................................................................................... 1717
1.9.7.22.5 Delete a Loopback Interface........................................................................................................................... 1720
1.9.7.23 L2 and L3 Logical API Management................................................................................................................ 1721
1.9.7.23.1 L2 and L3 Logical API Management.............................................................................................................1721
1.9.7.24 OSPF Process Management................................................................................................................................ 1724
1.9.7.24.1 Create an OSPF Process.................................................................................................................................... 1724
1.9.7.24.2 Query the OSPF Process List........................................................................................................................... 1736
1.9.7.24.3 Query OSPF Process Information...................................................................................................................1749
1.9.7.24.4 Update OSPF Process Information................................................................................................................ 1752
1.9.7.24.5 Delete OSPF Process Information.................................................................................................................. 1758
1.9.7.24.6 Create an OSPF Neighbor................................................................................................................................ 1759
1.9.7.24.7 Query the OSPF Neighbor List........................................................................................................................1764
1.9.7.24.8 Query OSPF Neighbor Information...............................................................................................................1771
1.9.7.24.9 Update OSPF Neighbor Information............................................................................................................ 1773
1.9.7.24.10 Delete OSPF Neighbor Information........................................................................................................... 1775
1.9.7.24.11 Query OSPF Neighbor States........................................................................................................................1777
1.9.7.25 VPC Routing Whitelist........................................................................................................................................... 1779
1.9.7.25.1 Query Routing Whitelist Information by Router ID................................................................................ 1779
1.9.7.25.2 Update Routes in the Whitelist...................................................................................................................... 1782
1.9.7.25.3 Delete routing whitelist information by routing whitelist ID...............................................................1785
1.9.7.25.4 Create a Routing Whitelist............................................................................................................................... 1786

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xv


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.25.5 Query Routing Whitelist Information by Condition................................................................................ 1788


1.9.7.25.6 Add Subnets to a Whitelist.............................................................................................................................. 1789
1.9.7.25.7 Delete subnets from a whitelist by subnet ID........................................................................................... 1792
1.9.7.25.8 Add routes to a whitelist by route ID........................................................................................................... 1794
1.9.7.25.9 Delete Specified Routing Whitelist Information....................................................................................... 1796
1.9.7.26 Routing Policy Management.............................................................................................................................. 1798
1.9.7.26.1 Create a Routing Policy..................................................................................................................................... 1798
1.9.7.26.2 Query the Routing Policy List..........................................................................................................................1811
1.9.7.26.3 Query Routing Policy Information.................................................................................................................1825
1.9.7.26.4 Update Routing Policy Information.............................................................................................................. 1828
1.9.7.26.5 Delete Routing Policy Information................................................................................................................ 1833
1.9.7.26.6 Add a Routing Policy Node.............................................................................................................................. 1835
1.9.7.26.7 Add a Routing Policy Node.............................................................................................................................. 1838
1.9.7.26.8 Delete a Routing Policy Node......................................................................................................................... 1841
1.9.7.27 NQA............................................................................................................................................................................. 1843
1.9.7.27.1 Query All NQA Names...................................................................................................................................... 1843
1.9.7.28 Application Group Management....................................................................................................................... 1847
1.9.7.28.1 Create an Application Group Mapping Policy........................................................................................... 1847
1.9.7.28.2 Query the Application Group Mapping Policy List.................................................................................. 1855
1.9.7.28.3 Query Application Group Mapping Policies............................................................................................... 1862
1.9.7.28.4 Update an Application Group Mapping Policy..........................................................................................1865
1.9.7.28.5 Delete an Application Group Mapping Policy........................................................................................... 1868
1.9.7.28.6 Query the Flattened List of Application Group Mapping Policies...................................................... 1870
1.9.7.28.7 Create an Area for an Application Group to Take Effect....................................................................... 1876
1.9.7.28.8 Query the List of Regions Where an Application Group Takes Effect...............................................1894
1.9.7.28.9 Query the Area Where an Application Group Takes Effect.................................................................. 1905
1.9.7.28.10 Update the Area Where the Application Group Takes Effect............................................................ 1908
1.9.7.28.11 Delete the Area Where an Application Group Takes Effect............................................................... 1912
1.9.7.29 VPN Service............................................................................................................................................................... 1914
1.9.7.29.1 Create a VPN Service......................................................................................................................................... 1914
1.9.7.29.2 Query All VPN Services......................................................................................................................................1921
1.9.7.29.3 Query a VPN Service by ID.............................................................................................................................. 1923
1.9.7.29.4 Update a VPN Service by ID............................................................................................................................ 1925
1.9.7.29.5 Delete a VPN Service by ID.............................................................................................................................. 1927
1.9.7.29.6 Create a L2VPN or L3VPN Service................................................................................................................. 1929
1.9.7.29.7 Query L2VPN or L3VPN Services................................................................................................................... 1934
1.9.7.29.8 Query L2VPN or L3VPN Service Details...................................................................................................... 1941
1.9.7.29.9 Update L2VPN or L3VPN Services................................................................................................................. 1943
1.9.7.29.10 Delete a L2VPN or L3VPN Service.............................................................................................................. 1945
1.9.7.30 Layer 2 DCI................................................................................................................................................................1947
1.9.7.30.1 Create a Layer 2 DCI Instance.........................................................................................................................1947
1.9.7.30.2 Query the List of Layer 2 DCI Instances...................................................................................................... 1955

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xvi


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.30.3 Query Layer 2 DCI Instances........................................................................................................................... 1957


1.9.7.30.4 Update a Layer 2 DCI Instance....................................................................................................................... 1959
1.9.7.30.5 Delete a Layer 2 DCI Instance.........................................................................................................................1962
1.9.7.31 Layer 3 DCI................................................................................................................................................................1964
1.9.7.31.1 Create a Layer 3 DCI Instance.........................................................................................................................1964
1.9.7.31.2 Query the List of Layer 3 DCI Instances...................................................................................................... 1971
1.9.7.31.3 Query Layer 3 DCI Instances........................................................................................................................... 1974
1.9.7.31.4 Update a Layer 3 DCI Instance....................................................................................................................... 1976
1.9.7.31.5 Delete a Layer 3 DCI Instance.........................................................................................................................1979
1.9.7.32 QoS Management.................................................................................................................................................. 1980
1.9.7.32.1 Create a QoS Entry............................................................................................................................................. 1981
1.9.7.32.2 Query All QoS Information.............................................................................................................................. 1985
1.9.7.32.3 Update QoS Information.................................................................................................................................. 1990
1.9.7.32.4 Delete QoS Information.................................................................................................................................... 1993
1.9.7.32.5 Create a Classifier................................................................................................................................................1995
1.9.7.32.6 Query All Classifier Information..................................................................................................................... 1997
1.9.7.32.7 Update Classifier Information......................................................................................................................... 2001
1.9.7.32.8 Delete Classifier Information...........................................................................................................................2003
1.9.7.33 BFD Session Management................................................................................................................................... 2005
1.9.7.33.1 Create a BFD Session......................................................................................................................................... 2005
1.9.7.33.2 Query the BFD Session List.............................................................................................................................. 2012
1.9.7.33.3 Query a BFD Session.......................................................................................................................................... 2020
1.9.7.33.4 Update a BFD Session........................................................................................................................................2022
1.9.7.33.5 Delete a BFD Session......................................................................................................................................... 2025
1.9.7.33.6 Query BFD Session Running Status.............................................................................................................. 2027
1.9.7.34 BFD System Configuration Management.......................................................................................................2029
1.9.7.34.1 Create BFD System Configuration................................................................................................................. 2029
1.9.7.34.2 Query the BFD System Configuration List.................................................................................................. 2035
1.9.7.34.3 Query BFD System Configuration..................................................................................................................2041
1.9.7.34.4 Update BFD System Configuration............................................................................................................... 2043
1.9.7.34.5 Delete BFD System Configuration................................................................................................................. 2045
1.9.7.34.6 Add a Device to BFD System Configuration.............................................................................................. 2047
1.9.7.34.7 Remove a Device from BFD System Configuration................................................................................. 2049
1.9.7.35 BGP Configuration and Management............................................................................................................. 2051
1.9.7.35.1 Create BGP Configuration................................................................................................................................ 2051
1.9.7.35.2 Query BGP Configurations............................................................................................................................... 2059
1.9.7.35.3 Query BGP Configurations by ID................................................................................................................... 2066
1.9.7.35.4 Update BGP Configurations............................................................................................................................. 2068
1.9.7.35.5 Delete BGP Configurations.............................................................................................................................. 2070
1.9.7.36 VMM Management................................................................................................................................................ 2072
1.9.7.36.1 VMM Port Group................................................................................................................................................. 2072
1.9.7.36.2 VMM QoS Profile.................................................................................................................................................2089

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xvii


iMaster NCE-Fabric
API Development Guide Contents

1.9.7.36.3 VMM........................................................................................................................................................................ 2102


1.9.7.37 Reference Relationship Between External Services and Services on iMaster NCE-Fabric............. 2107
1.9.7.37.1 Create a Reference Relationship Between External Services and Services on iMaster NCE-Fabric
....................................................................................................................................................................................................... 2107
1.9.7.37.2 Delete the Reference Relationship Between External Services and Services on iMaster NCE-
Fabric........................................................................................................................................................................................... 2110
1.9.7.37.3 Query the Reference Relationship Between External Services and Services on iMaster NCE-
Fabric........................................................................................................................................................................................... 2112
1.9.8 MDC.................................................................................................................................................................................. 2115
1.9.8.1 Manage Edge Ports.................................................................................................................................................. 2115
1.9.8.1.1 Query Edge Ports that Meet Specified Conditions..................................................................................... 2115
1.9.8.1.2 Query the Edge Port with a Specified ID.......................................................................................................2121
1.9.8.2 Interconnection Interface....................................................................................................................................... 2123
1.9.8.2.1 Create a Single Interconnection Interface..................................................................................................... 2124
1.9.8.2.2 Query All Interconnected Interfaces............................................................................................................... 2142
1.9.8.2.3 Query Interconnection Interfaces by ID......................................................................................................... 2147
1.9.8.2.4 Update Interconnection Interface by Name................................................................................................. 2150
1.9.8.2.5 Delete an Interconnection Interface Based on the ID...............................................................................2154
1.9.8.3 Maintenance............................................................................................................................................................... 2157
1.9.8.3.1 Query the Logical VAS Associated with a Router.......................................................................................2157
1.9.8.3.2 Query Vaspools Based on Specified Conditions.......................................................................................... 2163
1.9.8.4 TransitRouter...............................................................................................................................................................2168
1.9.8.4.1 Create a Single Transit Router...........................................................................................................................2169
1.9.8.4.2 Query All Transit Routers.................................................................................................................................... 2181
1.9.8.4.3 Query a Transit Router Based on the ID........................................................................................................ 2184
1.9.8.4.4 Update a Transit Router...................................................................................................................................... 2186
1.9.8.4.5 Delete a Transit Router Based on the ID....................................................................................................... 2189
1.9.8.5 Transit VPC...................................................................................................................................................................2192
1.9.8.5.1 Create a Transit VPC............................................................................................................................................. 2192
1.9.8.5.2 Query All Transit VPCs......................................................................................................................................... 2198
1.9.8.5.3 Query a Transit VPC by VPC ID......................................................................................................................... 2200
1.9.8.5.4 Update a Transit VPC............................................................................................................................................2203
1.9.8.5.5 Delete a Transit VPC Based on the VPC ID................................................................................................... 2206
1.9.8.6 VpcConnect.................................................................................................................................................................. 2208
1.9.8.6.1 Create a VPC Interworking Connection..........................................................................................................2208
1.9.8.6.2 Query the VPC Interworking List...................................................................................................................... 2230
1.9.8.6.3 Query a VPC Interworking Connection by ID.............................................................................................. 2233
1.9.8.6.4 Update a VPC Interworking Connection Based on the ID....................................................................... 2236
1.9.8.6.5 Delete the VPC Interworking ID....................................................................................................................... 2239
1.9.8.7 East-west Traffic Application................................................................................................................................ 2242
1.9.8.7.1 Create a Single East-West Traffic Application............................................................................................. 2242
1.9.8.7.2 Query All East-West Traffic Applications.......................................................................................................2262
1.9.8.7.3 Delete East-West Traffic Applications in Batches Based on the IDS....................................................2270

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xviii


iMaster NCE-Fabric
API Development Guide Contents

1.9.8.7.4 Query East-West Traffic Applications by ID................................................................................................. 2272


1.9.8.7.5 Update East-West Traffic Applications...........................................................................................................2275
1.9.8.7.6 Delete East-West Traffic Applications Based on IDs................................................................................. 2278
1.9.8.8 FgwIpLink..................................................................................................................................................................... 2280
1.9.8.8.1 Create an Interconnection Relationship Between a Fabric Gateway and NCE (IP Domain).......2281
1.9.8.8.2 Query the Interconnection Relationship Between a Fabric Gateway and NCE (IP Domain)...... 2291
1.9.8.8.3 Query the Interconnection Relationship Between a Fabric Gateway and NCE (IP Domain) by ID
....................................................................................................................................................................................................... 2293
1.9.8.8.4 Update the Interconnection Between a Fabric Gateway and NCE (IP Domain) by ID................. 2295
1.9.8.8.5 Delete the Interconnection Between a Fabric Gateway and NCE (IP Domain) by ID................... 2298
1.9.8.8.6 Delete Interconnections Between Fabric Gateways and NCE (IP Domain) in Batches................. 2300
1.9.8.9 TrafficAppPolicy......................................................................................................................................................... 2303
1.9.8.9.1 Create a Single Application Group Policy...................................................................................................... 2303
1.9.8.9.2 Query the Application Group Policy List........................................................................................................2313
1.9.8.9.3 Query an Application Group Policy by ID..................................................................................................... 2317
1.9.8.9.4 Update the Application Group Policy Based on the ID............................................................................ 2320
1.9.8.9.5 Delete an Application Group Policy Based on the ID................................................................................2323
1.9.8.9.6 Delete Application Group Policies in Batches.............................................................................................. 2326
1.9.8.9.7 Query the Application Group Policy in Flat Mode Based on the Interconnection Relationship ID.
....................................................................................................................................................................................................... 2330
1.9.9 Multicast VPC (IPv4)....................................................................................................................................................2336
1.9.9.1 Multicast ACL..............................................................................................................................................................2336
1.9.9.1.1 Create Multicast ACLs.......................................................................................................................................... 2336
1.9.9.1.2 Query All Multicast ACLs.................................................................................................................................... 2339
1.9.9.1.3 Query a Multicast ACL by ID............................................................................................................................. 2344
1.9.9.1.4 Update a Multicast ACL.......................................................................................................................................2345
1.9.9.1.5 Delete a Multicast ACL by ID.............................................................................................................................2348
1.9.9.1.6 Create Multicast ACL Rules................................................................................................................................ 2349
1.9.9.1.7 Delete a Multicast ACL by ID.............................................................................................................................2351
1.9.9.2 Query a Layer 3 Multicast Service on a Logical Interface by ID...............................................................2353
1.9.9.2.1 Create a Layer 3 Multicast Service on a Logical Interface...................................................................... 2353
1.9.9.2.2 Query Layer 3 Multicast Services on All Logical Interfaces.................................................................... 2360
1.9.9.2.3 Query a Layer 3 Multicast Service on a Logical Interface by ID........................................................... 2369
1.9.9.2.4 Update a Layer 3 Multicast Service on a Logical Interface by ID......................................................... 2371
1.9.9.2.5 Delete a Layer 3 Multicast Service on a Logical Interface by ID.......................................................... 2375
1.9.9.3 L3 Multicast Serviceon Logical Router...............................................................................................................2376
1.9.9.3.1 Create Layer 3 Multicast Services on a Logical Router............................................................................ 2376
1.9.9.3.2 Query Layer 3 Multicast Services on All Logical Routers........................................................................ 2381
1.9.9.3.3 Query a Layer 3 Multicast Service by ID on a Logical Router............................................................... 2387
1.9.9.3.4 Query a Layer 3 Multicast Service by ID on a Logical Router............................................................... 2389
1.9.9.3.5 Delete a Layer 3 Multicast Service by ID from a Logical Router.......................................................... 2392
1.9.9.4 Multicast Replication Address of BUM Packet................................................................................................ 2393
1.9.9.4.1 Create Multicast Replication Addresses of BUM Packets........................................................................ 2394

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xix


iMaster NCE-Fabric
API Development Guide Contents

1.9.9.4.2 Query All Multicast Replication Addresses of BUM Packets...................................................................2397


1.9.9.4.3 Query Multicast Replication Address Details of BUM Packets by ID...................................................2401
1.9.9.4.4 Update Multicast Replication Addresses of BUM Packets by ID........................................................... 2403
1.9.9.4.5 Delete Multicast Replication Addresses of BUM Packets by ID.............................................................2405
1.9.9.5 Multicast Service on Logical Port........................................................................................................................ 2407
1.9.9.5.1 Create Multicast Services on a Logical Port................................................................................................. 2407
1.9.9.5.2 Query Multicast Services on All Logical Ports............................................................................................. 2411
1.9.9.5.3 Query a Multicast Service by ID on a Logical Port.................................................................................... 2416
1.9.9.5.4 Update a Multicast Service by ID on a Logical Port.................................................................................. 2418
1.9.9.5.5 Delete a Multicast Service by ID from a Logical Port............................................................................... 2421
1.9.9.6 MSDP............................................................................................................................................................................. 2422
1.9.9.6.1 Create an MSDP Entry......................................................................................................................................... 2423
1.9.9.6.2 Query an MSDP List.............................................................................................................................................. 2430
1.9.9.6.3 Query MSDP Entries............................................................................................................................................. 2438
1.9.9.6.4 Update MSDP Entries........................................................................................................................................... 2440
1.9.9.6.5 Delete MSDP Entries.............................................................................................................................................2443
1.9.9.7 Service Function Chain............................................................................................................................................ 2444
1.9.9.7.1 End Point Group (EPG)........................................................................................................................................ 2444
1.9.9.7.2 SF Type...................................................................................................................................................................... 2463
1.9.9.7.3 SFC Template...........................................................................................................................................................2465
1.9.9.7.4 SFC Application Instance..................................................................................................................................... 2476
1.9.9.7.5 SFC Application Instance..................................................................................................................................... 2491
1.9.10 Service Function Chain............................................................................................................................................. 2507
1.9.10.1 End Point Group (EPG)......................................................................................................................................... 2507
1.9.10.1.1 Create an EPG....................................................................................................................................................... 2507
1.9.10.1.2 Query EPGs............................................................................................................................................................ 2515
1.9.10.1.3 Query the EPG VMM.......................................................................................................................................... 2518
1.9.10.1.4 Query an EPG by ID............................................................................................................................................ 2521
1.9.10.1.5 Update an EPG..................................................................................................................................................... 2523
1.9.10.1.6 Delete an EPG by ID........................................................................................................................................... 2526
1.9.10.2 SF Type....................................................................................................................................................................... 2527
1.9.10.2.1 Query All SF Types Supported by the Controller......................................................................................2527
1.9.10.3 SFC Template............................................................................................................................................................ 2529
1.9.10.3.1 Create an SFC (Template)................................................................................................................................ 2530
1.9.10.3.2 Query SFCs (Templates)....................................................................................................................................2533
1.9.10.3.3 Query an SFC (Template) by ID..................................................................................................................... 2537
1.9.10.3.4 Delete an SFC (Template) by ID.................................................................................................................... 2539
1.9.10.4 SFC Policy.................................................................................................................................................................. 2541
1.9.10.4.1 Create an SFC Policy...........................................................................................................................................2541
1.9.10.4.2 Query SFC Policies...............................................................................................................................................2554
1.9.10.4.3 Query SFC Policies...............................................................................................................................................2563
1.9.10.4.4 Update an SFC by ID.......................................................................................................................................... 2566

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xx


iMaster NCE-Fabric
API Development Guide Contents

1.9.10.4.5 Delete an SFC Policy by ID............................................................................................................................... 2569


1.9.10.5 SFC Application Instance...................................................................................................................................... 2571
1.9.10.5.1 Create an SFC Application Instance.............................................................................................................. 2571
1.9.10.5.2 Query SFC Application Instances................................................................................................................... 2599
1.9.10.5.3 Query an SFC Application Instance by ID................................................................................................... 2602
1.9.10.5.4 Update an SFC Application Instance by ID.................................................................................................2605
1.9.10.5.5 Delete an SFC Application Instance by ID.................................................................................................. 2608
1.9.11 OAM................................................................................................................................................................................ 2610
1.9.11.1 Connectivity Detection Task Management.................................................................................................... 2610
1.9.11.1.1 Create a Connectivity Detection Task...........................................................................................................2610
1.9.11.1.2 Query All Connectivity Detection Tasks.......................................................................................................2614
1.9.11.1.3 Delete a Connectivity Detection Task by ID............................................................................................... 2618
1.9.11.1.4 Query a Connectivity Detection Task........................................................................................................... 2619
1.9.11.2 One-Click Emergency Plan.................................................................................................................................. 2621
1.9.11.2.1 Create an Atomic Template............................................................................................................................. 2621
1.9.11.2.2 Query Atomic Templates.................................................................................................................................. 2631
1.9.11.2.3 Query an Atomic Template.............................................................................................................................. 2633
1.9.11.2.4 Update an Atomic Template........................................................................................................................... 2635
1.9.11.2.5 Delete an Atomic Template............................................................................................................................. 2638
1.9.11.2.6 Execute an Atomic Template........................................................................................................................... 2639
1.9.11.2.7 Create an Integrated Template.......................................................................................................................2644
1.9.11.2.8 Query Integrated Templates............................................................................................................................ 2649
1.9.11.2.9 Query an Integrated Template....................................................................................................................... 2651
1.9.11.2.10 Update an Integrated Template.................................................................................................................. 2653
1.9.11.2.11 Delete an Integrated Template.................................................................................................................... 2655
1.9.11.2.12 Execute an Integrated Template.................................................................................................................. 2656
1.9.11.2.13 Query Historical Operations..........................................................................................................................2660
1.9.11.2.14 Roll Back Historical Operations................................................................................................................... 2663
1.9.11.3 Physical Port Traffic Statistics.............................................................................................................................2664
1.9.11.3.1 Physical Port Traffic Statistics......................................................................................................................... 2665
1.9.11.3.2 Query Port Traffic Statistics............................................................................................................................. 2667
1.9.11.4 Path Detection......................................................................................................................................................... 2671
1.9.11.4.1 Create a Single-Path Detection Task............................................................................................................ 2671
1.9.11.4.2 Stop a Single-Path Detection Task................................................................................................................ 2676
1.9.11.4.3 Query the Result of a Single-Path Detection Task by ID.......................................................................2678
1.9.11.4.4 Create a Multi-Path Detection Task..............................................................................................................2684
1.9.11.4.5 Enable Path Detection....................................................................................................................................... 2689
1.9.11.5 Flow Blocking Management............................................................................................................................... 2691
1.9.11.5.1 Create a Flow Blocking Policy......................................................................................................................... 2691
1.9.11.5.2 Delete a Flow Blocking Policy by ID............................................................................................................. 2696
1.9.11.5.3 Query a Flow Blocking Policy by ID.............................................................................................................. 2698
1.9.11.6 Edge Intelligent Network Traffic Analysis...................................................................................................... 2701

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxi


iMaster NCE-Fabric
API Development Guide Contents

1.9.11.6.1 Configure TCP_UDP Flow Analysis Rules.................................................................................................... 2701


1.9.11.6.2 Configure TCP_UDP Flow Analysis Packets................................................................................................ 2706
1.9.11.7 Devm Device Management................................................................................................................................. 2710
1.9.11.7.1 Query the Administrative Status and Optical Information of a Port................................................ 2710
1.9.11.8 Device Configurations........................................................................................................................................... 2714
1.9.11.8.1 Query Device Configurations.......................................................................................................................... 2714
1.9.11.9 resource info Apis................................................................................................................................................... 2716
1.9.11.9.1 Obtain Resource Information.......................................................................................................................... 2716
1.9.11.10 Manage Logical Switchand Router Health Status.................................................................................... 2719
1.9.11.10.1 Query the Health Status of a Logical Switch.......................................................................................... 2719
1.9.11.10.2 Query the Health Status of a Logical Router..........................................................................................2722
1.9.11.11 Asset Synchronization Interface...................................................................................................................... 2724
1.9.11.11.1 Query the List Information............................................................................................................................ 2724
1.9.11.12 Alarm Management............................................................................................................................................ 2727
1.9.11.12.1 Reporting Alarms or Events...........................................................................................................................2727
1.9.11.12.2 Reporting Alarm Definitions......................................................................................................................... 2741
1.9.11.12.3 Deleting Alarm Definitions............................................................................................................................ 2745
1.9.11.12.4 Reporting Possible Causes and Troubleshooting Suggestions of an Alarm..................................2747
1.9.11.12.5 Deleting Possible Causes and Troubleshooting Suggestions of an Alarm.................................... 2750
1.9.11.12.6 Submitting an Alarm Operation Task........................................................................................................ 2752
1.9.11.12.7 Canceling an Alarm Operation Task...........................................................................................................2762
1.9.11.12.8 Querying the Progress of an Alarm Operation.......................................................................................2763
1.9.11.12.9 Querying Serial Numbers of Current Alarms.......................................................................................... 2766
1.9.11.12.10 Querying Current Alarms by Serial Numbers....................................................................................... 2774
1.9.11.12.11 Querying Current Alarms in Batches....................................................................................................... 2788
1.9.11.12.12 Querying Serial Numbers of Historical Alarms.................................................................................... 2795
1.9.11.12.13 Querying Historical Alarms by Serial Numbers................................................................................... 2802
1.9.11.12.14 Querying an Alarm Definition List........................................................................................................... 2816
1.9.11.13 Performance Management............................................................................................................................... 2823
1.9.11.13.1 Querying Monitoring Resources.................................................................................................................. 2823
1.9.11.13.2 Creating a Real-Time Performance Task (Only Compatible with V300R010 and Earlier
Versions)..................................................................................................................................................................................... 2828
1.9.11.13.3 Creating a Real-Time Performance Task................................................................................................... 2837
1.9.11.13.4 Deleting a Real-Time Performance Task................................................................................................... 2843
1.9.11.13.5 Querying Real-Time Performance Task Information............................................................................ 2846
1.9.11.13.6 Creating a Performance Monitoring Task (Only Compatible with V300R010 and Earlier
Versions)..................................................................................................................................................................................... 2853
1.9.11.13.7 Creating a Performance Monitoring Task................................................................................................ 2862
1.9.11.13.8 Deleting a Performance Monitoring Task................................................................................................ 2868
1.9.11.13.9 Querying Historical Data (by KPI ID; Only Compatible with V300R010 and Earlier Versions)
....................................................................................................................................................................................................... 2871
1.9.11.13.10 Querying Historical Data (by KPI Key; Only Compatible with V300R010 and Earlier Versions)
....................................................................................................................................................................................................... 2880

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxii


iMaster NCE-Fabric
API Development Guide Contents

1.9.11.13.11 Querying Historical Data............................................................................................................................. 2890


1.9.11.13.12 Querying Measurement Objects (Only Compatible with V300R010 and Earlier Versions). 2898
1.9.11.14 Network-wide Snapshot.....................................................................................................................................2901
1.9.11.14.1 Create a Network-wide Snapshot............................................................................................................... 2901
1.9.11.14.2 Query All Backup Snapshots......................................................................................................................... 2905
1.9.11.14.3 Query the Progress of a Specified Network-wide Snapshot Generation Task............................. 2907
1.9.11.14.4 Delete a Network-wide Snapshot............................................................................................................... 2912
1.9.11.14.5 Perform a Network-wide Rollback.............................................................................................................. 2914
1.9.11.14.6 Query All Rollback Tasks................................................................................................................................ 2916
1.9.11.14.7 Query the Progress of a Network-wide Rollback Task.........................................................................2918
1.9.11.14.8 Retry Network Device Configuration Rollback....................................................................................... 2920
1.9.11.14.9 Retry the Rollback of the Controller Database...................................................................................... 2923
1.9.11.14.10 Query All Historical Operation Records..................................................................................................2925
1.9.11.14.11 Query Historical Records..............................................................................................................................2927
1.9.11.15 VSwitch Diagnosis Interface............................................................................................................................. 2929
1.9.11.15.1 Query Commands Supported by the CE1800V Based on Conditions............................................. 2929
1.9.11.15.2 Run the Following Command on the CE1800V to Check the Command Output...................... 2933
1.9.11.16 gRPC Configuration on vSwitches.................................................................................................................. 2935
1.9.11.16.1 Create gRPC Service Configurations........................................................................................................... 2936
1.9.11.16.2 Update gRPC Service Configurations......................................................................................................... 2940
1.9.11.16.3 Query gRPC Service Configurations in Batches...................................................................................... 2942
1.9.11.16.4 Delete gRPC Service Configurations in Batches..................................................................................... 2946
1.9.11.17 ExternalSystemConnectionService.................................................................................................................. 2948
1.9.11.17.1 Provide Registration Subscription Information for Third-Party Systems....................................... 2948
1.9.11.17.2 Update Registration Subscription Information for Third-Party Systems....................................... 2951
1.9.11.17.3 Delete All Subscription Information About Third-Party Systems..................................................... 2952
1.9.11.17.4 Obtain Connectivity Detection Information............................................................................................ 2954
1.9.11.18 Underlay Configuration...................................................................................................................................... 2955
1.9.11.18.1 Eth-Trunk Configuration................................................................................................................................. 2955
1.9.11.18.2 Port Configuration............................................................................................................................................ 2989
1.9.11.18.3 BatchConfiguration.......................................................................................................................................... 2991
1.9.11.18.4 Underlay OSFP Routing Protocol................................................................................................................ 2994
1.9.11.18.5 Physical Port Configuration........................................................................................................................... 2998
1.9.11.18.6 Command Configuration Template............................................................................................................ 3004
1.9.12 System Configuration............................................................................................................................................... 3013
1.9.12.1 Northbound Interface............................................................................................................................................3013
1.9.12.1.1 Subscribing to Notifications.............................................................................................................................3013
1.9.12.1.2 Canceling the Notification Subscription...................................................................................................... 3018
1.9.12.1.3 Subscribing To Extended Notifications.........................................................................................................3022
1.9.12.1.4 Canceling the Extended Notification Subscription.................................................................................. 3026
1.9.12.1.5 Querying Subscription Information...............................................................................................................3030
1.9.12.1.6 Subscribing to WebSocket Information Flows.......................................................................................... 3033

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxiii


iMaster NCE-Fabric
API Development Guide Contents

1.9.12.1.7 Querying WebSocket Subscription Information....................................................................................... 3035


1.9.12.2 Query Details About the Northbound Floating IP Address of the Active and Standby Clusters 3036
1.9.12.2.1 Query Details About the Northbound Floating IP Address of the Active and Standby Clusters
....................................................................................................................................................................................................... 3037
1.9.12.3 System Information and Product Information Interface........................................................................... 3038
1.9.12.3.1 Obtain System and Product Information.................................................................................................... 3039
1.9.12.4 NetconfClient Northbound API.......................................................................................................................... 3042
1.9.12.4.1 Change the NETCONF User Name and Password................................................................................... 3042
1.9.13 Intent Management.................................................................................................................................................. 3044
1.9.13.1 Fault Rectification................................................................................................................................................... 3045
1.9.13.1.1 Report an Issue.................................................................................................................................................... 3045
1.9.13.1.2 Query Issues.......................................................................................................................................................... 3049
1.9.13.1.3 Query an Issue by ID.......................................................................................................................................... 3053
1.9.13.1.4 Update an Issue by ID....................................................................................................................................... 3055
1.9.13.1.5 Use Ansible to Deliver Configurations to Multiple Devices.................................................................. 3057
1.9.13.2 NAEService................................................................................................................................................................ 3060
1.9.13.2.1 Obtain an End Port............................................................................................................................................. 3060
1.9.13.2.2 Obtain an External Gateway........................................................................................................................... 3063
1.9.13.2.3 Modify the Network Link Change Flag....................................................................................................... 3066
1.9.13.2.4 Query the Network Link Change Flag......................................................................................................... 3067
1.9.13.2.5 Query Device Links on Domain AC by Device ID..................................................................................... 3068
1.9.13.2.6 Get device information (device id, device attribute routerId, vtepIp, etc.)......................................3071
1.9.13.2.7 Obtain the Underlay Network Device Configuration............................................................................. 3073
1.9.13.2.8 Import Configurations to Create a Verification Network...................................................................... 3074
1.9.13.2.9 Import Configurations to Create a What-if Verification Network..................................................... 3077
1.9.13.2.10 Select the Fabric for Which a Verification Network Model Is to Be Created...............................3081
1.9.13.2.11 Query Verification Network Models...........................................................................................................3082
1.9.13.2.12 Delete Verification Network Models.......................................................................................................... 3085
1.9.13.2.13 Export CLI Configuration Data, Version Number, and CPV Model Data....................................... 3086
1.9.13.2.14 Import CLI Configuration Data, Version Number, and CPV Model Data.......................................3089
1.9.13.2.15 Upload Configuration Data for Interconnection Between DCs to the CPV.................................. 3094
1.9.13.2.16 Upload all VPC Configuration Data............................................................................................................3103
1.9.13.3 Network Authentication Request Interface................................................................................................... 3107
1.9.13.3.1 Check Network Connectivity Before and After Overlay Simulation Changes................................ 3107
1.9.13.4 NAE Validation Service......................................................................................................................................... 3119
1.9.13.4.1 Create a Simulation Task.................................................................................................................................. 3119
1.9.13.4.2 Orchestrate a Simulation Task........................................................................................................................ 3123
1.9.13.4.3 Query Simulation Task Details....................................................................................................................... 3125
1.9.13.4.4 Query Configuration and Resources............................................................................................................. 3127
1.9.13.4.5 Delete a Simulation Task.................................................................................................................................. 3131
1.9.13.4.6 Query Simulation Task Details Based on the Task ID.............................................................................3132
1.9.14 Platform Interface...................................................................................................................................................... 3134
1.9.14.1 Resource and Relationship Management.......................................................................................................3134

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxiv


iMaster NCE-Fabric
API Development Guide Contents

1.9.14.1.1 Report All Resource and Relationship Data............................................................................................... 3134


1.9.14.1.2 Report Resource or Relationship Changes..................................................................................................3139
1.9.14.1.3 Querying All Instances of a Specified resource Type.............................................................................. 3144
1.9.14.1.4 Query the Number of Instances of a Specified resource Type............................................................ 3151
1.9.14.1.5 Query a Resource Instance.............................................................................................................................. 3154
1.9.14.1.6 Query All Instances of a Type of Relationships by Criteria...................................................................3156
1.9.14.1.7 Query the Number of Instances for a Type Relationship Meeting Criteria.....................................3164
1.9.14.1.8 Query the Instances in a Resource Relationship...................................................................................... 3166
1.9.14.1.9 Run a Graph Query Statement....................................................................................................................... 3168
1.9.14.1.10 Run a graph query statement in replicas................................................................................................. 3171
1.9.14.2 Digital Twin Engine (DTE) Model Management..........................................................................................3173
1.9.14.2.1 Querying Metadata of a Resource Type...................................................................................................... 3173
1.9.14.2.2 Querying Metadata of a Relationship Type............................................................................................... 3175
1.9.14.3 Federated Resource Management.................................................................................................................... 3176
1.9.14.3.1 Adding a Target System.................................................................................................................................... 3177
1.9.14.3.2 (Unavailable)Deleting Target Systems........................................................................................................ 3179
1.9.14.3.3 Starting data synchronization......................................................................................................................... 3181
1.9.14.4 Entity Resource Northbound APIs..................................................................................................................... 3183
1.9.14.4.1 Querying Subrack Resources By Condition.................................................................................................3183
1.9.14.4.2 Querying Optical Port Resources By Condition........................................................................................ 3192
1.9.14.4.3 Querying Port Resources By Condition........................................................................................................ 3196
1.9.14.4.4 Querying Board Resources By Condition.....................................................................................................3207
1.9.14.4.5 Querying Subcard Resources By Condition................................................................................................ 3218
1.9.14.5 Interface Management Northbound APIs...................................................................................................... 3228
1.9.14.5.1 Synchronizing Device Interface Resources.................................................................................................. 3228
1.9.14.5.2 Querying the Interface Synchronization Task Progress..........................................................................3230
1.9.14.5.3 Querying Interface Resources by Condition (Recommended).............................................................3234
1.9.14.5.4 Querying Interface Resources by Condition (Compatible with Earlier Versions)..........................3250
1.9.14.6 DriverMgmt.............................................................................................................................................................. 3259
1.9.14.6.1 Querying Basic Information About a Peer System.................................................................................. 3259
1.9.14.6.2 Adding a Peer System........................................................................................................................................ 3261
1.9.14.6.3 Querying a Peer System....................................................................................................................................3270
1.9.14.6.4 Deleting a Peer System..................................................................................................................................... 3273
1.9.14.6.5 Adding a Domain-IP Address Mapping Relationship..............................................................................3274
1.9.14.6.6 Querying a Domain-IP Address Mapping Relationship..........................................................................3276
1.9.14.6.7 Deleting a Domain-IP Address Mapping Relationship........................................................................... 3278
1.9.14.6.8 Querying Basic Information About Peer Systems.................................................................................... 3280
1.9.14.6.9 Registering Driver Instances (New).............................................................................................................. 3282
1.9.14.6.10 Registering Driver Instances.......................................................................................................................... 3286
1.9.14.6.11 Querying nativeId and systemId of a Peer System............................................................................... 3290
1.9.14.7 Northbound Data Subscription Management.............................................................................................. 3292
1.9.14.7.1 Adding Data Subscription Requests.............................................................................................................. 3293

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxv


iMaster NCE-Fabric
API Development Guide Contents

1.9.14.7.2 Querying Subscription Request Information in Batches........................................................................ 3296


1.9.14.7.3 Deleting Data Subscription Requests........................................................................................................... 3298
1.9.14.8 Intent Engine............................................................................................................................................................ 3299
1.9.14.8.1 Create a Service................................................................................................................................................... 3300
1.9.14.8.2 Query All Services............................................................................................................................................... 3308
1.9.14.8.3 Query a Service.................................................................................................................................................... 3317
1.9.14.8.4 Overwrite All Attributes of a Service............................................................................................................ 3320
1.9.14.8.5 Incrementally Modify Some Attributes of a Service................................................................................3323
1.9.14.8.6 Delete a Service................................................................................................................................................... 3326
1.9.14.8.7 Query the Implementation of a Service...................................................................................................... 3328
1.9.14.8.8 Query Service Implementation Nodes in Batches....................................................................................3334
1.9.14.8.9 Query a Request.................................................................................................................................................. 3338
1.9.14.8.10 Retry...................................................................................................................................................................... 3340
1.9.14.8.11 Roll Back.............................................................................................................................................................. 3343
1.9.14.8.12 Synchronize Service Running Status from Controllers/NEs and Check Whether Service
Configurations Are Consistent............................................................................................................................................ 3345
1.9.14.8.13 Synchronize Services to Lower-Layer Controllers/NEs......................................................................... 3350
1.9.14.8.14 Synchronize Services from Lower-Layer Controllers/NEs.................................................................... 3353
1.9.14.8.15 Execute an RPC Request for a Service....................................................................................................... 3355
1.9.14.8.16 Query the Status of an RPC Request......................................................................................................... 3359
1.9.14.9 Configuration File Management....................................................................................................................... 3363
1.9.14.9.1 Import files over the northbound interface............................................................................................... 3363
1.9.14.9.2 Querying All Configuration File Changes................................................................................................... 3367
1.9.14.10 Querying WebSocket Subscription Information........................................................................................ 3371
1.9.14.11 Device Group Management.............................................................................................................................. 3373
1.9.14.11.1 Create a Device Group.................................................................................................................................... 3373
1.9.14.11.2 Delete a Device Group.................................................................................................................................... 3375
1.9.14.11.3 Query All Device Groups................................................................................................................................ 3377
1.9.14.11.4 Query a Device Group..................................................................................................................................... 3380
1.9.14.11.5 Add a Device to a Device Group..................................................................................................................3383
1.9.14.11.6 Delete a Device from a Device Group....................................................................................................... 3386
1.9.14.11.7 Add a Sub Device Group to a Device Group........................................................................................... 3388
1.9.14.11.8 Delete a Sub Device Group from a Device Group................................................................................. 3391
1.9.15 Runbook........................................................................................................................................................................ 3393
1.9.15.1 Runbook Incremental Configuration................................................................................................................3393
1.9.15.1.1 Query Incremental Configurations of a Runbook Instance or a Specified Action Node
(Aggregation Query for Sub-action Nodes Is Supported)........................................................................................ 3393
1.10 Status Code...................................................................................................................................................................... 3397
1.11 Acronyms and Abbreviations..................................................................................................................................... 3398

2 Restconf API Reference....................................................................................................3399


2.1 Neutron............................................................................................................................................................................... 3399
2.1.1 Security Group............................................................................................................................................................... 3399
2.1.1.1 Create a Security Group.......................................................................................................................................... 3399

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxvi


iMaster NCE-Fabric
API Development Guide Contents

2.1.1.2 Query Security Groups............................................................................................................................................ 3403


2.1.1.3 Query a Security Group by Name....................................................................................................................... 3406
2.1.1.4 Update a Security Group by Name..................................................................................................................... 3408
2.1.1.5 Deleting a Security Group by Name...................................................................................................................3410
2.1.2 ExternalPolicyGroup.....................................................................................................................................................3411
2.1.2.1 Create an ExternalPolicyGroup............................................................................................................................. 3411
2.1.2.2 Query the External Policy Group List................................................................................................................. 3415
2.1.2.3 External Policy Group Query by Name.............................................................................................................. 3419
2.1.2.4 Update an External Policy Group by Name..................................................................................................... 3421
2.1.2.5 External Policy Group Deletion by Name......................................................................................................... 3423
2.1.3 PolicyTargetGroup........................................................................................................................................................ 3425
2.1.3.1 Create a Policy Target Group................................................................................................................................ 3425
2.1.3.2 Query the Policy Target Group List..................................................................................................................... 3430
2.1.3.3 Policy Target Group Query by Name................................................................................................................. 3434
2.1.3.4 Update a Policy Target Group by Name........................................................................................................... 3436
2.1.3.5 Policy Target Group Deletion by Name............................................................................................................. 3438
2.1.4 IPsec Connection........................................................................................................................................................... 3440
2.1.4.1 Create IPsec Connection......................................................................................................................................... 3440
2.1.4.2 Query IPsec Connection List.................................................................................................................................. 3450
2.1.4.3 Query an IPsec Connection Based on the ID................................................................................................... 3456
2.1.4.4 Update an IPsec Connection Based on the ID.................................................................................................3458
2.1.4.5 Delete an IPsec Connection Based on the ID.................................................................................................. 3461
2.1.5 Security Group Rules................................................................................................................................................... 3462
2.1.5.1 Create a Security Rule............................................................................................................................................. 3462
2.1.5.2 Query Security Rules................................................................................................................................................ 3468
2.1.5.3 Query a Security Rule by Name........................................................................................................................... 3472
2.1.5.4 Delete a Security Rule by Name.......................................................................................................................... 3474
2.1.6 Floating IP Address...................................................................................................................................................... 3476
2.1.6.1 Create a Floating IP Address................................................................................................................................. 3476
2.1.6.2 Query the Floating IP Address List...................................................................................................................... 3481
2.1.6.3 Query a Floating IP Address by Name...............................................................................................................3485
2.1.6.4 Update a Floating IP Address Based on the Name....................................................................................... 3487
2.1.6.5 Delete a Floating IP Address by Name.............................................................................................................. 3489
2.1.7 PolicyClassifier............................................................................................................................................................... 3491
2.1.7.1 Create a Policy Classifier......................................................................................................................................... 3491
2.1.7.2 Query the Policy Classifier List............................................................................................................................. 3496
2.1.7.3 Query Policy Classifiers by Name........................................................................................................................ 3499
2.1.7.4 Update a Policy Classifier by Name.................................................................................................................... 3501
2.1.7.5 Delete Policy Classifier by Name......................................................................................................................... 3503
2.1.8 Port.................................................................................................................................................................................... 3505
2.1.8.1 Creating a port........................................................................................................................................................... 3505
2.1.8.2 Query the Port List................................................................................................................................................... 3519

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxvii


iMaster NCE-Fabric
API Development Guide Contents

2.1.8.3 Query a Port by Name............................................................................................................................................ 3529


2.1.8.4 Update Port by Name.............................................................................................................................................. 3532
2.1.8.5 Delete a Port by Name............................................................................................................................................3535
2.1.9 VPNService...................................................................................................................................................................... 3537
2.1.9.1 Create a VPN Service............................................................................................................................................... 3537
2.1.9.2 Query the VPN Service List.................................................................................................................................... 3542
2.1.9.3 Query VPN Service by Name.................................................................................................................................3546
2.1.9.4 Update VPN Service by Name.............................................................................................................................. 3548
2.1.9.5 Delete the VPN Service by Name........................................................................................................................ 3550
2.1.10 DNAT Interface........................................................................................................................................................... 3551
2.1.10.1 Create DNAT.............................................................................................................................................................3551
2.1.10.2 Query the DNAT List............................................................................................................................................. 3558
2.1.10.3 Query DNAT by Name.......................................................................................................................................... 3563
2.1.10.4 Update a DNAT Rule by Name.......................................................................................................................... 3565
2.1.10.5 Deleting a DNAT Rule by Name........................................................................................................................3567
2.1.11 Network......................................................................................................................................................................... 3569
2.1.11.1 Create a Network................................................................................................................................................... 3569
2.1.11.2 Query the Network List........................................................................................................................................ 3575
2.1.11.3 Query a Network by Name................................................................................................................................. 3580
2.1.11.4 Update a Network by Name...............................................................................................................................3582
2.1.11.5 Delete a Network by Name................................................................................................................................ 3585
2.1.12 IPsec policy................................................................................................................................................................... 3586
2.1.12.1 Create an IPsec Policy........................................................................................................................................... 3586
2.1.12.2 Query IPsec Policy List.......................................................................................................................................... 3591
2.1.12.3 Query an IPsec Policy by Name......................................................................................................................... 3594
2.1.12.4 Update an IPsec Policy by Name.......................................................................................................................3596
2.1.12.5 Delete an IPsec Policy by Name........................................................................................................................ 3599
2.1.13 VPC Communication................................................................................................................................................. 3600
2.1.13.1 Create VPC Communication................................................................................................................................ 3600
2.1.13.2 Query the VPC Interworking List....................................................................................................................... 3607
2.1.13.3 Query a VPC Interworking Connection by Name........................................................................................ 3611
2.1.13.4 Update a VPC Interworking Connection by Name......................................................................................3613
2.1.13.5 Delete a VPC Interworking Connection by Name....................................................................................... 3615
2.1.14 PolicyRule...................................................................................................................................................................... 3616
2.1.14.1 Create a Policy Rule............................................................................................................................................... 3617
2.1.14.2 Query a Policy Rule List........................................................................................................................................ 3621
2.1.14.3 Policy Rule Query by Name................................................................................................................................ 3624
2.1.14.4 Update a Policy Rule by Name.......................................................................................................................... 3626
2.1.14.5 Delete a Policy Rule by Name............................................................................................................................ 3628
2.1.15 Router............................................................................................................................................................................. 3630
2.1.15.1 Create a Router....................................................................................................................................................... 3630
2.1.15.2 Query a Router List................................................................................................................................................ 3638

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxviii


iMaster NCE-Fabric
API Development Guide Contents

2.1.15.3 Query a Router by Router ID.............................................................................................................................. 3644


2.1.15.4 Update a Router Based on the Router ID...................................................................................................... 3646
2.1.15.5 Delete a Router by Name.................................................................................................................................... 3648
2.1.16 BGP Route..................................................................................................................................................................... 3650
2.1.16.1 Create BGP Route................................................................................................................................................... 3650
2.1.16.2 Query the BGP Route List.................................................................................................................................... 3658
2.1.16.3 BGP Route Query by Name................................................................................................................................. 3663
2.1.16.4 Update BGP Route by Name.............................................................................................................................. 3665
2.1.16.5 Delete a BGP Route by Name............................................................................................................................ 3668
2.1.17 Qos.................................................................................................................................................................................. 3669
2.1.17.1 Create a QoS Policy................................................................................................................................................3669
2.1.17.2 Query the QoS List................................................................................................................................................. 3678
2.1.17.3 Query QoS by Name..............................................................................................................................................3684
2.1.17.4 Update QoS by Name........................................................................................................................................... 3686
2.1.17.5 Delete a QoS Policy by Name............................................................................................................................ 3688
2.1.18 Firewall.......................................................................................................................................................................... 3690
2.1.18.1 Create a Firewall..................................................................................................................................................... 3690
2.1.18.2 Query the Firewall List.......................................................................................................................................... 3695
2.1.18.3 Query a Firewall by Name...................................................................................................................................3699
2.1.18.4 Update a Firewall by Name................................................................................................................................ 3701
2.1.18.5 Delete a Firewall by Name.................................................................................................................................. 3703
2.1.19 Subnet............................................................................................................................................................................ 3705
2.1.19.1 Create Subnets......................................................................................................................................................... 3705
2.1.19.2 Query the Subnet List........................................................................................................................................... 3711
2.1.19.3 Query a Subnet by Name.................................................................................................................................... 3715
2.1.19.4 Update a Subnet by Name.................................................................................................................................. 3717
2.1.19.5 Delete a Subnet by Name....................................................................................................................................3720
2.1.20 FirewallPolicy............................................................................................................................................................... 3721
2.1.20.1 Create a Firewall Policy........................................................................................................................................ 3721
2.1.20.2 Query Firewall Policies.......................................................................................................................................... 3725
2.1.20.3 Query a Firewall Policy by Name...................................................................................................................... 3728
2.1.20.4 Update a Firewall Policy by Name................................................................................................................... 3730
2.1.20.5 Delete a Firewall Policy by Name..................................................................................................................... 3732
2.1.21 L2br................................................................................................................................................................................. 3734
2.1.21.1 Querying Product Version Information........................................................................................................... 3734
2.1.21.2 Create L2BRs.............................................................................................................................................................3736
2.1.21.3 Query the L2BR List............................................................................................................................................... 3741
2.1.21.4 Query L2BRs by Name.......................................................................................................................................... 3746
2.1.21.5 Update an L2BR by Name................................................................................................................................... 3748
2.1.21.6 Delete an L2BR by Name..................................................................................................................................... 3750
2.1.22 PolicyRuleset................................................................................................................................................................ 3752
2.1.22.1 Create a Policy Rule Set........................................................................................................................................3752

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxix


iMaster NCE-Fabric
API Development Guide Contents

2.1.22.2 Query a Policy Rule Set List................................................................................................................................ 3755


2.1.22.3 Policy Rule Set Query by Name......................................................................................................................... 3758
2.1.22.4 Update a Policy Rule Set by name................................................................................................................... 3760
2.1.22.5 Delete a Policy Rule Set by Name.................................................................................................................... 3762
2.1.23 Snat................................................................................................................................................................................. 3764
2.1.23.1 Create SNAT............................................................................................................................................................. 3764
2.1.23.2 Query the SNAT List.............................................................................................................................................. 3770
2.1.23.3 Query SNAT by Name........................................................................................................................................... 3774
2.1.23.4 Update the SNAT by Name................................................................................................................................. 3776
2.1.23.5 Delete SNAT by Name.......................................................................................................................................... 3778
2.1.24 Firewall Rules...............................................................................................................................................................3780
2.1.24.1 Create a Firewall Rule........................................................................................................................................... 3780
2.1.24.2 Query Firewall Rules.............................................................................................................................................. 3787
2.1.24.3 Query a Firewall Rule by Name.........................................................................................................................3791
2.1.24.4 Update a Firewall Rule by Name...................................................................................................................... 3793
2.1.24.5 Delete a Firewall Rule by Name........................................................................................................................ 3795
2.1.25 IKE policy....................................................................................................................................................................... 3797
2.1.25.1 Create IkePolicy....................................................................................................................................................... 3797
2.1.25.2 Query the IkePolicy List........................................................................................................................................ 3802
2.1.25.3 Query an IkePolicy by Name.............................................................................................................................. 3805
2.1.25.4 Update IkePolicy by Name.................................................................................................................................. 3807
2.1.25.5 Delete IkePolicy by Name.................................................................................................................................... 3810
2.1.26 ExternalSegmentGroup............................................................................................................................................ 3811
2.1.26.1 Create an External Segment Group..................................................................................................................3811
2.1.26.2 Query the External Segment Group List......................................................................................................... 3817
2.1.26.3 External Segment Group Query by Name..................................................................................................... 3821
2.1.26.4 Update an External Segment Group by Name.............................................................................................3823
2.1.26.5 External Segment Group Deletion by Name................................................................................................. 3825
2.1.27 EndpointGroup............................................................................................................................................................ 3827
2.1.27.1 Create an Endpoint Group................................................................................................................................... 3827
2.1.27.2 Query the Endpoint Group List.......................................................................................................................... 3830
2.1.27.3 Query an Endpoint Group by Name................................................................................................................ 3833
2.1.27.4 Update an Endpoint Group Based on the Name......................................................................................... 3835
2.1.27.5 Delete an Endpoint Group by Name................................................................................................................3837
2.1.28 Extended Routing Interface.................................................................................................................................... 3839
2.1.28.1 Create an Extended Route................................................................................................................................... 3839
2.1.28.2 Delete Extended Routes....................................................................................................................................... 3845
2.1.28.3 Query: Local-vtepip................................................................................................................................................ 3848
2.1.29 Hierarchical Binding.................................................................................................................................................. 3851
2.1.29.1 Hierarchical Binding............................................................................................................................................... 3851
2.1.30 Ipv6NsQos..................................................................................................................................................................... 3856
2.1.30.1 Create IPv6 QoS...................................................................................................................................................... 3856

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxx


iMaster NCE-Fabric
API Development Guide Contents

2.1.30.2 Query the IPv6 QoS List....................................................................................................................................... 3860


2.1.30.3 Query IPv6 QoS by Name.................................................................................................................................... 3863
2.1.30.4 Update IPv6 QoS by Name................................................................................................................................. 3865
2.1.30.5 Delete IPv6 QoS by Name................................................................................................................................... 3867
2.1.31 Alarms............................................................................................................................................................................ 3869
2.1.31.1 Trigger a Trap........................................................................................................................................................... 3869
2.2 Northbound Data Collection........................................................................................................................................ 3872
2.2.1 Start Northbound Data Collection..........................................................................................................................3872
2.2.2 Query the Northbound Data Collection Status..................................................................................................3876
2.2.3 Obtain Northbound Collected Data....................................................................................................................... 3879
2.3 Intent Engine..................................................................................................................................................................... 3880
2.3.1 Create a Process Instance.......................................................................................................................................... 3881
2.3.2 Query Process Instances in Batches....................................................................................................................... 3887
2.3.3 Query a Process Instance........................................................................................................................................... 3896
2.3.4 Delete a Process Instance.......................................................................................................................................... 3899
2.3.5 Retry a Process Instance............................................................................................................................................. 3902
2.3.6 Roll Back a Process Instance..................................................................................................................................... 3905
2.3.7 Execute a Process Instance........................................................................................................................................ 3909
2.3.8 Suspend a Process Instance...................................................................................................................................... 3913
2.3.9 Query the Result Details of a Process Instance................................................................................................. 3916
2.4 Query Inventory Device Status.................................................................................................................................... 3919
2.4.1 Query the Status of All NEs...................................................................................................................................... 3919
2.4.2 Query the NE Status Based on the NE ID............................................................................................................ 3921
2.4.3 Query NE Interface Information..............................................................................................................................3923
2.5 Query Inventory Device Information.........................................................................................................................3924
2.5.1 Query All NE Information.......................................................................................................................................... 3924
2.5.2 Query NE Information Based on the NE ID.........................................................................................................3929
2.5.3 Query NE Interface Information Based on the NE ID...................................................................................... 3930
2.6 OMPub Service-System Information......................................................................................................................... 3932
2.6.1 Query System NCD Information..............................................................................................................................3932
2.7 OMPub Service-Geographic Redundancy Cluster Active/Standby Status.................................................... 3935
2.7.1 Query the Active/Standby DR Cluster Status...................................................................................................... 3935
2.8 OpenFlow Interface......................................................................................................................................................... 3937
2.8.1 Query the OpenFlow Version................................................................................................................................... 3937
2.9 System Information and Product Information Interface.................................................................................... 3939
2.9.1 Obtain System and Product Information............................................................................................................. 3939
2.10 User Authentication Service....................................................................................................................................... 3943
2.10.1 Obtain a Token( V1 )................................................................................................................................................ 3943
2.10.2 Delete a Token( V1 )................................................................................................................................................. 3946
2.10.3 Obtaining a Token by a Third-Party System ................................................................................................... 3948
2.11 Northbound Notification Service-Websocket...................................................................................................... 3952
2.11.1 Create a Subscription Stream................................................................................................................................ 3952

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxxi


iMaster NCE-Fabric
API Development Guide Contents

2.11.2 Obtain the URL of the Actual Subscription Notification (Message in XML Format)......................... 3955
2.11.3 Obtain the URL of the Actual Subscription Notification (Message in JSON Format)........................3957
2.11.4 Notification Event Query Within a Specified Period...................................................................................... 3958
2.12 Configuration Transaction API Provided by the Southbound Service..........................................................3960
2.12.1 Overview....................................................................................................................................................................... 3960
2.12.1.1 URI Prefix................................................................................................................................................................... 3960
2.12.1.2 URI Format................................................................................................................................................................ 3961
2.12.1.3 Status Codes............................................................................................................................................................. 3962
2.12.1.4 Error Information.................................................................................................................................................... 3963
2.12.2 Development Example............................................................................................................................................. 3964
2.12.2.1 POST Operation.......................................................................................................................................................3965
2.12.2.2 PUT Operation......................................................................................................................................................... 3966
2.12.2.3 DELETE Operation.................................................................................................................................................. 3967
2.12.2.4 GET Operation......................................................................................................................................................... 3967
2.12.3 API................................................................................................................................................................................... 3968
2.12.3.1 Service Management............................................................................................................................................. 3968
2.12.3.1.1 AOC Northbound API......................................................................................................................................... 3968
2.12.3.1.2 Asynchronous Restoration northbound API of the AOC........................................................................4013
2.12.3.1.3 CLI northbound transparent transmission.................................................................................................. 4043
2.12.3.1.4 Service Consistency............................................................................................................................................. 4049
2.12.3.1.5 Northbound Consistency Collection..............................................................................................................4075
2.12.3.1.6 AOC Device Group Inventory Information API..........................................................................................4085
2.12.3.1.7 AOC commit manager....................................................................................................................................... 4104
2.12.3.1.8 Service Consistency............................................................................................................................................. 4112
2.12.3.2 Device Management.............................................................................................................................................. 4135
2.12.3.2.1 Consistency verification for southbound data...........................................................................................4135
2.12.3.2.2 Device configuration history............................................................................................................................4181
2.12.3.2.3 AocUniRealDeviceRpc........................................................................................................................................ 4215
2.12.3.2.4 AocUniRealDeviceQuery................................................................................................................................... 4219
2.12.3.3 Template Management........................................................................................................................................ 4223
2.12.3.3.1 AOC Template Parameter Northbound API............................................................................................... 4224
2.12.3.3.2 AOC Configuration Template Application Northbound Interface...................................................... 4239
2.12.3.3.3 Northbound API for AOC configuration templates................................................................................. 4276
2.12.3.3.4 AOC Device Template Northbound API....................................................................................................... 4305
2.12.3.4 Resource Management......................................................................................................................................... 4321
2.12.3.4.1 HuaweiNceResourcePoolManager................................................................................................................ 4321
2.13 Notification Reference................................................................................................................................................. 4348
2.13.1 Base Inventory Info (huawei-ac-inventory-base.yang)................................................................................. 4348
2.13.1.1 add-ne........................................................................................................................................................................ 4348
2.13.1.2 ltp-down-clear......................................................................................................................................................... 4352
2.13.1.3 ltp-down.................................................................................................................................................................... 4353
2.13.1.4 add-ltp........................................................................................................................................................................ 4356

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxxii


iMaster NCE-Fabric
API Development Guide Contents

2.13.1.5 synchronize-status-change.................................................................................................................................. 4359


2.13.2 Inventory Info (huawei-ac-inventory.yang).......................................................................................................4360
2.13.2.1 ne-down-clear..........................................................................................................................................................4360
2.13.2.2 ne-down..................................................................................................................................................................... 4361
2.13.3 Device Interface Management (huawei-ac-net-interface.yang)................................................................4362
2.13.3.1 interface-attributes-change................................................................................................................................ 4362
2.13.3.2 interface-ip-change................................................................................................................................................ 4364
2.13.4 Topology Management (huawei-ac-network-topology.yang).................................................................... 4366
2.13.4.1 node-down-clear.....................................................................................................................................................4366
2.13.4.2 add-link...................................................................................................................................................................... 4368
2.13.4.3 node-down................................................................................................................................................................ 4374
2.13.4.4 link-down................................................................................................................................................................... 4376
2.13.4.5 link-down-clear........................................................................................................................................................4378

3 Cloud Plug-in API Reference.......................................................................................... 4380


3.1 BGP Route........................................................................................................................................................................... 4380
3.1.1 Create BGP Route......................................................................................................................................................... 4380
3.1.2 Create a BGP Peer........................................................................................................................................................ 4388
3.1.3 Query the BGP List....................................................................................................................................................... 4394
3.1.4 Update BGP Peers........................................................................................................................................................ 4396
3.1.5 Delete BGP Peers.......................................................................................................................................................... 4399
3.2 Extended Route................................................................................................................................................................. 4401
3.2.1 Add Extended Routes.................................................................................................................................................. 4401
3.2.2 Delete Extended Routes............................................................................................................................................. 4406
3.2.3 Query Information About Extended Routes........................................................................................................ 4409
3.3 VPC Connection APIs...................................................................................................................................................... 4410
3.3.1 Create VPC Connections............................................................................................................................................. 4410
3.3.2 Obtain All VPC Connections......................................................................................................................................4421
3.3.3 Obtain Details About a VPC Connection.............................................................................................................. 4423
3.3.4 Update a VPC Connection......................................................................................................................................... 4425
3.3.5 Delete VPC Connections............................................................................................................................................. 4428
3.4 SNAT Interface.................................................................................................................................................................. 4429
3.4.1 Create SNAT................................................................................................................................................................... 4429
3.4.2 Update SNAT..................................................................................................................................................................4436
3.4.3 Delete SNAT................................................................................................................................................................... 4439
3.5 L2BR...................................................................................................................................................................................... 4440
3.5.1 Create L2BRs in Batches............................................................................................................................................. 4440
3.5.2 Update L2BRs in Batches........................................................................................................................................... 4449
3.5.3 Delete L2BRs in Batches............................................................................................................................................. 4452
3.5.4 Create an L2BR.............................................................................................................................................................. 4454
3.5.5 Query All L2BRs.............................................................................................................................................................4457
3.5.6 Query an L2BR by ID................................................................................................................................................... 4460
3.5.7 Update an L2BR by ID.................................................................................................................................................4461

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxxiii


iMaster NCE-Fabric
API Development Guide Contents

3.5.8 Delete an L2BR by ID.................................................................................................................................................. 4464


3.6 VPC Connection API_2.................................................................................................................................................... 4465
3.6.1 Create VPC Connections............................................................................................................................................. 4466
3.6.2 Update a VPC Connection......................................................................................................................................... 4474
3.6.3 Delete VPC Connections............................................................................................................................................. 4480
3.7 BGPNeighbor..................................................................................................................................................................... 4481
3.7.1 Create a BGP Peer........................................................................................................................................................ 4481
3.7.2 Query the BGP List....................................................................................................................................................... 4485
3.7.3 Query Detailed BGP Information............................................................................................................................ 4487
3.7.4 Update BGP Peers........................................................................................................................................................ 4488
3.7.5 Delete BGP Peers.......................................................................................................................................................... 4492
3.8 Extended Route exroute_custom................................................................................................................................ 4493
3.8.1 Add Extended Routes.................................................................................................................................................. 4494
3.8.2 Delete Extended Routes............................................................................................................................................. 4497
3.8.3 Query Information About Extended Routes........................................................................................................ 4500
3.9 Compare_result................................................................................................................................................................. 4501
3.9.1 Query Neutron Compare Results............................................................................................................................ 4501
3.10 Sync_result....................................................................................................................................................................... 4504
3.10.1 Query neutron sync results..................................................................................................................................... 4504
3.11 Egress Whitelist.............................................................................................................................................................. 4507
3.11.1 Create an Egress Whitelist...................................................................................................................................... 4507
3.11.2 Query the Egress Whitelist......................................................................................................................................4510
3.11.3 Query Details About an Egress Route Whitelist.............................................................................................. 4511
3.11.4 Update the Egress Whitelist................................................................................................................................... 4513
3.11.5 Delete an Egress Whitelist...................................................................................................................................... 4515
3.11.6 Add an Extended Route Prefix to the Egress Whitelist................................................................................. 4517
3.11.7 Delete the Extended Route Prefix from the Egress Whitelist..................................................................... 4519
3.11.8 Add a Subnet to the Egress Whitelist................................................................................................................. 4520
3.11.9 Delete a Subnet from the Egress Whitelist....................................................................................................... 4522

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. xxxiv


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1 RESTFul API Reference

1.1 Interface Overview


1.2 Common Interface Mechanisms
1.3 Common Interface Information
1.4 Prerequisites
1.5 Service Model
1.6 Interface Invocation Process
1.7 Authentication Interface
1.8 SNMP
1.9 Interface Reference
1.10 Status Code
1.11 Acronyms and Abbreviations

1.1 Interface Overview


The iMaster NCE-Fabric can interconnect with the OpenStack by default. RESTful
northbound interfaces can be used to interconnect with cloud platforms. This
document describes the interconnection methods.
The cloud platform accesses the iMaster NCE-Fabric through Neutron APIs. To use
the interfaces, you must construct and configure the environment. This document
provides open iMaster NCE-Fabric northbound APIs for secondary development.
Configurations created using APIs cannot be modified or deleted on the web page
of iMaster NCE-Fabric (except tenant creation).

1.2 Common Interface Mechanisms

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.2.1 Token Obtaining


Sample Request
HTTP
POST /controller/v2/tokens HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
{
"userName" : "Account of the northbound interface operator",
"password" : "Password of the northbound interface operator"
}

192.168.1.125 and 18002 are the northbound floating IP address and port number
of the controller. Set the northbound floating IP address based on the site
requirements. The port number is fixed to 18002.

Request Parameters

Table 1-1 body parameters


Paramet Mandat Type Value Default Description
er ory Range Value

authCredi Yes REFEREN For details, see Table Obtaining the token
t CE 1-2. input parameter.

Table 1-2 authCredit parameters


Paramet Mandat Type Value Default Description
er ory Range Value

userNam No string 1 to 128 - User name.


e character
s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 2


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramet Mandat Type Value Default Description


er ory Range Value

password No string 5 to 128 - This field may


character contain sensitive
s. data. Properly
encrypt the field.
Typical sensitive
data includes
authentication
credentials (such as
passwords, dynamic
tokens, and SMS
random passwords),
bank accounts, a
large amount of
personal data, and
communication
content.
User password.

Sample Response
● Response status code 200: OK.
HTTP/1.1 200 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"data" : {
"token_id" : "**************************************************",
"expiredDate" : "2018-10-30 10:09:23"
},
"errcode" : "0",
"errmsg" : "get token successfully."
}

● Response status code 401: Unauthorized error.


For details, see the response message body.

Response Parameters
Response status code 200: OK.

Table 1-3 AuthTokenV2Out parameters

Parameter Type Value Default Description


Range Value

data ARRAY_REF For details, see Table 1-4. -


ERENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 3


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Type Value Default Description


Range Value

errcode string 0 to 128 - Error code.


characters.

errmsg string 0 to 128 - Error information.


characters.

Table 1-4 data parameters


Parameter Type Value Default Description
Range Value

token_id string 0 to 1024 - Token ID.


characters. This field may
contain sensitive
data. Properly encrypt
the field. Typical
sensitive data
includes
authentication
credentials (such as
passwords, dynamic
tokens, and SMS
random passwords),
bank accounts, a
large amount of
personal data, and
communication
content.

expiredDate string 0 to 128 - Token timeout time,


characters. in the format yyyy-
MM-dd HH:mm:ss.

1.2.2 URL Format


http(s)://IP:port/controller/product/version/interface type/{module name}
● Supported products: dc
● Version: v2
● Interface type: neutronapi
● Module name: for example, network, subnet
● Parameter description:
– IP: indicates the IP address of the iMaster NCE-Fabric.
– port: 18002 indicates the port number. For example, in https://
192.168.2.2:18002.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 4


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

The values of the URL fields (product, version, interface type, and module name)
are case-sensitive.
URL for a DC's northbound interface: http(s)://IP:port/controller/dc/v2/interface
type/{module name}
Default URL for the iMaster NCE-Fabric's northbound interface: https://IP:18002/
controller/dc/v2/interface type/{module name}

1.2.3 Returned Response Value


Normal response values:
● The status code 201 is returned if the POST operation succeeded.
● The status code 204 is returned if the DELETE operation succeeded.
● The status code 200 is returned if the GET operation succeeded.
● The status code 200 is returned if the PUT operation succeeded.
Special response values:
● The status code 208 is returned if the object ID already exists but the content
differs during creation. The status code 201 is returned if the object content
duplicates.
● The status code 400 is returned if the object ID does not exist during
updating.
● The status code 404 is returned if the object ID does not exist during query.
● The status code 204 is returned if the object ID does not exist during deletion.
● The URL format is context_path/path. The status code 404 is returned if
context_path or path does not exist.

1.2.4 service_name
The iMaster NCE-Fabric supports the service_name field for northbound
interfaces. The field type is string, and has 1 to 255 bytes. This field indicates a
cloud platform name. This field is mandatory during service provisioning through
a northbound interface. The iMaster NCE-Fabric can distinguish services from
different cloud platforms based on the field.
The following example describes how to create a network.
{
"service_name": "openstack11",
"network":
{
"shared": "false",
"name": "liudongtest",
"admin_state_up": "true",
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 5


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
}
The service_name field is mandatory for the creation operation of all modules
through the Neutron APIs.
L2/L3: subnet, network, port, router, router interface
L4-L7: all services

1.3 Common Interface Information


REST Description
Definition of REST
Representational State Transfer (REST) is a software architecture style. RESTful
web services are simpler than SOAP-based and XML-RPC-based web services
which are the other two main web services. Therefore, more and more web
services are designed and implemented in the REST style.
Description of Common HTTP Request Modes
● GET
Obtain detailed information about specified resources. You can choose an
Internet media type as needed (for example, XML and JSON). This document
uses the JSON type.
● PUT
Update a specified element.
● POST
Treat URI as a resource group and create a new element in it.
● DELETE
Delete a specified element.

Interface Description
● Interface access path:
https://{ip}:{port}/controller/dc/v2.0/neutronapi/{module name}
If HTTPS is used, the port number is 18002.
Sample:
https://{ip}:{port}/controller/dc/v2.0/neutronapi/networks
NOTE

HTTP and HTTPS are supported, and HTTPS is recommended. In all the sample interface
URIs, HTTPS is used.
● HTTP request mode:
POST/GET/DELETE/PUT
● Parameter format:
application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 6


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTE

All parameter formats are application/json;charset=UTF-8 and will not be described


here.
● HTTP header parameters
All interfaces (except the authentication interface) must add the following
three parameters to the header before being invoked.

Key Value

Content-Type application/json

Accept application/json

X-ACCESS-TOKEN Token ID obtained from the


authentication interface.

Parameter Type Description

Table 1-5 Parameter Type Description

Parameter Description

Content-Type Indicates the format of data in the


entity header.

Accept Indicates the type of data in the


request header.

X-ACCESS-TOKEN Indicates the variable name of TOKEN


in the HTTP header.

application/json Indicates that the JSON format is


supported.

CRUD Description
In computing, CRUD is an acronym for create, retrieve, update, and delete. It refers
to the basic operations of a database or persistence layer in a software system.

CRUD indicates that this parameter can be manually entered in the operation. The
value of Mandatory or Not can be as follows:

● Yes indicates that this parameter is mandatory for all operations.


● No indicates that this parameter is optional for all operations.
● For an operation that belongs to CRUD, the parameter is mandatory for the
corresponding operation.

For example, in the object model of a network, the parameter tenantId can be
manually entered during network creation and query, and is mandatory during
network creation.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 7


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Type Mandatory CRUD Description


or Not

status string No R Network status. The


default value is
ACTIVE.

subnets list(uuid-str) No R List of subnets on a


network.

name string No CRU Network name. The


maximum length is
255 bytes.

routerExternal bool C CR Extended attribute


specifying whether
the route is an
external route.
The default value is
false, indicating that
the route is not an
external route.

adminStateUp bool No CRU Administrative


status. The default
value is true.

tenantId string C CR Tenant ID. Only an


administrator can
specify tenantId for
other tenants.
The maximum
length is 255 bytes.

Sample:
POST /controller/dc/v2/neutronapi/networks
{
"network":
{
"status": "ACTIVE",
"subnets": null,
"name": "network_test",
"routerExternal": "false",
"adminStateUp": "false",
"tenantId": "7ce8490f-cf5f-411f-b3e5-d576dfdc7330",
"shared": "false",
"id": "00000000-0000-0000-0000-000000000004",
"physicalNetwork": "physnet1",
"networkType": "vlan",
"segmentationId": 2006
},
"serviceName":"physnet1"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 8


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

If the request body for creating networks does not contain tenantId, the network
creation operation fails.

1.4 Prerequisites
Table 1-6 Prerequisites for global services

Prerequisites for global services

● A northbound interface account has been created and the password has been
changed.
● Devices have been discovered.
● A fabric has been created and devices have been added.
● An L4-L7 resource pool has been created and associated with the fabric.
Devices have been added to the VAS pool.
● Links have been discovered automatically or created manually.
● Host access links have been created.
● Internal and external links have been configured for firewalls.
● Global resources have been created.
● A cloud platform has been created.
● External gateways have been configured on the iMaster NCE-Fabric.

Table 1-7 Prerequisites for each service

Service Module Prerequisites


Name

Routers ● Networks and subnets have been created.

Static route ● Networks, subnets, and external gateways have been


created.

Networks -

Ports ● Networks, subnets, and security groups have been


created.

QoS ● Networks and subnets have been created.

Security groups ● Networks, subnets, and ports have been created.

Security group rules ● Networks, subnets, and ports have been created.
● Security groups have been created.

Firewalls ● Networks, subnets, routers, and gateway ports have


been created.
● Firewall rules have been created.
● Firewall policies have been created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 9


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Service Module Prerequisites


Name

Firewall policies ● Networks have been created.


● Firewall rules have been created.

Firewall rules ● Networks have been created.

Floating IP address ● Networks, subnets, routers, and gateway ports have


been created.

IPSec site connection ● Networks, subnets, routers, and gateway ports have
been created.
● SNAT has been set to true for updating a router.
● IKE policies, IPsec policies, router interfaces, and VPN
services have been created.
● An IPsec site connection has been created.

VPN service ● Internal and external links, global resources, cloud


platforms, networks, subnets, routers, and gateway
ports have been created.
● SNAT has been set to true for updating a router.
● Router interfaces and VPN services have been created.

IKE policies ● Networks, subnets, routers, and gateway ports have


been created.
● SNAT has been set to true for updating a router.
● IKE policies have been created.

IPSec policies ● Networks, subnets, routers, and gateway ports have


been created.
● SNAT has been set to true for updating a router.
● IPsec policies have been created.

Internal router ● Networks, subnets, and routers have been created.


interfaces

SNAT ● Networks, subnets, routers, and gateway ports have


been created.

1.5 Service Model


Service Model
Figure 1-1 shows the service model of the iMaster NCE-Fabric and the
relationships between the project and all service modules.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 10


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Instances and projects are created on the cloud management platform directly
instead of through the RESTful interfaces. Port management interface on the
RESTful is used when creating instances to assign VMs to use the ports.

All the other service modules are created through invoking the RESTful interfaces.

Figure 1-1 Service Model

Interface Mappings

Table 1-8 describes the mappings between all service modules and the RESTful
interfaces.

Table 1-8 Mappings between service modules and the RESTful interfaces

Service Description Interface Access Path


Module

Router Virtual routers are used for https://{ip}:{port}/


interconnection between controller/dc/v2/neutronapi/
subnets and accessing routers
external networks.

Static route Static route is manually https://{ip}:{port}/


configured by the controller/dc/v2/neutronapi/
administrator because it routers/{router_id}/add_routes
cannot automatically adapt to
network topology changes.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 11


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Service Description Interface Access Path


Module

Network Indicates an isolated Layer 2 https://{ip}:{port}/


network domain. Hosts in one controller/dc/v2/neutronapi/
network are visible at a Layer networks
2 network.A user can have
multiple networks. Subnets
and ports must be associated
with networks which are the
basis. VXLAN and VLAN are
supported.

Subnet A subnet indicates a network https://{ip}:{port}/


segment. Each subnet has a controller/dc/v2/neutronapi/
CIDR and is associated with a subnets
network. The IP address can
be selected from the CIDR or
a specified pool. A subnet
may have a gateway, a group
of DNSs, and host routes.
Subnets are invisible at a
Layer 2 network and
communicate with each other
through Layer 3 routing by
passing through a Layer 3
gateway (router). A network
supports only one subnet.

Port A port belongs to a network https://{ip}:{port}/


and indicates a network controller/dc/v2/neutronapi/ports
access point which is used to
connect VMs or routers. The
NICs of VMs are connected to
the port and the VMs access
the network using the port. If
an IP address is bound to the
port, the port belongs to a
subnet.

QoS Indicates quality of services. https://{ip}:{port}/


QoS is a security mechanism controller/dc/v2/neutronapi/qoss
for resolving network delay
and congestion. When a
network is overloaded or
congested, QoS can ensure
that important services are
processed and ensure the
efficient running of the
network. Currently, QoS
supports only rate limit.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 12


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Service Description Interface Access Path


Module

Security Trust VMs communicate with https://{ip}:{port}/


group each other through security controller/dc/v2/neutronapi/
groups on the OpenStack. security-groups
VMs in the same security
group use the same security
policies. A security group
works on a VM port and is a
port-level virtual firewall. It
filters incoming and outgoing
port traffic.

Security Indicates the policy for https://{ip}:{port}/


group rule implementing traffic filtering. controller/dc/v2/neutronapi/
One security group can have security-group-rules
multiple security group rules.

Firewall Firewall is a series of https://{ip}:{port}/


components deployed among controller/dc/v2/neutronapi/fw/
multiple networks or security firewalls
zones. The firewall monitors,
restricts, and modifies data
flows passing through it to
protect network security.

Firewall In the Neutron system, a https://{ip}:{port}/


policy firewall policy is a list of rules controller/dc/v2/neutronapi/fw/
arranged in a specific firewall_policies
sequence.

Firewall Check whether traffic is https://{ip}:{port}/


rule allowed to pass based on controller/dc/v2/neutronapi/fw/
firewall rules. firewall_rules

Floating IP Binds the IP of the specified https://{ip}:{port}/


address VM. The external network can controller/dc/v2/neutronapi/
access the VM through floatingips
floating IP.

IPSec site The connection object defines https://{ip}:{port}/


connection the routing method controller/dc/v2/neutronapi/vpn/
connecting sites, key method, ipsec-site-connections
authentication mode,
parameters, and service
subnets. Ipsecsiteconn is used
for creating IPSec tunnels
between two networks to
implement LAN
communication.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 13


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Service Description Interface Access Path


Module

VPN Virtual private network (VPN) https://{ip}:{port}/


service is built on a public network controller/dc/v2/neutronapi/vpn/
for encrypted communication. vpnservices
The VPN gateway enables
remote access through data
encryption and address
translation.

IKE policy The IKEPolicy object defines https://{ip}:{port}/


parameters for IKE controller/dc/v2/neutronapi/vpn/
negotiation in the first phase ikepolicies

IPSec policy The IPSecPolicy object defines https://{ip}:{port}/


parameters for ESP controller/dc/v2/neutronapi/vpn/
negotiation in the second ipsecpolicies
phase.

Router Indicates a port connected to https://{ip}:{port}/


interfaces a router. The port is a controller/dc/v2/neutronapi/
gateway of a subnet. routerinterface/{router_id}/
add_router_interface

SNAT Source network address https://{ip}:{port}/


translation, used to translate controller/dc/v2/neutronapi/snat
the source address of an IP
data packet to another
address.

L2br Layer 2 bridge, providing the https://{ip}:{port}/


layer 2 bridge between VXLAn controller/dc/v2/neutronapi/l2brs
virtual machine and VLAn
physical server.

1.6 Interface Invocation Process

1.6.1 Overall Configuration Process


Service Requests
The following table describes the basic service requests of users.

Table 1-9 Service requests (for VMs only)

Communication mode Network access

Communication between intranets and Internet access


extranets (through firewalls)
External private network access

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 14


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Communication mode Network access

Communication between intranets On the same VPC (the data does not
pass through firewalls)

On different VPCs (the data passes


through firewalls)

Special services:

● VPN access: An access mode for communication between intranets and


external private networks. VPN service can be configured independently after
the basic network services (including networks, subnets, ports, and VMs) have
been configured at L2 and L3. For details, see 1.6.4 Communication Between
an Intranet and an External Private Network Through IPSec VPN.
NOTE

● L2 refers to the data link layer at the second layer of the OSI model. At L2, data is
transmitted based on MAC addresses.
● L3 refers to the network layer at the third layer of the OSI model. At L3, data is
transmitted based on IP addresses.

If port rate limiting or traffic limiting is required, port QoS needs to be configured.

Basic Networking

Figure 1-2 Basic networking

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 15


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Overall Configuration Process


Figure 1-3 shows the overall configuration process of the preceding four basic
service requests.

Figure 1-3 Overall configuration process

Only tenant's networks need to be created by invoking the eSDK interface and all
the other steps can be performed on the cloud platform directly. This document
describes the configuration process of creating tenant's networks.
The configuration process varies as users' requests are different. The details are as
follows:
● Communication between the intranet and the Internet: For detailed
configuration process, see 1.6.2 Communication Between an Intranet and
the Internet.
● Communication between the intranet and an external private network: For
detailed configuration process, see 1.6.4 Communication Between an
Intranet and an External Private Network Through IPSec VPN.
● Communication between VPCs: For detailed configuration process, see 1.6.5
Communication Between VPCs.
● Communication within a VPC: For detailed configuration process, see 1.6.6
Communication Within a VPC.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 16


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

● Traffic limiting of VMs using security groups: For details, see 1.6.7 Traffic
Limiting of VMs Using Security Groups.

1.6.2 Communication Between an Intranet and the Internet


Flowchart
Figure 1-4 shows the configuration process of connecting an intranet to the
Internet.

Figure 1-4 Flowchart of connecting an intranet to the Internet

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 17


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Reference Interface and Description

Table 1-10 Reference interface and description


Tasks Reference interface and description

Creating a router Router management interface

Creating a network and subnets Network management interface and subnet


management interface

Creating a route interface to Router management interface


associate the subnets with the
router

(Optional) Creating a security Security group management interface


group and configuring rules You can specify a security group when
creating instances to enable intranet
communication for the instances in one
security group.

Creating an instance to connect Port management interface


VMs to the network

Configuring the gateway and Source NAT interface


selecting external networks

Creating a firewall, selecting Firewall management interface


policies, and associating them
with the router

Binding floating IP addresses, Floating IP address interface


starting from extranets to
intranets

1.6.3 Load balancing of Traffic from the Internet Using an LB


Flowchart
Figure 1-5 shows the flowchart for load balancing of traffic from the Internet
using an LB.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 18


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Figure 1-5 Load balancing of traffic from the Internet using an LB

Reference Interface and Description

Table 1-11 Reference interface and description

Tasks Reference interface and description

Creating a network and subnets Network management interface and


subnet management interface

Creating a port Port management interface

Creating a load balancing port Port management interface

Creating a load balancer Load balancer management interface

Creating a load balancing listener Interface for managing a load


balancing listener

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 19


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Tasks Reference interface and description

Creating a load balancing resource Interface for managing load balancing


pool resource pool

Creating load balancing resources Interface for managing load balancing


resources

Creating a load balancing resource Interface for managing load balancing


monitor resource monitor

1.6.4 Communication Between an Intranet and an External


Private Network Through IPSec VPN
Flowchart
Figure 1-6 shows the configuration process of connecting an intranet to external
private networks.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 20


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Figure 1-6 Flowchart of connecting an intranet to external private networks

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 21


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Reference Interface and Description

Table 1-12 Reference interface and description


Tasks Reference interface and description

Creating a router Router management interface

Creating a network and subnets Network management interface and


subnet management interface

Creating a route interface to Router management interface


associate the subnets with the
router

(Optional) Creating a security Security group management interface


group and configuring rules You can specify a security group when
creating instances to enable intranet
communication for the instances in one
security group.

Creating an instance to connect Port management interface


VMs to the network

Configuring the gateway and Distributed router management interface


selecting external networks

Creating a firewall, selecting Firewall management interface


policies, and associating them
with the router

(Optional) Creating a VPN service IPSec VpnaaS service interface


Perform this step only when the service
request involves VPN access.

1.6.5 Communication Between VPCs


Flowchart
Figure 1-7 shows the configuration process of connecting intranets on different
VPCs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 22


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Figure 1-7 Flowchart of connecting intranets on different VPCs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 23


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Reference Interface and Description

Table 1-13 Reference interface and description


Tasks Reference interface and description

Creating a router Router management interface

Creating a network and subnets Network management interface and


subnet management interface

Creating a route interface to associate Router management interface


the subnets with the router

(Optional) Creating a security group Security group management interface


and configuring rules You can specify a security group when
creating instances to enable intranet
communication for the instances in
one security group.

Creating an instance to connect VMs Port management interface


to the network

Creating a firewall, selecting policies, Firewall management interface


and associating them with the router

Configuring the route between the Static route management interface


corresponding firewalls of the two
VPCs (vRouters)

1.6.6 Communication Within a VPC


Flowchart
Figure 1-8 shows the configuration process of connecting intranets on the same
VPC.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 24


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Figure 1-8 Flowchart of connecting intranets on the same VPC

Reference Interface and Description

Table 1-14 Reference interface and description


Tasks Reference interface and description

Creating a router Router management interface

Creating a network and subnets Network management interface and


subnet management interface

Creating a route interface to Router management interface


associate the subnets with the
router

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 25


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Tasks Reference interface and description

(Optional) Creating a security Security group management interface


group and configuring rules You can specify a security group when
creating instances to enable intranet
communication for the instances in one
security group.

Creating an instance to connect Port management interface


VMs to the network

1.6.7 Traffic Limiting of VMs Using Security Groups


Flowchart
Figure 1-9 shows process of traffic limiting of VMs using security groups.

Figure 1-9 Traffic limiting of VMs using security groups

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 26


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Reference Interface and Description

Table 1-15 Reference interface and description

Tasks Reference interface and description

Creating a network and subnets Network management interface and


subnet management interface

Creating a security group Security group management interface

(Optional) Creating a security Security group rule management interface


group rule

Creating a port Port management interface

1.6.8 Configuring HIROERService Interface Blacklists


If there are interfaces of the service plane under external attacks (for example,
attacked when the service plane is accessed from a browser), you can add risky
interfaces to HIROERService interface blacklists to prevent external attacks. The
service functions of the interfaces added to the HIROERService interface blacklists
are unavailable. You need to delete them from the HIROERService interface
blacklists to restore these interfaces and their service functions.

Prerequisites
● You have logged in to the management plane.
● You have obtained the passwords for the sopuser, ossuser, and ossadm users
of the node where the hiroer process instance resides. If the service plane is
deployed in cluster mode, you need to obtain the passwords for the sopuser,
ossuser, and ossadm users of the nodes where the active and standby hiroer
process instances reside.

Procedure
Step 1 Modify the configuration parameters to enable the blacklist configuration
function.
1. On the management plane, choose Product > Software Management >
Deploy Product Software from the main menu.
2. On the Deploy Product Software page, click the product with configurations
to be modified. The page for the product details is displayed.
3. In the upper right corner of the page, click More and choose Modify
Configurations from the drop-down menu.
NOTE

Exercise caution when performing this operation. Incorrect parameters may cause
configuration failures or even system unavailability.
4. Set enableBlacklist to true and perform operations as prompted.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 27


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTE

If the default value of enableBlacklist is true, skip this step.

Step 2 Configure interface blacklists.


1. Use PuTTY to log in to the node where the active hiroer process instance of
HIROERService resides, as the sopuser user in SSH mode. For details about
how to check the active/standby status and IP address of a process instance,.
NOTE

If the service plane is deployed in single-server mode, log in to the node where the
hiroer process instance resides. For details about how to obtain the IP address of the
node where the hiroer process instance resides.
2. Run the following command to switch to the ossuser user:
su - ossuser
Password: password for the ossuser user

3. Run the following command to switch to the directory that stores the
hiro_tool script:
cd /opt/oss/SOP/apps/HIROERService/init
4. Run the following command to import environment variables:
source hiro_tool.sh
5. Perform operations by referring to Table 1-16.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 28


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-16 Configuring the interface blacklist


Task Operation

Adding – Adding an interface to the interface blacklist for prefix


interfaces to matching
the interface hiro_tool addBlacklist fuzzy "fuzzyurl"
blacklist If information similar to the following is displayed, the
interface is successfully added to the interface blacklist
for prefix matching. Otherwise, contact Huawei technical
support.
Add blacklist url successful!
NOTE
fuzzyurl indicates the prefix of the interface path to be added,
for example, /rest/adminhome/website/v1/dashboards. If
there are multiple paths, use commas (,) to separate them.
– Adding an interface to the interface blacklist for exact
matching
hiro_tool addBlacklist accurate "accurateurl"
If information similar to the following is displayed, the
interface is successfully added to the interface blacklist
for exact matching. Otherwise, contact Huawei technical
support.
Add blacklist url successful!
NOTE
accurateurl indicates the exact interface path to be added. If
there are multiple paths, use commas (,) to separate them, for
example, /rest/adminhome/website/v1/widgets,/rest/
adminhome/website/v1/slide-setting.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 29


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Task Operation

Deleting – Deleting an interface from the interface blacklist for


interfaces prefix matching
from the hiro_tool deleteBlacklist fuzzy "fuzzyurl"
interface If information similar to the following is displayed, the
blacklist interface is successfully deleted from the interface
blacklist for prefix matching. Otherwise, contact Huawei
technical support.
Delete blacklist url successful!
NOTE
fuzzyurl indicates the prefix of the interface path to be added,
for example, /rest/adminhome/website/v1/dashboards. If
there are multiple paths, use commas (,) to separate them.
– Deleting an interface from the interface blacklist for
exact matching
hiro_tool deleteBlacklist accurate "accurateurl"
If information similar to the following is displayed, the
interface is successfully deleted from the interface
blacklist for exact matching. Otherwise, contact Huawei
technical support.
Delete blacklist url successful!
NOTE
accurateurl indicates the exact interface path to be added. If
there are multiple paths, use commas (,) to separate them, for
example, /rest/adminhome/website/v1/widgets,/rest/
adminhome/website/v1/slide-setting.

Step 3 Run the following command to switch to the ossadm user:

su - ossadm
Password: password for the ossadm user

Step 4 Run the following command to import environment variables:

source /opt/oss/manager/bin/engr_profile.sh

Step 5 Run the following command to restart HIROERService:

ipmc_adm -cmd restartapp -tenant product name -app HIROERService

If information similar to the following is displayed, HIROERService is restarted


successfully. Otherwise, contact Huawei technical support.
Stopping process hiroer-0-0 ... success
Starting process hiroer-0-0 ... success

Step 6 When the service plane is deployed in cluster mode, repeat Step 2on the node
where the standby hiroer process instance resides to configure the interface
blacklist.

----End

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 30


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.6.9 Configuring the HIROAPIGService Interface Blacklist


In the O&M plane, when a third-party system (for example, the upper-layer NMS)
accesses CloudSOP by calling OpenAPIs, you can add the risky OpenAPIs to the
HIROAPIGService interface blacklists to prevent malicious interface attacks. The
service functions of the interfaces added to the interface blacklist are unavailable.
You need to delete them from the HIROAPIGService interface blacklist to restore
these interfaces and their service functions.

Prerequisites
You have obtained the passwords for the sopuser, ossuser, and ossadm users of
the nodes where the active and standby hiroapig process instances reside.

Procedure
Step 1 Use PuTTY to log in to the node where the active hiroapig process instance of
MinApiMgr resides, as the sopuser user. For details about how to check the active/
standby status and IP address of a process instance.
NOTE

If the O&M plane is deployed in single-server mode, log in to the node where MinApiMgr
resides. For details about how to obtain the IP address of the node where MinApiMgr
resides.

Step 2 Run the following command to switch to the ossuser user:


su - ossuser
Password: password for the ossuser user

Step 3 Run the following command to go to the target directory:


cd /opt/oss/SOP/apps/HIROAPIGService/init
Step 4 Run the following command to execute environment variables:
source hiro_tool.sh
Step 5 Run the following commands to configure the interface blacklist:

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 31


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-17 Configuring the interface blacklist

Task Operation

Adding ● Adding an interface to the interface blacklist for prefix matching


interface hiro_tool addBlacklist fuzzy "fuzzyurl"
s to the If information similar to the following is displayed, the interface is
interface successfully added to the interface blacklist for prefix matching.
blacklist Otherwise, contact Huawei technical support.
Add blacklist url successful!
NOTE
fuzzyurl indicates the prefix of the interface path to be added, for
example, /rest/adminhome/website/v1/dashboards. If there are multiple
paths, use commas (,) to separate them.
● Adding an interface to the blacklist of exact interfaces
hiro_tool addBlacklist accurate "accurateurl"
If information similar to the following is displayed, the interface is
successfully added to the blacklist of exact interfaces. Otherwise,
contact Huawei technical support.
Add blacklist url successful!
NOTE
accurateurl indicates the exact interface path to be added. If there are
multiple paths, use commas (,) to separate them, for example, /rest/
adminhome/website/v1/widgets,/rest/adminhome/website/v1/slide-
setting.

Deleting ● Deleting an interface from the interface blacklist for prefix


interface matching
s from hiro_tool deleteBlacklist fuzzy "fuzzyurl"
the If information similar to the following is displayed, the interface is
interface successfully deleted from the interface blacklist for prefix
blacklist matching. Otherwise, contact Huawei technical support.
Delete blacklist url successful!
NOTE
fuzzyurl indicates the prefix of the interface path to be added, for
example, /rest/adminhome/website/v1/dashboards. If there are multiple
paths, use commas (,) to separate them.
● Deleting an interface from the blacklist of exact interfaces
hiro_tool deleteBlacklist accurate "accurateurl"
If information similar to the following is displayed, the interface is
successfully deleted from the blacklist of exact interfaces.
Otherwise, contact Huawei technical support.
Delete blacklist url successful!
NOTE
accurateurl indicates the exact interface path to be added. If there are
multiple paths, use commas (,) to separate them, for example, /rest/
adminhome/website/v1/widgets,/rest/adminhome/website/v1/slide-
setting.

Step 6 Run the following command to switch to the ossadm user:

su - ossadm
Password: password for the ossadm user

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 32


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Step 7 Run the following command to execute environment variables:


source /opt/oss/manager/bin/engr_profile.sh
Step 8 Run the following command to restart HIROAPIGService:
ipmc_adm -cmd restartapp -tenant product name -app HIROAPIGService
If information similar to the following is displayed, HIROAPIGService is restarted
successfully. Otherwise, contact Huawei technical support.
Stopping process hiroapig-1-0 ... success
Starting process hiroapig-1-0 ... success

Step 9 If the O&M plane is deployed in cluster mode, repeat Step 1 to #EN-
US_TOPIC_0000001192232474/en-us_topic_0000001176302258_en-
us_topic_0000001171744844_en-us_topic_0000001171880654_li1275783513176
on the node where the standby hiroapig process instance resides to configure the
interface blacklist.

----End

1.7 Authentication Interface


This interface is used to obtain a Token. The Token is effective in a certain time
period, and needs to be acquired again from the authentication interface when
the validity period expires.

NOTE

Being the first interface invoked by a third-party application system, the authentication
interface returns the Token ID. Before invoking any other interface, the third-party
application system must set X-ACCESS-TOKEN in the HTTP header to a Token ID.
Otherwise, the system will display "403: Authentication failed." when another interface is
invoked.

Interface Description
Interface access path:
https://{ip}:{port}/controller/v2/tokens

HTTP request mode:


POST

Parameter Description
Request body parameters

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 33


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Type Mandatory Description


or Not

userName string Yes Name of a northbound


interface user.
The northbound interface
user is added to iMaster
NCE-Fabric using the
account admin.

password string Yes Password of the


northbound interface
user.
The password of the
northbound interface user
is added to the iMaster
NCE-Fabric using the
account admin.

Response body parameters

Parameter Type Mandatory Description


or Not

errcode string Yes Returned message code.


The value 0 indicates
success. For others, see
description of errmsg.

errmsg string Yes Information contained in


the returned message
code.

data data Yes Returned Token


information.

Format of the data field

Parameter Type Mandatory Description


or Not

expiredDate date Yes Token expired time.


Format: 2016-01-13
19:52:40

token_id string Yes Token ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 34


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample
Message Type Reference

JSON request POST /controller/v2/tokens


{
"userName": "esdk@huawei.com",
"password": "Test@123"
}

Status code STATUS CODE 200

JSON response {
"errmsg": "get token successfully.",
"errcode": "0",
"data": {
"expiredDate": "2016-12-22 16:14:19",
"token_id":
"67D5807D096CF5DA:CECC49BBC0394778AAC056E35D690FF88ADFB19
D949F2E41C329D372CBD99FD4"
}
}

1.8 SNMP
iMaster NCE-Fabric provides the SNMP NBI for the OSS to manage alarms.

1.8.1 Overview
The SNMP NBI is one of the NBIs provided by iMaster NCE-Fabric. The OSS can
access iMaster NCE-Fabric through the SNMP NBI to monitor and manage alarms
in networks.
The SNMP protocol consists of a set of standards for network management and is
one of the most widely used protocols in TCP/IP networks.
As one of the widely applied network management protocols in the TCP/IP
network, SNMP aims to:
● Transmit the management information between two nodes.
● Help the manager search and modify the information, and locate faults on
any node in the network.
● Help the manager diagnose faults, configure NEs, and generate reports.
The features of SNMP are as follows:
● Uses the polling mechanism and provides basic operation sets.
● Fits small, fast, and cost-effective networks.
Huawei developed the SNMP NBI for iMaster NCE-Fabric in compliance with
industry standards. With this NBI, the OSS can interconnect with iMaster NCE-
Fabric quickly and monitor and manage alarms on the network.
The Simple Network Management Protocol (SNMP) northbound interface (NBI)
supports three formats of management information bases (MIBs): MIB1, MIB2,
and MIB3. Currently, iMaster NCE-Fabric supports only MIB1.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 35


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

● Both HW-IMAPV1NORTHBOUND-TRAP-MIB.mib and HW-


IMAPV2NORTHBOUND-TRAP-MIB.mib refer to the MIB1, which is used to
manage transport, access, and datacom devices, or cross-domain devices. V1
and V2 indicate the Structure of Management Information (SMI) versions of
HW-IMAPV1NORTHBOUND-TRAP-MIB.mib and HW-
IMAPV2NORTHBOUND-TRAP-MIB.mib respectively. The OSS selects a
version based on its supported SMI version. SMI versions differ in syntax. For
details, see RFC 1155 and RFC 1902.
● Both IMAP_NORTHBOUND_MIB-V1.mib and IMAP_NORTHBOUND_MIB-
V2.mib refer to the MIB2. V1 and V2 indicate the SMI versions of
IMAP_NORTHBOUND_MIB-V1.mib and IMAP_NORTHBOUND_MIB-V2.mib
respectively. The OSS selects a version based on its supported SMI version.
SMI versions differ in syntax. For details, see RFC 1155 and RFC 1902.
● T2000-NETMANAGEMENT-MIB.mib refers to the MIB3 and complies with
SMIv2.

1.8.2 MIB1
MIB1 has two versions: HW-IMAPV1NORTHBOUND-TRAP-MIB and HW-
IMAPV2NORTHBOUND-TRAP-MIB. The OSS selects a version based on its
supported SMI version.

This document uses HW-IMAPV1NORTHBOUND-TRAP-MIB as an example.

SMI Version MIB

SMI-V1 HW-IMAPV1NORTHBOUND-TRAP-MIB.mib

SMI-V2 HW-IMAPV2NORTHBOUND-TRAP-MIB.mib

1.8.2.1 MIB1
The MIB1 is used to manage transport, access, and datacom devices or manage
multi-domain devices. When the MIB1 is loaded, the SNMP NBI supports
automatic alarm reporting, synchronization (querying active alarms), clearance,
acknowledgement/unacknowledgement, and alarm acknowledgement and
clearance status reporting.

NCE
On the NCE side, the primary functions are:

● Reporting alarms
● Reporting heartbeats
NOTE

To enable automatic alarm reporting, set OSS parameters on NCE when configuring the
SNMP NBI. Alarm information will be received at the preset port of the OSS server.

After receiving alarms from devices or NCE, the SNMP NBI reports these alarms to
the OSS by means of standard SNMP trap messages.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 36


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

The SNMP NBI sends heartbeat traps to the OSS periodically. Based on the
heartbeats, the OSS determines whether the connection with the SNMP NBI is
proper.
For details about traps, see 1.8.2.4 MIB1 Trap.

Functio Description
n

Subscrib Subscribes alarms by alarm severity and category. You can set the
ing severity and category when deploying the SNMP NBI.
alarms Sets the alarm field or variable binding (VB).

Reportin Reports alarms from NEs or NCE.


g
alarms

Reportin Reports heartbeats and sets the heartbeat period.


g
heartbe
ats

Reportin Reports the alarm acknowledgement status.


g alarm
acknowl
edgeme
nt
status

Reportin Reports the alarm clearance status.


g alarm
clearanc
e status

OSS
On the OSS side, the primary functions are:
● Synchronizing alarms (querying active alarms)
● Changing filter criteria in real time
● Acknowledging/Unacknowledging alarms
● Clearing alarms
NOTE

Ensure that the OSS is connected to the SNMP NBI properly before performing operations.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 37


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functio Description
n

Synchro Queries active alarms (uncleared alarms) on NCE in the Set


nizing operation. The OSS uses the Set operation to query these alarms on
alarms NCE.
(queryin To query active alarms on NCE, the OSS issues the query begin
g active command in the Set operation. After receiving the command, the
alarms) SNMP agent queries active alarms from NCE and reports the result to
the OSS. If there are too many alarms and the query needs to be
stopped, the OSS issues the query end command in the Set
operation. After receiving the command, the SNMP agent stops
querying alarms and does not report the result to the OSS.
For details about alarm synchronization, see 1.8.8.1.3 Synchronizing
Alarms.
For details about traps, see MIB1 Trap.

Queryin Reports alarms by alarm severity and category. The filter criteria are
g specified during alarm subscription.
alarms You can change filter criteria in real time when loading the MIB1.
by
criteria

Changin Changes filter criteria using the Set operation when the SNMP NBI is
g filter running. The filter criteria are specified during alarm subscription.
criteria The change will take effect without restarting the SNMP NBI.
in real
time

Acknowl Acknowledges or unacknowledges current alarms on NCE based on


edging/ alarm SNs.
Unackn
owledgi
ng
alarms

Clearing Clears alarms on NCE based on alarm SNs.


alarms

1.8.2.2 MIB Description


The complete HW-IMAPV1NORTHBOUND-TRAP-MIB MIB node information is as
follows:
iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1)
The MIB tree is shown as follows:
--- huawei(2011)
|--- products(2)
|--- hwNetManagement(15)
|--- hwNmAgent(1)

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 38


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

|---- hwNmFault(3)

hwNmFault defines the SNMP NBI.

For details about the function interfaces of MIB1, see 1.8.8.1 MIB1 Subinterfaces.

1.8.2.3 Alarm Fields Reported by MIB1


MIB1 supports 21 alarm fields. You can customize the alarm fields as required.

When the MIB frame is set to MIB1, the SNMP NBI reports the following alarm
fields. You can customize them as required.

T2000Support=0
The following table describes the fields reported by the SNMP NBI if
T2000Support is 0.

Table 1-18 T2000Support=0

Name Name in Description Value Parsing


the MIB Supporte
d

NE hwNmNort Name of the NE where an Octet No


Name hboundNEN alarm is generated. string
ame ● For alarms generated on an
NE, the NE name is
reported.
● For alarms generated due to
NE disconnection, the NE
name is reported. For
example, if alarms are
generated due to NE login
failures or NE disconnection,
the NE name is reported.
● For other NMS alarms, the
NMS name is reported. By
default, OSS is reported. If
the NMS name is changed,
the name of the changed
NMS is reported.

NE hwNmNort Type of the NE on which Octet No


Type hboundNET alarms are generated. For NMS string
ype alarms, the NMS name is
reported.

Object hwNmNort Location information. For Octet No


instanc hboundObj details, see Table 1-20. string
e ectInstance

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 39


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in Description Value Parsing


the MIB Supporte
d

Event hwNmNort Alarm type. For non-X.733- Octet Yes. See


Type hboundEve compliant alarms, options are string the
ntType as follows: enumerat
● Environment ed value.
● Equipment
● Communication
● Service
● Process
● Security
For X.733-compliant alarms,
options are as follows:
● EnvironmentalAlarm
● EquipmentAlarm
● CommunicationsAlarm
● QualityofServiceAlarm
● ProcessingErrorAlarm
● SecurityAlarm

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 40


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in Description Value Parsing


the MIB Supporte
d

Alarm hwNmNort Time when an alarm is Octet Yes. See


Occurre hboundEve generated, cleared, string the time
nce ntTime acknowledged, format.
Time unacknowledged, or changed.
● If an alarm is generated, this
parameter indicates the time
when the alarm is
generated.
● If an alarm is cleared, this
parameter indicates the time
when the alarm is cleared.
● If an alarm is acknowledged,
this parameter indicates the
time when the alarm is
acknowledged.
● If an alarm is
unacknowledged, this
parameter indicates the time
when the alarm is
unacknowledged.
● If an alarm is changed, this
parameter indicates the time
when the alarm is changed.
The options can be in any of
the following formats:
● UTC time. The format is
YYYY/MM/DD - hh:mm:ssZ,
for example, 2009/12/23 -
11:30:30Z.
● Local time without the time
zone. The format is
YYYY/MM/DD - hh:mm:ss,
for example, 2009/12/23 -
19:30:30.
● Local time with the time
zone. The format is
YYYY/MM/DD - hh:mm:ss,
hh:mmTZ[DST], where TZ
stands for the time zone
information and DST stands
for the DST offset. The
following lists examples:
– 2009/12/23 - 19:30:30
+ 08:00[0] (The date is
not in DST.)

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 41


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in Description Value Parsing


the MIB Supporte
d

– 2009/12/23 - 19:30:30
+ 08:00[+01:00] (The DST
offset is 1 hour.)
● Local time. The format is
YYYY-MM-dd hh:mm:ss +
hh:mm TZ + hh:mm DST,
where TZ stands for the time
zone information and DST
stands for the DST offset.
The following lists examples:
– 2009-12-23 19:30:30
+ 08:00 TZ (The date is
not in DST.)
– 2009-12-23 19:30:30
+ 08:00 TZ + 01:00 DST
(The DST offset is 1
hour.)
● UTC time. The format is
YYYY-MM-dd hh:mm:ss, for
example, 2009-12-23
11:30:30.

Alarm hwNmNort Possible causes for an alarm. Octet No


Cause hboundProb Format: ID: string
ableCause [ReasonId],DeviceType:
[DeviceTypeId],Alarm Cause

Alarm hwNmNort Alarm severity. Octet Yes. See


Severity hboundSeve ● Critical string the
rity enumerat
● Major ed value.
● Minor
● Warning
● Cleared: This option is
supported for X.733-
compliant alarms.

Alarm hwNmNort ID, device type, and details of Octet No


Details hboundEve an alarm. string
ntDetail Format: ID:
[AlarmId],DeviceType:
[DeviceTypeId],Alarm Details

Alarm hwNmNort Specific location of the NE Octet No


Locatio hboundAddi where an alarm is generated. string
n tionalInfo

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 42


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in Description Value Parsing


the MIB Supporte
d

Type hwNmNort Alarm type. Options are as Octet Yes. See


Flag hboundFaul follows: string the
tFlag ● Event: indicates that an enumerat
event is generated. ed value.
● Fault: indicates that an
alarm is generated.
● Recovery: indicates that the
alarm is cleared.
● Acknowledge: indicates that
the alarm is acknowledged.
● Unacknowledge: indicates
that the alarm is
unacknowledged.
● Change: indicates that the
alarm is changed.

Alarm hwNmNort Alarm type based on functions, Octet Yes. See


Functio hboundFaul which is the same as string the
n tFunction hwNmNorthboundEventType. enumerat
Categor ed value.
y

Manag hwNmNort IP address of the NE. IP No


ed hboundDevi address
Equipm ceIP
ent
Address

Alarm hwNmNort Sequence number of an alarm. Integer No


Serial hboundSeri
Numbe alNo
r

Alarm hwNmNort Advice for clearing alarms. Octet No


Clearan hboundProb Format: ID: string
ce ableRepair [ReasonId],DeviceType:
Advice [DeviceTypeId],Alarm Clearance
Advice

Resourc hwNmNort ID of the resource where an Octet No


e ID hboundRes alarm is generated. string
ourceIDs

Event hwNmNort Name of an alarm. Octet No


Name hboundEve Format: ID: string
ntName [AlarmId],DeviceType:
[DeviceTypeId],Event Name

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 43


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in Description Value Parsing


the MIB Supporte
d

Alarm hwNmNort Alarm cause ID. Integer No


Cause hboundReas
ID onID

Alarm hwNmNort Alarm ID. Integer No


ID hboundFaul
tID

Manag hwNmNort Managed device type. Octet No


ed hboundDevi string
Equipm ceType
ent
Type

Trail hwNmNort Name of the trail affected by Octet No


Name hboundTrail an alarm. If alarm A affects a string
Name trail, a new change alarm B will
be generated. The sequence
number of alarm B is the same
as that of alarm A. The severity
of alarm B is Change. Trail
Name in alarm B indicates the
affected trail. However, for
alarm A, Trail Name is blank.

Root hwNmNort Whether the alarm is the root Integer Yes. See
Alarm hboundRoo alarm or not. Options are as the
tAlarm follows: enumerat
● 0: Non-root alarm ed value.
● 1: Root alarm

Group hwNmNort ID of the alarm group. Integer No


ID hboundGro
upID

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 44


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in Description Value Parsing


the MIB Supporte
d

Enginee hwNmNort Whether this alarm is Integer Yes. See


ring hboundMai generated by the NE in the the
Alarm ntainStatus engineering maintenance state. enumerat
Status Maintenance engineers can ed value.
focus on engineering alarms
selectively.
● 0: Non-engineering alarms
● 1: Engineering alarms
NOTE
NEs during engineering
commissioning or service cutover
generate a large number of
alarms, and you can set the NEs to
the engineering maintenance
state. Therefore, the alarms
generated by this kind of NE are
engineering alarms.

Root hwNmNort Sequence number of the root Octet No


Alarm hboundRoo alarm. string
Serial tAlarmSeria
Numbe lNo
r

Alarm hwNmNort Alarm acknowledgement Integer Yes. See


Acknow hboundConf status. the
ledgem irmStatus ● 1: acknowledged enumerat
ent ed value.
Status ● 2: unacknowledged

Alarm hwNmNort Alarm clearance status. Integer Yes. See


Clearan hboundRest ● 1: cleared the
ce oreStatus enumerat
Status ● 2: uncleared ed value.

T2000Support=1
The following table describes the fields reported by the SNMP NBI if
T2000Support is 1.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 45


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-19 T2000Support=1


Name Name in the MIB Description

Object hwNmNorthboun Format: source=[NE Name] location=[location


instance dObjectInstance information]
source indicates the alarm source, and
location indicates the location information.
Example: source=CE1-test-1 location=User
name=VTY user IP=10.78.224.206 User
channel=VTY4 Sequence number:649018

Alarm hwNmNorthboun The alarm cause ID and NE ID are not


Cause dProbableCause reported, and only the alarm cause is
contained.
Example: The user logs out or fails to log in.

Alarm hwNmNorthboun The alarm ID and NE ID are not reported, and


Details dEventDetail only the alarm details are contained.
Example: NE NE(9-8886) not login

Alarm hwNmNorthboun The alarm cause ID and NE ID are not


Clearance dProbableRepair reported, and only the alarm clearance advice
Advice is contained.
Example: None

Event hwNmNorthboun The alarm ID and NE ID are not reported, and


Name dEventName only the event name is contained.
Example: NE_NOT_LOGIN

Location Information Format

Table 1-20 Location information format


Location Information Format Description

Format: [Location Information] Alarm information of IP NEs.


[Additional Information]

1.8.2.4 MIB1 Trap


The SNMP NBI supports the following traps when MIB1 is loaded.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 46


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.2.4.1 Alarm Notification Trap

Function
When alarms are generated on NEs or iMaster NCE-Fabric, iMaster NCE-Fabric
actively sends this type of traps to inform third-party systems of real-time alarms
automatically using the SNMP NBI.

Trigger Condition
When alarms are generated on NEs or iMaster NCE-Fabric, alarm notification
traps are triggered.

Definition
Name OID Type Description

hwNmNorthboun 1.3.6.1.4.1.2011.2. Trap/Inform Real-time alarms


dEventNotify 15.1.7.1.0.1 are reported.

VB List
NOTE

The definitions of alarm fields in alarm synchronization result traps are the same as those
in alarm notification traps. The only difference is that the former is iMaster NCE-Fabric's
response to the query of valid alarms, whereas the latter is actively reported by iMaster
NCE-Fabric.

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet NE name.


ndNEName .15.1.7.1.1 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet NE type.


ndNEType .15.1.7.1.2 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm location. The options


ndObjectInstanc .15.1.7.1.3 string are as follows:
e ● Rack
● Frame
● Slot
● Subslot
● Port

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 47


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Type of an event. The options


ndEventType .15.1.7.1.4 string are as follows:
● Communication
● Environment
● Equipment
● Service
● Process
● Security

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Time when the alarm was


ndEventTime .15.1.7.1.5 string generated. The format is as
follows:
● Local time without time
zone in the format of
yyyy/MM/dd - hh:mm:ss
● UTC time in the format of
yyyy/MM/dd - hh:mm:ssZ
● Local time with time zone
in the format of
yyyy/MM/dd -
hh:mm:ssTZ[DST]
● Local time in the format
of yyyy-MM-dd hh:mm:ss
+ hh:mm TZ + hh:mm DST
● UTC time in the format of
YYYY-MM-dd hh:mm:ss

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Possible causes of an alarm.


ndProbableCaus .15.1.7.1.6 string
e

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm severity. The options


ndSeverity .15.1.7.1.7 string are as follows:
● Critical
● Major
● Minor
● Warning
● Indeterminate

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm ID and detailed


ndEventDetail .15.1.7.1.8 string information.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Additional information of an


ndAdditionalInfo .15.1.7.1.9 string NE.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 48


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Flag bit for an alarm. The


ndFaultFlag .15.1.7.1.10 string options are as follows:
● Event: indicates that an
event is generated.
● Fault: indicates that an
alarm is generated.
● Recovery: indicates that
the alarm is cleared.
● Acknowledge: indicates
that the alarm is
acknowledged.
● Unacknowledge: indicates
that the alarm is
unacknowledged.
● Change: indicates that the
alarm is changed.
● UNKNOWN_EVENT_TYPE:
unknown event type.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm type. The options are


ndFaultFunction .15.1.7.1.11 string as follows:
● Environment
● Equipment
● Communication
● Service
● Security
● Process

hwNmNorthbou 1.3.6.1.4.1.2011.2 IpAddres IP address of an NE.


ndDeviceIP .15.1.7.1.12 s

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER SN of an alarm.


ndSerialNo .15.1.7.1.13

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm troubleshooting


ndProbableRepai .15.1.7.1.14 string suggestions.
r

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet ID of a resource.


ndResourceIDs .15.1.7.1.15 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm UUID of the physical


ndsAdditionalVB .15.1.7.1.16 string resources (NEs, boards, and
1 ports) in the IP domain.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 49


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.17 string
2

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.18 string
3

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.19 string
4

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.20 string
5

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.21 string
6

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.22 string
7

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.23 string
8

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Name of an event.


ndEventName .15.1.7.1.24 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER Alarm ID.


ndReasonID .15.1.7.1.25

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER Fault ID of an alarm.


ndFaultID .15.1.7.1.26

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Device type ID of an alarm.


ndDeviceType .15.1.7.1.27 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Name of the trail affected by


ndTrailName .15.1.7.1.28 string an alarm.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Whether the alarm is the


ndRootAlarm .15.1.7.1.29 root alarm.
● 0: non-root alarm
● 1: root alarm

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Alarm group ID.


ndGroupID .15.1.7.1.30

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 50


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Engineering alarm status.


ndMaintainStatu .15.1.7.1.31
s

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet SN of the root alarm.


ndRootAlarmSeri .15.1.7.1.32 string
alNo

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Alarm acknowledgement


ndConfirmStatus .15.1.7.1.33 status.
● 1: acknowledged
● 2: unacknowledged

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Alarm clearance status.


ndRestoreStatus .15.1.7.1.34 ● 1: cleared
● 2: uncleared

Example
The following is an example of the real-time alarm trap complying with SNMPv3:
hwNmNorthboundEventNotify
Message reception date: 2020/3/22
Message reception time: 0:03:07.120
Time stamp: 0 days 01h:41m:36s.96th (609696)
Message type: Notification (Trap)
Protocol version: SNMPv3
Transport: IP/UDP
Agent
Address: 10.185.199.167
Port: 6666
Manager
Address: 192.168.57.114
Port: 8899
Security parameters
Security level: Authentication and Privacy
Security name: admin
Security engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Context engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Authentication protocol: HMAC SHA
Privacy protocol: CFB AES 128
Bindings (25)
Binding #1: sysUpTime.0 *** (TimeTicks) 0 days 01h:41m:36s.96th (609696)
Binding #2: snmpModules.1.1.4.1.0 *** (object identifier) hwNmNorthboundEventNotify
Binding #3: hwNmNorthboundNEName.0 *** (OCTET STRING) OSS
Binding #4: hwNmNorthboundNEType.0 *** (OCTET STRING) OSS
Binding #5: hwNmNorthboundObjectInstance.0 *** (OCTET STRING) source=OSS location=Product
Name=iMaster NCE-Fabric
Binding #6: hwNmNorthboundEventType.0 *** (OCTET STRING) Process
Binding #7: hwNmNorthboundEventTime.0 *** (OCTET STRING) 2020/03/21 - 15:00:59Z
Binding #8: hwNmNorthboundProbableCause.0 *** (OCTET STRING) (zero-length)
Binding #9: hwNmNorthboundSeverity.0 *** (OCTET STRING) Warning
Binding #10: hwNmNorthboundEventDetail.0 *** (OCTET STRING)
Binding #11: hwNmNorthboundAdditionalInfo.0 *** (OCTET STRING) Weak algorithm: CBC
algorithm(Port:22) ;Weak protocol: NA ;Plaintext transmission port: NA
Binding #12: hwNmNorthboundFaultFlag.0 *** (OCTET STRING) Acknowledge
Binding #13: hwNmNorthboundFaultFunction.0 *** (OCTET STRING) Process

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 51


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Binding #14: hwNmNorthboundDeviceIP.0 *** (IpAddress) 192.168.128.158


Binding #15: hwNmNorthboundSerialNo.0 *** (Integer32) 77040
Binding #16: hwNmNorthboundProbableRepair.0 *** (OCTET STRING) (zero-length)
Binding #17: hwNmNorthboundResourceIDs.0 *** (OCTET STRING) -1.-1.-1.-1.-1.-1.-1.-1
Binding #18: hwNmNorthboundEventName.0 *** (OCTET STRING) Weak Algorithms or Protocols Exist
Binding #19: hwNmNorthboundReasonID.0 *** (Integer32) 0
Binding #20: hwNmNorthboundFaultID.0 *** (Integer32) 317
Binding #21: hwNmNorthboundDeviceType.0 *** (OCTET STRING) 0
Binding #22: hwNmNorthboundTrailName.0 *** (OCTET STRING) (zero-length)
Binding #23: hwNmNorthboundRootAlarm.0 *** (Integer32) 0
Binding #24: hwNmNorthboundGroupID.0 *** (Integer32) 100000
Binding #25: hwNmNorthboundMaintainStatus.0 *** (Integer32) 0

1.8.2.4.2 Alarm Synchronization Start Trap


The alarm synchronization start trap
(hwNmNorthboundEventSynchronizationCommandStart) informs the OSS that
alarm synchronization has started.

Function
After the OSS sends alarm query requests, the SNMP NBI returns this type of trap
to the OSS to indicate that alarm synchronization has started.

Trigger Condition
The OSS triggers the alarm synchronization. For details, see 1.8.8.1.3
Synchronizing Alarms.
The OSS sets hwNmNorthboundEventSynchronizationCommandStart in the
following format:
NMS IP address:Port:Start time:End time

NOTE

● NMS IP address:Port refers to the IP address and port of the OSS.


● The format for the start time and end time is YYYYMMDDhhmmss.

Definition
Name ENTERPRISE Type Description

hwNmNorthboun hwNmNorthboun Trap/Inform Alarm


dEventSynchroni- dEventSynchroni- synchronization
zationStartNotify zationStart start trap.

VB List
None

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 52


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.2.4.3 Alarm Synchronization Result Trap

Function
After the third-party system sends an alarm synchronization request, iMaster NCE-
Fabric sends the alarm synchronization trap through the SNMP NBI to return
alarms meeting the query conditions to the third-party system.

Trigger Condition
The third-party system triggers alarm synchronization.
The third-party system sets
hwNmNorthboundEventSynchronizationCommandStart in the MIB to start
alarm synchronization. Format: NMS IP address:port number:start time:end time

NOTE

● NMS IP address:port number indicates the IP address and port number of the third-party
system.
● The format for start and end time is YYYYMMDDhhmmss.

Definition
Name OID Type Description

hwNmNorthboun 1.3.6.1.4.1.2011.2. Trap/Inform Alarm


dEventSynchroni- 15.1.7.7.2.0.10 synchronization
zationQueryResult result.
Notify

VB List
NOTE

The definitions of alarm fields in alarm synchronization result traps are the same as those
in alarm notification traps. The only difference is that the former is iMaster NCE-Fabric's
response to the query of valid alarms, whereas the latter is actively reported by iMaster
NCE-Fabric.

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet NE name.


ndNEName .15.1.7.1.1 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet NE type.


ndNEType .15.1.7.1.2 string

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 53


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm location. The options


ndObjectInstanc .15.1.7.1.3 string are as follows:
e ● Rack
● Frame
● Slot
● Subslot
● Port

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Type of an event. The options


ndEventType .15.1.7.1.4 string are as follows:
● Communication
● Environment
● Equipment
● Service
● Process
● Security

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Time when the alarm was


ndEventTime .15.1.7.1.5 string generated. The format is as
follows:
● Local time without time
zone in the format of
yyyy/MM/dd - hh:mm:ss
● UTC time in the format of
yyyy/MM/dd - hh:mm:ssZ
● Local time with time zone
in the format of
yyyy/MM/dd - HH:mm:ss
TZ[DST]
● Local time in the format
of yyyy-MM-dd hh:mm:ss
+ hh:mm TZ + hh:mm DST
● UTC time in the format of
YYYY-MM-dd hh:mm:ss

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Possible causes of an alarm.


ndProbableCaus .15.1.7.1.6 string
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 54


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm severity. The options


ndSeverity .15.1.7.1.7 string are as follows:
● Critical
● Major
● Minor
● Warning
● Indeterminate

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm ID and detailed


ndEventDetail .15.1.7.1.8 string information.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Additional information of an


ndAdditionalInfo .15.1.7.1.9 string NE.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Flag bit for an alarm. The


ndFaultFlag .15.1.7.1.10 string options are as follows:
● Event: indicates that an
event is generated.
● Fault: indicates that an
alarm is generated.
● Recovery: indicates that
the alarm is cleared.
● Acknowledge: indicates
that the alarm is
acknowledged.
● Unacknowledge: indicates
that the alarm is
unacknowledged.
● Change: indicates that the
alarm is changed.
● UNKNOWN_EVENT_TYPE:
unknown event type.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm type. The options are


ndFaultFunction .15.1.7.1.11 string as follows:
● Communication
● Environment
● Equipment
● Service
● Process
● Security

hwNmNorthbou 1.3.6.1.4.1.2011.2 IpAddres IP address of an NE.


ndDeviceIP .15.1.7.1.12 s

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 55


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER SN of an alarm.


ndSerialNo .15.1.7.1.13

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm troubleshooting


ndProbableRepai .15.1.7.1.14 string suggestions.
r

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet ID of a resource.


ndResourceIDs .15.1.7.1.15 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Alarm UUID of the physical


ndsAdditionalVB .15.1.7.1.16 string resources (NEs, boards, and
1 ports) in the IP domain.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.17 string
2

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.18 string
3

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.19 string
4

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.20 string
5

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.21 string
6

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.22 string
7

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Reserved field.


ndsAdditionalVB .15.1.7.1.23 string
8

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Name of an event.


ndEventName .15.1.7.1.24 string

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER Alarm ID.


ndReasonID .15.1.7.1.25

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER Fault ID of an alarm.


ndFaultID .15.1.7.1.26

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Device type ID of an alarm.


ndDeviceType .15.1.7.1.27 string

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 56


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name in the OID Type Description


MIB

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet Name of the trail affected by


ndTrailName .15.1.7.1.28 string an alarm.

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Whether the alarm is the


ndRootAlarm .15.1.7.1.29 root alarm.
● 0: non-root alarm
● 1: root alarm

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Alarm group ID.


ndGroupID .15.1.7.1.30

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Engineering alarm status.


ndMaintainStatu .15.1.7.1.31
s

hwNmNorthbou 1.3.6.1.4.1.2011.2 Octet SN of the root alarm.


ndRootAlarmSeri .15.1.7.1.32 string
alNo

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Alarm acknowledgement


ndConfirmStatus .15.1.7.1.33 status.
● 1: acknowledged
● 2: unacknowledged

hwNmNorthbou 1.3.6.1.4.1.2011.2 Integer Alarm clearance status.


ndRestoreStatus .15.1.7.1.34 ● 1: cleared
● 2: uncleared

Example
The following is an example of the alarm synchronization trap complying with
SNMPv3:
hwNmNorthboundEventSynchronizationQueryResultNotify
Message reception date: 2020/3/21
Message reception time: 23:53:52.074
Time stamp: 0 days 01h:32m:21s.92th (554192)
Message type: Notification (Trap)
Protocol version: SNMPv3
Transport: IP/UDP
Agent
Address: 10.185.199.167
Port: 6666
Manager
Address: 192.168.57.114
Port: 8899
Security parameters
Security level: Authentication and Privacy
Security name: admin
Security engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Context engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Authentication protocol: HMAC SHA
Privacy protocol: CFB AES 128
Bindings (25)

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 57


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Binding #1: sysUpTime.0 *** (TimeTicks) 0 days 01h:32m:21s.92th (554192)


Binding #2: snmpModules.1.1.4.1.0 *** (object identifier)
hwNmNorthboundEventSynchronizationQueryResultNotify
Binding #3: hwNmNorthboundNEName.0 *** (OCTET STRING) OSS
Binding #4: hwNmNorthboundNEType.0 *** (OCTET STRING) OSS
Binding #5: hwNmNorthboundObjectInstance.0 *** (OCTET STRING) source=OSS location=neName=test,
neIP=10.10.101.1, neBackupIP=NULL, NE error port=6007, NE error code=N/A, Error message=Failed to set
up ssl connections towards the peer end, Mediation pa ...
Binding #6: hwNmNorthboundEventType.0 *** (OCTET STRING) Process
Binding #7: hwNmNorthboundEventTime.0 *** (OCTET STRING) 2019/11/01 - 09:14:08Z
Binding #8: hwNmNorthboundProbableCause.0 *** (OCTET STRING) (zero-length)
Binding #9: hwNmNorthboundSeverity.0 *** (OCTET STRING) Critical
Binding #10: hwNmNorthboundEventDetail.0 *** (OCTET STRING)
Binding #11: hwNmNorthboundAdditionalInfo.0 *** (OCTET STRING) Changed Error message=Failed to
set up ssl connections towards the peer end
Binding #12: hwNmNorthboundFaultFlag.0 *** (OCTET STRING) Fault
Binding #13: hwNmNorthboundFaultFunction.0 *** (OCTET STRING) Process
Binding #14: hwNmNorthboundDeviceIP.0 *** (IpAddress) 192.168.128.158
Binding #15: hwNmNorthboundSerialNo.0 *** (Integer32) 10008
Binding #16: hwNmNorthboundProbableRepair.0 *** (OCTET STRING) (zero-length)
Binding #17: hwNmNorthboundResourceIDs.0 *** (OCTET STRING) 256.-1.-1.-1.-1.-1.-1.-1
Binding #18: hwNmNorthboundEventName.0 *** (OCTET STRING) NE Is Disconnected
Binding #19: hwNmNorthboundReasonID.0 *** (Integer32) 0
Binding #20: hwNmNorthboundFaultID.0 *** (Integer32) 301
Binding #21: hwNmNorthboundDeviceType.0 *** (OCTET STRING) 0
Binding #22: hwNmNorthboundTrailName.0 *** (OCTET STRING) (zero-length)
Binding #23: hwNmNorthboundRootAlarm.0 *** (Integer32) 0
Binding #24: hwNmNorthboundGroupID.0 *** (Integer32) 100000
Binding #25: hwNmNorthboundMaintainStatus.0 *** (Integer32) 0

1.8.2.4.4 Alarm Synchronization End Trap

Function
iMaster NCE-Fabric sends the alarm synchronization end trap to inform the third-
party system of the end of alarm synchronization. After the third-party system
receives the trap, the alarm query is complete.

Trigger Condition
Alarm synchronization end traps are triggered when:

● All alarms meeting the query conditions have been sent in traps to the third-
party system from iMaster NCE-Fabric.
● The third-party stops the synchronization.

The third-party system triggers the termination of synchronization.

The third-party system sets


hwNmNorthboundEventSynchronizationCommandStop in the MIB to stop
alarm synchronization. The SNMP NBI stops alarm synchronization with the third-
party system of the corresponding IP address and port number. The format is

NMS IP address:port number

NOTE

NMS IP address:port number indicates the IP address and port number of the third-party
system.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 58


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Definition
Name OID Type Description

hwNmNorthboun 1.3.6.1.4.1.2011.2. Trap/Inform Alarm


dEventSynchroni- 15.1.7.7.3.0.11 synchronization
zationEndNotify end trap.

VB List
VB OID Data Description
Type

hwNmNorthbou 1.3.6.1.4.1.2011.2 INTEGER Alarm synchronization result.


ndEventSynchron .15.1.7.7.3.1 The options are as follows:
izationEndStatus 1: normalEnd(1), which
indicates that the
synchronization was
complete.
2: stopped(2), which indicates
that the OSS stopped the
synchronization.
3: error(3), which indicates
that exceptions occurred
during the synchronization.

hwNmNorthbou 1.3.6.1.4.1.2011.2 OCTET Details about the


ndEventSynchron .15.1.7.7.3.2 STRING synchronization result.
izationEndStatus
Detail

Example
The following is an example of the alarm synchronization end trap complying with
SNMPv3:
hwNmNorthboundEventSynchronizationEndNotify
Message reception date: 2020/3/21
Message reception time: 23:53:52.137
Time stamp: 0 days 01h:32m:21s.98th (554198)
Message type: Notification (Trap)
Protocol version: SNMPv3
Transport: IP/UDP
Agent
Address: 10.185.199.167
Port: 6666
Manager
Address: 192.168.57.114
Port: 8899
Security parameters
Security level: Authentication and Privacy
Security name: admin
Security engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Context engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 59


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Authentication protocol: HMAC SHA


Privacy protocol: CFB AES 128
Bindings (4)
Binding #1: sysUpTime.0 *** (TimeTicks) 0 days 01h:32m:21s.98th (554198)
Binding #2: snmpModules.1.1.4.1.0 *** (object identifier)
hwNmNorthboundEventSynchronizationEndNotify
Binding #3: hwNmNorthboundEventSynchronizationEndStatus.0 *** (INTEGER) normalEnd(1)
Binding #4: hwNmNorthboundEventSynchronizationEndStatusDetail.0 *** (OCTET STRING) Sync End:
Successfully queried all alarms!

1.8.2.4.5 KeepAlive Info (Heartbeat) Trap

Function
iMaster NCE-Fabric regularly sends heartbeat traps to the third-party system in
each heartbeat period. If the third-party system receives the traps, the connection
between the third-party system and iMaster NCE-Fabric is normal. If the third-
party system does not receive traps within the heartbeat period and the heartbeat
is unavailable, the third-party system is disconnected from iMaster NCE-Fabric.

NOTE

A period ranges from 3 to 300 seconds, and is 60 seconds by default.

Trigger Condition
iMaster NCE-Fabric sends the KeepAlive info (heartbeat) trap to the OSS regularly
in the preset period.

Definition
Name OID Type Description

hwNmNorthboundE- 1.3.6.1.4.1.2011.2.15.1.7.2. Trap/ Notification for


ventKeepAlive 0.2 Inform the Keep Alive
traps.

VB List
Name OID Data Type Descriptio
n

hwNmAgent 1.3.6.1.4.1.2011.2.15.1 OCTET STRING By default,


this field is
reported.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 60


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name OID Data Type Descriptio


n

hwNmNorthbound 1.3.6.1.4.1.2011.2.15.1.7.2.1 OCTET STRING You can


KeepAlive make
configurati
ons for the
heartbeat
notificatio
n trap to
report this
field.

NOTICE

By default, the heartbeat notification trap reports the hwNMAgent field. You can
make modifications for the trap to report the hwNmNorthboundKeepAlive field.

Example
The following is an example of the heartbeat trap complying with SNMPv3:
hwNmNorthboundEventKeepAlive
Message reception date: 2020/3/21
Message reception time: 23:53:31.661
Time stamp: 0 days 01h:32m:01s.51th (552151)
Message type: Notification (Trap)
Protocol version: SNMPv3
Transport: IP/UDP
Agent
Address: 10.185.199.167
Port: 6666
Manager
Address: 192.168.57.114
Port: 8899
Security parameters
Security level: Authentication and Privacy
Security name: admin
Security engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Context engine ID: 0x80 0x00 0x13 0x70 0x01 0xC0 0xA8 0x80 0x9E
Authentication protocol: HMAC SHA
Privacy protocol: CFB AES 128
Bindings (3)
Binding #1: sysUpTime.0 *** (TimeTicks) 0 days 01h:32m:01s.51th (552151)
Binding #2: snmpModules.1.1.4.1.0 *** (object identifier) hwNmNorthboundEventKeepAlive
Binding

1.8.2.5 MIB1 Trap Sample


MIB1 supports five types of traps: alarm notification trap, alarm synchronization
start trap, alarm synchronization result trap, alarm synchronization end trap, and
heartbeat trap. The samples in this section use SNMPv1 as an example. SNMPv2c
and SNMPv3 are similar to SNMPv1.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 61


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.2.5.1 Active Alarm Notification Trap

Description of the T2000support Configuration Item


The default value of the T2000support configuration item is 1. Check and change
the value before an upgrade to ensure compatibility. You must configure the item
manually.

mib1.T2000Support=0
13: Specific trap hwNmNorthboundEventInfo::hwNmNorthboundEventNotify #1 trap(v1)
received from: 10.71.224.13 at 2011-12-27 16:19:58
Time stamp: 0 days 00h:05m:29s.09th
Agent address: 10.71.224.13 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.71.97 Port: 6666 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.224.13
Enterprise: hwNmNorthboundEventInfo
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventNotify, Module: HW-IMAPV1NORTHBOUND-TRAP-MIB,
Enterprise: hwNmNorthboundEventInfo
Bindings (24)
Binding #1: hwNmNorthboundNEName.0 *** (octets) NE(9-3500)
Binding #2: hwNmNorthboundNEType.0 *** (octets) OptiX OSN 3500
Binding #3: hwNmNorthboundObjectInstance.0 *** (octets) Slot=4 Port=1 TTP_TYPE=1 4-
N1SL16-1(SDH-1)-SPI:1
Binding #4: hwNmNorthboundEventType.0 *** (octets) Communication
Binding #5: hwNmNorthboundEventTime.0 *** (octets) 2011/04/27 - 16:11:30
Binding #6: hwNmNorthboundProbableCause.0 *** (octets) ID:1,DeviceType:0,
(1)The fiber jumper is not connected at the optical interface of the board;
(2)The laser of the board on the opposite station is shutdown;
(3)A fiber break occurs in the transm ...
Binding #7: hwNmNorthboundSeverity.0 *** (octets) Critical
Binding #8: hwNmNorthboundEventDetail.0 *** (octets) ID:1,DeviceType:0,Loss of signal
Binding #9: hwNmNorthboundAdditionalInfo.0 *** (octets)
Alarm Parameter(hex) 0x01 0x00 0x01 0x01 0x01
Binding #10: hwNmNorthboundFaultFlag.0 *** (octets) Fault
Binding #11: hwNmNorthboundFaultFunction.0 *** (octets) Communication
Binding #12: hwNmNorthboundDeviceIP.0 *** (ipaddr) 10.70.71.97
Binding #13: hwNmNorthboundSerialNo.0 *** (int32) 85415
Binding #14: hwNmNorthboundProbableRepair.0 *** (octets) ID:1,DeviceType:0,
Binding #15: hwNmNorthboundResourceIDs.0 *** (octets) 3145893.-1.4.1.1.1.-1.-1
Binding #16: hwNmNorthboundEventName.0 *** (octets) ID:1,DeviceType:0,R_LOS
Binding #17: hwNmNorthboundReasonID.0 *** (int32) 1
Binding #18: hwNmNorthboundFaultID.0 *** (int32) 1
Binding #19: hwNmNorthboundDeviceType.0 *** (octets) 0
Binding #20: hwNmNorthboundTrailName.0 *** (octets) PWE3:2
Binding #21: hwNmNorthboundRootAlarm.0 *** (int32) 0
Binding #22: hwNmNorthboundGroupID.0 *** (int32) 268374017
Binding #23: hwNmNorthboundMaintainStatus.0 *** (int32) 0
Binding #24: hwNmNorthboundRootAlarmSerialNo.0 *** (octets) (zero-length)

mib1.T2000Support=1
21: Specific trap hwNmNorthboundEventInfo::hwNmNorthboundEventNotify #1 trap(v1)
received from: 10.71.224.13 at 2011-4-27 16:25:24
Time stamp: 0 days 00h:02m:02s.27th
Agent address: 10.71.224.13 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.71.97 Port: 6666 Transport: IP/UDP
Community: ********

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 62


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

SNMPv1 agent address: 10.71.224.13


Enterprise: hwNmNorthboundEventInfo
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventNotify, Module: HW-IMAPV1NORTHBOUND-TRAP-MIB,
Enterprise: hwNmNorthboundEventInfo
Bindings (24)
Binding #1: hwNmNorthboundNEName.0 *** (octets) NE(9-3500)
Binding #2: hwNmNorthboundNEType.0 *** (octets) OptiX OSN 3500
Binding #3: hwNmNorthboundObjectInstance.0 *** (octets) source=NE(9-3500) location=4-
N1SL16-1(SDH-1)-SPI:1
Binding #4: hwNmNorthboundEventType.0 *** (octets) Communication
Binding #5: hwNmNorthboundEventTime.0 *** (octets) 2011/04/27 - 16:11:30
Binding #6: hwNmNorthboundProbableCause.0 *** (octets)
(1)The fiber jumper is not connected at the optical interface of the board;
(2)The laser of the board on the opposite station is shutdown;
(3)A fiber break occurs in the transmission line;
(4) T ...
Binding #7: hwNmNorthboundSeverity.0 *** (octets) Critical
Binding #8: hwNmNorthboundEventDetail.0 *** (octets) Loss of signal
Binding #9: hwNmNorthboundAdditionalInfo.0 *** (octets)
Alarm Parameter(hex) 0x01 0x00 0x01 0x01 0x01
Binding #10: hwNmNorthboundFaultFlag.0 *** (octets) Fault
Binding #11: hwNmNorthboundFaultFunction.0 *** (octets) Communication
Binding #12: hwNmNorthboundDeviceIP.0 *** (ipaddr) 10.70.71.97
Binding #13: hwNmNorthboundSerialNo.0 *** (int32) 85417
Binding #14: hwNmNorthboundProbableRepair.0 *** (octets) (zero-length)
Binding #15: hwNmNorthboundResourceIDs.0 *** (octets) 3145893.-1.4.1.1.1.-1.-1
Binding #16: hwNmNorthboundEventName.0 *** (octets) R_LOS
Binding #17: hwNmNorthboundReasonID.0 *** (int32) 1
Binding #18: hwNmNorthboundFaultID.0 *** (int32) 1
Binding #19: hwNmNorthboundDeviceType.0 *** (octets) 0
Binding #20: hwNmNorthboundTrailName.0 *** (octets) PWE3:2
Binding #21: hwNmNorthboundRootAlarm.0 *** (int32) 0
Binding #22: hwNmNorthboundGroupID.0 *** (int32) 268374017
Binding #23: hwNmNorthboundMaintainStatus.0 *** (int32) 0
Binding #24: hwNmNorthboundRootAlarmSerialNo.0 *** (octets) (zero-length)

1.8.2.5.2 Active Alarm Synchronization Start Trap


After the OSS sends alarm synchronization requests to iMaster NCE-Fabric, the
SNMP NBI will return the start notification of alarm synchronization.
18: Specific trap
hwNmNorthboundEventSynchronizationStart::hwNmNorthboundEventSynchronizationStartNotif
y #9 trap(v1) received from: 10.71.88.151 at 2010-11-24 15:56:45
Time stamp: 0 days 00h:06m:24s.69th
Agent address: 10.71.88.151 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.73.96 Port: 8888 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.88.151
Enterprise: hwNmNorthboundEventSynchronizationStart
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventSynchronizationStartNotify, Module: HW-
IMAPV1NORTHBOUND-TRAP-MIB, Enterprise: hwNmNorthboundEventSynchronizationStart
Bindings (0)
None.

1.8.2.5.3 Active Alarm Synchronization Reporting Trap


After the OSS sends alarm synchronization requests to iMaster NCE-Fabric, the
SNMP NBI will report the active alarms in compliance with the filter criteria to the
OSS.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 63


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

101: Specific trap


hwNmNorthboundEventSynchronizationQueryResult::hwNmNorthboundEventSynchronizationQu
eryResultNotify #10 trap(v1) received from: 10.71.88.151 at 2011-12-24 15:56:49
Time stamp: 0 days 00h:06m:28s.55th
Agent address: 10.71.88.151 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.73.96 Port: 8888 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.88.151
Enterprise: hwNmNorthboundEventSynchronizationQueryResult
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventSynchronizationQueryResultNotify, Module: HW-
IMAPV1NORTHBOUND-TRAP-MIB, Enterprise:
hwNmNorthboundEventSynchronizationQueryResult
Bindings (24)
Binding #1: hwNmNorthboundNEName.0 *** (octets) NE(9-1954)
Binding #2: hwNmNorthboundNEType.0 *** (octets) OptiX PTN 3900
Binding #3: hwNmNorthboundObjectInstance.0 *** (octets) TUNNEL:
(463,10.10.10.11,10.10.10.12)
Binding #4: hwNmNorthboundEventType.0 *** (octets) Communication
Binding #5: hwNmNorthboundEventTime.0 *** (octets) 2010/10/31 - 17:09:46
Binding #6: hwNmNorthboundProbableCause.0 *** (octets) ID:12814,DeviceType:128450560,
1. The physical link fails.
2. The network is severely congested.
3. The opposite equipment is faulty.
Binding #7: hwNmNorthboundSeverity.0 *** (octets) Critical
Binding #8: hwNmNorthboundEventDetail.0 *** (octets) ID:12814,DeviceType:128450560,Loss
of Connectivity Verification defect
Binding #9: hwNmNorthboundAdditionalInfo.0 *** (octets)
Alarm Parameter II(hex) 0x0f
Binding #10: hwNmNorthboundFaultFlag.0 *** (octets) Fault
Binding #11: hwNmNorthboundFaultFunction.0 *** (octets) Communication
Binding #12: hwNmNorthboundDeviceIP.0 *** (octets) 10.78.217.248
Binding #13: hwNmNorthboundSerialNo.0 *** (int32) 60229
Binding #14: hwNmNorthboundProbableRepair.0 *** (octets) ID:12814,DeviceType:128450560,
Binding #15: hwNmNorthboundResourceIDs.0 *** (octets) 3145793.-1.-1.-1.-1.-1.-1.-1
Binding #16: hwNmNorthboundEventName.0 *** (octets) ID:12814,DeviceType:
128450560,MPLS_TUNNEL_LOCV
Binding #17: hwNmNorthboundReasonID.0 *** (int32) 12814
Binding #18: hwNmNorthboundFaultID.0 *** (int32) 0
Binding #19: hwNmNorthboundDeviceType.0 *** (octets) 128450560
Binding #20: hwNmNorthboundTrailName.0 *** (octets) PWE3:2
Binding #21: hwNmNorthboundRootAlarm.0 *** (int32) 0
Binding #22: hwNmNorthboundGroupID.0 *** (int32) 268374017
Binding #23: hwNmNorthboundMaintainStatus.0 *** (int32) 0
Binding #24: hwNmNorthboundRootAlarmSerialNo.0 *** (octets) (zero-length)

1.8.2.5.4 Active Alarm Synchronization End Trap


Active alarm synchronization end traps are triggered when all required alarms
have been reported to the OSS or the OSS automatically stops the
synchronization.

Synchronization Stopped After Alarm Reporting Was Complete


After all required alarms are reported to the OSS, iMaster NCE-Fabric sends traps
through the SNMP NBI to inform the OSS of the end of alarm reporting.
1335: Specific trap
hwNmNorthboundEventSynchronizationEnd::hwNmNorthboundEventSynchronizationEndNotify
#11 trap(v1) received from: 10.71.88.151 at 2010-11-24 15:57:45
Time stamp: 0 days 00h:07m:25s.16th

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 64


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Agent address: 10.71.88.151 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.73.96 Port: 8888 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.88.151
Enterprise: hwNmNorthboundEventSynchronizationEnd
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventSynchronizationEndNotify, Module: HW-
IMAPV1NORTHBOUND-TRAP-MIB, Enterprise: hwNmNorthboundEventSynchronizationEnd
Bindings (2)
Binding #1: hwNmNorthboundEventSynchronizationEndStatus.0 *** (int32) normalEnd(1)
Binding #2: hwNmNorthboundEventSynchronizationEndStatusDetail.0 *** (octets) Sync End:
Successfully queried all alarms!

Synchronization Was Stopped by the OSS


During the synchronization, the OSS automatically interrupts the process. iMaster
NCE-Fabric then reports traps to inform the OSS of the stop of alarm
synchronization, as a response to the request.

2420: Specific trap


hwNmNorthboundEventSynchronizationEnd::hwNmNorthboundEventSynchronizationEndNotify
#11 trap(v1) received from: 10.71.88.151 at 2010-11-24 16:04:01
Time stamp: 0 days 00h:13m:40s.35th
Agent address: 10.71.88.151 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.73.96 Port: 8888 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.88.151
Enterprise: hwNmNorthboundEventSynchronizationEnd
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventSynchronizationEndNotify, Module: HW-
IMAPV1NORTHBOUND-TRAP-MIB, Enterprise: hwNmNorthboundEventSynchronizationEnd
Bindings (2)
Binding #1: hwNmNorthboundEventSynchronizationEndStatus.0 *** (int32) stopped(2)
Binding #2: hwNmNorthboundEventSynchronizationEndStatusDetail.0 *** (octets) Sync
Stopped: The synchronization is stopped by the NMS's command!

Synchronization Was Stopped Unexpectedly


403: Specific trap
hwNmNorthboundEventSynchronizationEnd::hwNmNorthboundEventSynchronizationEndNotify
#11 trap(v1) received from: 10.71.224.13 at 2011-4-27 16:44:56
Time stamp: 0 days 00h:03m:31s.64th
Agent address: 10.71.224.13 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.71.97 Port: 6666 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.224.13
Enterprise: hwNmNorthboundEventSynchronizationEnd
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventSynchronizationEndNotify, Module: HW-
IMAPV1NORTHBOUND-TRAP-MIB, Enterprise: hwNmNorthboundEventSynchronizationEnd
Bindings (2)
Binding #1: hwNmNorthboundEventSynchronizationEndStatus.0 *** (int32) error(3)
Binding #2: hwNmNorthboundEventSynchronizationEndStatusDetail.0 *** (octets) Sync Error:
Query failed as Agent shutting down!

1.8.2.5.5 Heartbeat Trap


The SNMP NBI sends heartbeat traps to the OSS periodically. The OSS can check
the connection status based on the heartbeat traps.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 65


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTE

Two OIDs are supported.

hwNmAgent (Default)
795: Specific trap hwNmNorthboundEventKeepAliveInfo::hwNmNorthboundEventKeepAlive #2
trap(v1) received from: 10.71.88.151 at 2010-11-24 15:57:20
Time stamp: 0 days 00h:07m:00s.12th
Agent address: 10.71.88.151 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.70.73.96 Port: 8888 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.71.88.151
Enterprise: hwNmNorthboundEventKeepAliveInfo
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventKeepAlive, Module: HW-IMAPV1NORTHBOUND-TRAP-MIB,
Enterprise: hwNmNorthboundEventKeepAliveInfo
Bindings (1)
Binding #1: hwNmAgent *** (octets) SNMP Agent

hwNmNorthboundKeepAlive (Configurable-1.3.6.1.4.1.2011.2.15.1.7.2.1)
8: Specific trap hwNmNorthboundEventKeepAliveInfo::hwNmNorthboundEventKeepAlive #2
trap(v1) received from: 10.67.192.220 at 2012/6/26 11:19:13
Time stamp: 0 days 00h:00m:15s.04th
Agent address: 10.67.192.220 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.66.102.169 Port: 6666 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.67.192.220
Enterprise: hwNmNorthboundEventKeepAliveInfo
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventKeepAlive, Module: HW-IMAPV1NORTHBOUND-TRAP-MIB,
Enterprise: hwNmNorthboundEventKeepAliveInfo
Bindings (1)
Binding #1: hwNmNorthboundKeepAlive *** (octets) SNMP Agent

hwNmNorthboundKeepAlive (Configurable-1.3.6.1.4.1.2011.2.15.1.7.2.1.0)
3: Specific trap hwNmNorthboundEventKeepAliveInfo::hwNmNorthboundEventKeepAlive #2
trap(v1) received from: 10.78.219.70 at 2012/7/26 19:11:29
Time stamp: 0 days 00h:01m:45s.11th
Agent address: 10.78.219.70 Port: 6666 Transport: IP/UDP Protocol: SNMPv1 Trap
Manager address: 10.66.103.78 Port: 6666 Transport: IP/UDP
Community: ********
SNMPv1 agent address: 10.78.219.70
Enterprise: hwNmNorthboundEventKeepAliveInfo
Specific Trap MIB Lookup Results
Name: hwNmNorthboundEventKeepAlive, Module: HW-IMAPV1NORTHBOUND-TRAP-MIB,
Enterprise: hwNmNorthboundEventKeepAliveInfo
Bindings (1)
Binding #1: hwNmNorthboundKeepAlive.0 *** (octets) SNMP Agent

1.8.3 Collecting Interconnection Parameters


Interconnection parameters must be collected from the OSS's maintenance
engineers and confirmed before the SNMP NBI is configured to ensure that the
input parameters are correct. Otherwise, the OSS cannot receive alarms from or
connect to iMaster NCE-Fabric.
Table 1-21 and Table 1-22 list the information to be collected.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 66


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details about the parameter description, see 1.8.5.3 Configuration


Parameters.

Context

NOTICE

● Collect general parameters only and use default values for advanced
parameters.
● For iMaster NCE-Fabric upgrades, select the MIB structure carefully by referring
to 1.8.5.3.2 Advanced Configuration.
● For security purposes, the SNMP NBI does not support the following insecure
configuration items by default:
● Protocol version: SNMPv1 and SNMPv2c
● Security level: Not authenticated nor encrypted and Authenticated but not
encrypted
● Authentication protocol: MD5, SHA, and SHA2-224
● Encryption protocol: DES
● You can view, check, and modify the security configurations of the SNMP NBI in
Security Configuration. For details, see Security Configurations of the SNMP
NBI.
● SNMPv3 is recommended because it is securer than SNMPv1 and SNMPv2c.

Table 1-21 Basic settings

Parameter Description Default Value

Address for IP address used to send traps and IP address of


sending traps informs. If this parameter is set to an iMaster NCE-
invalid value, the northbound Fabric northbound
communication IP address will be communication IP
used. If multiple NICs are added, set address
this parameter to an IP address that
can communicate with the OSS.

Address for IP address used by the SNMP agent to IP address of


receiving requests receive requests from the OSS. iMaster NCE-
In the case of multiple NICs, set this Fabric northbound
parameter to the IP address that can communication IP
communicate with the OSS. address

Port for receiving Port of the SNMP service. It is used to 9812


requests receive requests from the OSS. The
default value is recommended.

Port for sending Port used to send traps and informs. 6666
traps The default value is recommended.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 67


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-22 Advanced parameters


Parameter Description Default
Value

SNMP MIB type Type of the MIB structure to be loaded. mib1


Agent Currently, iMaster NCE-Fabric supports
Settin only MIB1.
gs ● mib1: The OIDs corresponding to HW-
IMAPV2NORTHBOUND-TRAP-
MIB.mib are supported.
● mib2: The OIDs corresponding to
IMAP_NORTHBOUND_MIB-V2.mib
are supported.
● mib3: The OIDs corresponding to
T2000-NETMANAGEMENT-MIB.mib
are supported. It is used only for
transport devices.

Alarm Interval for sending traps to the OSS. The 0


reporting value ranges from 0 to 1000.
interval
(ms)

Time type Type of the alarm reporting time. UTC time

Time Format of the alarm reporting time. UTC time in


format Currently, the UTC time, local time the format of
without the time zone, and local time (yyyy/MM/dd
with the time zone are supported. - hh:mm:ssZ)
For details, see 1.8.5.3.2 Advanced
Configuration.

Maximum Maximum length of a character string 4096


length of that in the VB.
reported
alarm
fields

Query Whether to query active alarms. Yes


active ● No: Current alarms will be queried.
alarms
● Yes: Active alarms will be queried.

Alarm Character set encoding format of the UTF-8


encoding reported alarm traps.
format ● UTF-8
● ISO-8859-1
● GBK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 68


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default


Value

Record Whether to print PDU trace records in No


PDU in logs.
logs ● No: PDU trace records will not be
printed in logs.
● Yes: PDU trace records will be printed
in logs.

Filter Whether to report root alarms. No


correlative ● No: All alarms are reported, including
alarms common alarms, root alarms,
correlative alarms, and root and
correlative alarms.
● Yes: Only common alarms and root
alarms are reported.

Number of Cache size for real-time alarms. The value 10000


cached can range from 10000 to 50000.
alarms

Inform Alarm ● Inform: Alarms are reported in Trap


/Trap reporting informs.
Settin mode ● Trap: Alarms are reported in traps.
gs
Timeout This parameter is specified in the SNMP 5
period (s) inform protocol. It determines the
timeout period for sending inform
packets. The value can range from 1 to 5
seconds.

Number of This parameter is specified in the SNMP 3


retries inform protocol. It determines the
maximum number of times that an
inform packet can be retransmitted. The
value can range from 0 to 5.

SNMP Security By default, only secure protocols and Authenticated


v3 level algorithms are enabled. and
Param encrypted
eter
Settin Authentica Authentication protocol. SHA2-512
gs tion ● SHA2-256
protocol
● SHA2-384
● SHA2-512

Encryption Encryption protocol. AES-256


protocol ● AES-128
● AES-192
● AES-256

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 69


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default


Value

RFC Whether to convert the value of Engine Yes


specificati ID to comply with the RFC specifications.
ons ● Yes: Converts the Engine ID into a
value that complies with the RFC
specifications to report to the OSS.
● No: Directly reports the Engine ID to
the OSS.

Engine ID Engine ID, which is configurable and Engine ID


indicates the unique identifier of the automatically
SNMP entity. identified by
NOTE the system.
The value of Engine ID contains 5 to 32 The default
characters. Only combinations of the following
value is the IP
characters can be used: lowercase letters(a to
z), uppercase letters(A to Z), digits(0 to 9), address of
and special characters (=~!@#%^&*()-_+ the first NIC
[{}]:./?,) of the node
where
NBIService
service is
configured

Heart Report Whether to send heartbeat traps. Enable


beat heartbeat ● Disable: Heartbeat traps will not be
Period notificatio sent.
Settin ns
gs ● Enable: Heartbeat traps will be sent.

Heartbeat Period for sending heartbeat traps. The 60


period value of MIB1 ranges from 3 seconds to
(second) 300 seconds.

Heartbeat ID of a heartbeat trap. SNMP Agent


ID

SNMP Parameter Name of the configuration item of the -


NBI SNMP interface.
Advan
ced Value Name of the configuration item of the -
Param SNMP interface.
eter
Settin
gs

MIB Alarm Name of the NE where an alarm is -


Reporting Settings generated.

1.8.4 Important Notes


This section describes the important notes for configuring the SNMP NBI.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 70


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Configuring the SNMP NBI may affect OSS and other components of iMaster NCE-
Fabric. Modifying configuration items may also depend on iMaster NCE-Fabric
components. Therefore, confirm whether the configuration items to be modified
will bring such type of impact and submit a request to the customer for approval
before configuring the SNMP NBI.

Table 1-23 Basic configuration parameters


Item Impact on iMaster NCE- Description
Fabric

Alarm Field The alarm fields will be Confirm the alarm fields
changed if you modify and the detailed fields
this configuration item. with the OSS, and then
The OSS may fail to set this configuration
parse the alarm. item.

Encoding Format The encoding format of Confirm the character


alarms reported by the set of the OSS, and then
SNMP NBI will be set this configuration
changed if you modify item correctly. The
this configuration item. character sets supported
The OSS may fail to include UTF-8, GBK, and
parse the alarm. ISO-8859-1. The
character sets of the
SNMP NBI and OSS must
be the same. If the
character set of the
SNMP NBI is different
from that of the OSS,
garbled characters may
be displayed during the
parsing.

MIB Frame The OSS may fail to Currently, iMaster NCE-


parse the alarm reported Fabric supports only
by the SNMP NBI if you MIB1. Confirm with the
modify this configuration OSS whether the MIB
item. structure used by the
OSS is MIB1. If HW-
IMAPV1NORTHBOUND-
TRAP-MIB.mib or HW-
IMAPV2NORTHBOUND-
TRAP-MIB.mib is used,
set this parameter to
MIB1.

Impact of Maintenance Operations on the NBIs


The NBI system is installed automatically during the installation of iMaster NCE-
Fabric. You need to configure NBI parameters manually to enable the functions.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 71


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

● If the iMaster NCE-Fabric server is configured with multiple NICs and they are
in different network segments, set the IP address for connecting to the OSS as
the IP address selected by the SNMP NBI for alarm reporting (By default, the
IP address is the northbound network communication IP address. If you
manually change the IP address, you need to reconfigure the NBI
synchronously.) is the IP address of the NIC for connecting to the OSS of the
iMaster NCE-Fabric server to ensure that the iMaster NCE-Fabric server and
the OSS can communicate with each other. Otherwise, the OSS cannot
interconnect with the NBI of iMaster NCE-Fabric.
● You must configure the NBI again after the IP address of iMaster NCE-Fabric
is changed. By default, the northbound communication IP address specified
during iMaster NCE-Fabric installation is used as Address for receiving
requests and Address for sending traps. If the northbound communication
IP address is changed, you need to manually update Address for receiving
requests and Address for sending traps as follows:
a. Management plane: Choose Maintenance > Network Configuration >
Configure IP Address or Configure Floating IP Address from the main
menu. Select Modify IP Address.
b. Control Plane: Open the System app and choose System Settings >
Northbound Interface from the main menu. In the navigation tree on
the left, choose SNMP NBI > Basic Settings and modify Address for
receiving requests and Address for sending traps in the right pane.

1.8.5 Configuring the SNMP NBI

1.8.5.1 Configuration Operations


After iMaster NCE-Fabric is installed, the SNMP NBI is installed by default.
However, you need to configure the SNMP NBI parameters according to the
iMaster NCE-Fabric plan to enable the SNMP NBI.

Prerequisites
● The iMaster NCE-Fabric license includes the SNMP NBI function.
● SNMP NBI processes are running.

Configuring the SNMP NBI


iMaster NCE-Fabric provides the SNMP NBI configuration page to configure the
interconnection parameters between iMaster NCE-Fabric and the NMS. Select
desired parameters based on customized requirements.
Generally, advanced parameters are optional (default values are recommended).
Advanced parameters are independent of each other and no configuration order is
required.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 72


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Figure 1-10 Flowchart of configuring the SNMP NBI

Procedure
Step 1 Log in to the control plane as the admin user.
Step 2 Open the System app and choose System Settings > Northbound Interface from
the main menu..
Step 3 Choose SNMP NBI > Basic Settings from the navigation pane.
Step 4 On the Basic Settings page, set the IP addresses and port numbers for receiving
requests and sending traps.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 73


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details about the SNMP agent parameters, see 1.8.5.3.1 General Parameters.

1. Set the trap sending address/port and request receiving address/port.


By default, the trap sending port is 6666 and the request receiving port is
9812.

NOTICE

– Address for receiving requests and Address for sending traps both are
the iMaster NCE-Fabric server IP address. The SNMP NBI supports both
IPv4 and IPv6. If third-party system A requires IPv4 but third-party system
B requires IPv6, you can select both IPv4 and IPv6 addresses for the two
systems to communicate with at the same time. Ensure that this IP address
can be used for successful communication between iMaster NCE-Fabric
and the OSS.
– Refer to iMaster NCE-FabricCommunication Matrix before you configure
ports for the SNMP NBI. Before configuring these ports, ensure that the
specified ports are idle.
– The recommended port number is from 1025 to 32767.

2. In the case of SNMPv3, set the security level, authentication protocol, and
encryption protocol.
By default, iMaster NCE-Fabric supports SNMPv3.
On the Basic Settings page, click Advanced Settings > SNMPv3 Parameter
Settings. For details about SNMPv3 parameters, see SNMPv3 Parameter
Settings.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 74


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTICE

In the case of SNMPv3, it is recommended that the OSS use the more secure SHA
and AES algorithms.

Step 5 Choose SNMP NBI > Third-party System Settings from the navigation pane, click
Create, and set the parameters of the OSS. The port must be set to 162 or 10162.

For details about the parameter description, see 1.8.5.3.3 Third-Party NMS.
1. Set the server parameters of the OSS.
The value of IPv4 address is the IP address of the OSS server.
NOTE

– The value of IPv4 address is not the IP address of the iMaster NCE-Fabric server
but the IP address of the OSS. If the OSS uses two servers to receive traps and send
requests, the IP addresses for these two servers must be configured separately.
– To configure multiple third-party system users, you are advised to set different
read-write community names (v1 or v2) for them, use different usernames (v3), or
ensure that not all usernames are identical. If not all read-write community names
(v1 or v2) are identical, duplicate usernames (v3) exist, and the passwords for
authentication and encryption are different, the interworking may fail for some
users.
– Currently a maximum of 10 OSSs are supported.
2. Set SNMP security parameters.
The following are the default security parameters. SNMPv3 is recommended
for security concern. In the case of SNMPv3, set V3 User Name, V3
Authentication Password, and V3 Privacy Password. The default username
is admin.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 75


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTICE

In the case of SNMPv3, Security username is required.


To ensure the security of iMaster NCE-Fabric, change the passwords of
iMaster NCE-Fabric regularly.
The password must meet the following requirements to safeguard your user
account:
1. Contain 8 to 64 characters.
2. Not be the same as the username or the reverse of the username.
3. Not contain only repeated strings, such as aaaaaaaa, abababab, and
abcdabcd.
4. Consist of at least three of the following: lowercase letters (a–z), uppercase
letters (A–Z), digits (0–9), and special characters ~@#^*-_=+[{]};:./?.

3. On the page for creating an OSS, click Expand Filter Settings to set the
alarm filter criteria.

When setting filter criteria, you need to mask alarms of physical devices
(including CEs, NEs, and firewalls). The operations are as follows:
– Filter mode is Mask

i. Click next to Alarm sources.


ii. Click Add Alarm Sources.

iii. Select all CE, NE, and firewall physical devices in the list and click
OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 76


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

– Filter mode is Report


When setting the alarm source, do not select physical devices such as
CEs, NEs, or firewalls.
4. Click Create.
Step 6 (Optional) Set advanced parameters on the Advanced Settings area.
1. Specify whether to enable the heartbeat reporting, and set the reporting
period.

Parameter Description Default Value

Report heartbeat Whether to send Enable


notifications heartbeat traps.
– Disable: Heartbeat
traps will not be
sent.
– Enable: Heartbeat
traps will be sent.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 77


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Value

Heartbeat period Period for sending 60


heartbeat traps. The
value of MIB1 ranges
from 3 seconds to 300
seconds. The value of
MIB2 ranges from 3
seconds to 3600
seconds. The default
value is 60 seconds.

Heartbeat ID ID of a heartbeat trap. SNMP Agent

2. Set the alarm fields to be reported.


On the Basic Settings page, click Advanced Settings > MIB Alarm
Reporting Settings, and select the check boxes on the left of the fields to be
reported.

3. Set the reporting mode and other relevant parameters.


SNMPv3 supports the inform mode. The inform parameters include Alarm
reporting mode, Timeout period (s), Number of retries, and Number of
cached alarms.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 78


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default


Value

Alarm – Inform: Alarms are reported in informs. Trap


reporting – Trap: Alarms are reported in traps.
mode

Timeout Timeout period for sending inform packets. 5


period (s) This parameter is specified in the SNMP
inform protocol.
The unit is second. The minimum value is 1
and the default value is 5.

Number of Maximum number of times an inform 3


retries packet can be retransmitted. This parameter
is specified in the SNMP inform protocol.
The minimum value is 0.

4. Set basic information about the SNMP agent.


The SNMP agent parameters include MIB type,Trap sending interval, Time
type, Time format, Maximum length of reported alarm fields, Query
active alarms, alarm encording format ,Record PDU in logs, Filter
correlative alarms,and Number of cached alarms.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 79


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Value

MIB type mib1: The NMS uses mib1


the HW-
IMAPV1NORTHBOUND
-TRAP-MIB.mib or HW-
IMAPV2NORTHBOUND
-TRAP-MIB.mib MIB file.
– For details about the
supported alarm
fields (VB), see
1.8.2.3 Alarm Fields
Reported by MIB1.
– iMaster NCE-Fabric
supports only mib1.
mib2: The OSS uses the
MIB file
IMAP_NORTHBOUND_
MIB-V1.mib or
IMAP_NORTHBOUND_
MIB-V2.mib.
mib3: The NMS uses
the T2000-
NETMANAGEMENT-
MIB.mib MIB file.

Alarm reporting Interval for sending 0


interval (ms) traps to the OSS. The
value ranges from 0 ms
to 1000 ms.

Time type Type of the alarm UTC time


reporting time.

Time format Format of the alarm UTC time in the format


reporting time. of yyyy/MM/dd -
Currently, UTC time, hh:mm:ssZ
local time without time
zone, and local time
with time zone are
supported.
For details, see
1.8.5.3.2 Advanced
Configuration.

Maximum length of Maximum length of a 4096


reported alarm fields character string in the
VB.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 80


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Value

Query active alarms Whether to query Yes


active alarms.
– No: Current alarms
will be queried.
– Yes: Active alarms
will be queried.

Alarm encoding format Character set encoding UTF-8


format of the reported
alarm traps.
– UTF-8
– ISO-8859-1
– GBK

Record PDU in logs Whether to print PDU No


trace records in logs.
– No: PDU trace
records will not be
printed in logs.
– Yes: PDU trace
records will be
printed in logs.

Filter correlative alarms Whether to report No


correlative alarms.
– Yes: Only common
alarms and root
alarms are reported.
– No: Common
alarms, root alarms,
and correlative
alarms are reported.

Number of cached Cache size for real-time 10000


alarms alarms. The value can
range from 10000 to
50000.

NOTICE

The settings take effect only after you click Save.

5. Set advanced parameters about the SNMP interface.


Advanced parameters are optional (default values are recommended). Select
desired parameters based on customized requirements.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 81


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-24 MIB1 parameters


Parameter Description Default value

EmsName Name of an EMS. Huawei/NCE

Delimiter Delimiter between character elements Space


in the ObjectInstance and
ResourceIDs fields.
The default delimiter for
ObjectInstance is space, and that for
ResourceIDs is period (.).
If the delimiter is longer than 1, the
first letter of the delimiter is taken.

ResIDFormat Whether to display the resource 1


information in FDN name-value
format. Set this parameter to 1.
NOTE
– 0: The ResourceIDs and
ObjectInstance fields are represented
as an FDN dotted notation, for
example, [3145731.-1.22.8.912.1.-1.-1].
– 1: The ResourceIDs and
ObjectInstance fields are represented
as an FDN name-value pair, for
example,
[NE=312323,FR=1,S=1,CP=1,PP=4|1|2|].
If an NBI compatibility ID has been set,
iMaster NCE-Fabric will adjust the EMS
ID and FDN format based on the
setting. For example, the EMS ID is
changed from OSS to OMC and the
FDN is changed from name-value
format to dotted format.

SupportX733Ala Whether the X733 standard is 0


rm supported. This parameter can be set
to:
– 0: The X733 standard is not
supported.
– 1: The X733 standard is supported.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 82


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default value

KeepAliveVBOID Type of heartbeat VB OIDs. This 1.3.6.1.4.1.2011


parameter is set to .2.15.1
1.3.6.1.4.1.2011.2.15.1 by default. It
can also be set to
1.3.6.1.4.1.2011.2.15.1.7.2.1.

NotifyOID Trap OIDs for alarms (MIB1 0


configuration switch). This parameter
can be set to:
– 0: The OID of the real-time alarm
trap is 1.3.6.1.4.1.2011.2.15.1.7.1.0.1.
– 1: The OIDs of real-time alarm traps
vary according to alarm severities.
The OIDs of trap traps at different
severities are as follows: Critical:
1.3.6.1.4.1.2011.2.15.1.7.1.0.3
Major:1.3.6.1.4.1.2011.2.15.1.7.1.0.4
Minor:1.3.6.1.4.1.2011.2.15.1.7.1.0.5
Warning:
1.3.6.1.4.1.2011.2.15.1.7.1.0.6
Indeterminate:
1.3.6.1.4.1.2011.2.15.1.7.1.0.7
Unknown_Severity:
1.3.6.1.4.1.2011.2.15.1.7.1.0.8

T2000Support Whether to enable T2000 fields such 1


as ObjectInstance, ProbableCause,
EventDetail, ProbableRepair, and
EventName. Set this parameter to 1.

SupportOldGrou MXU NE GroupID. 0


pID – 0: Use new GroupID.
– 1: Use old GroupID.
For MA5616, the new GroupID is 59,
and the old GroupID is 71.

severity_Critical Alarm severity name. Critical

severity_Major Alarm severity name. Major

severity_Minor Alarm severity name. Minor

severity_Warnin Alarm severity name. Warning


g

severity_Unrepo Alarm severity name. Unknown_Seve


rt rity

severity_Indeter Alarm severity name. Indeterminate


minate

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 83


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default value

N2000Convert Whether to convert parameters such 0


as NEType, ProbableCause,
EventDetail, ProbableRepair,
EventName, ReasonID, FaultID, and
DeviceType.
– 0: Do not perform parameters
conversion.
– 1: Perform parameters conversion.

boardNameCom Content reported by the AdditionalVB1 0


patibility field.
– 0: Alarm object ID.
– 1: Board type.

NOTICE

The settings take effect only after you click Save.

Step 7 Log in to the iMaster NCE-Fabric management plane and check the SNMP service
status.
If the status is Running, the SNMP NBI has been enabled successfully.
1. Log in to the iMaster NCE-Fabric management plane.
2. Choose Maintenance > Operation and Maintenance Management >
Panoramic Monitoring from the main menu. In the navigation pane, choose
Service Monitoring.
3. On the Processes tab page, enter snmpagentservice in the search box and
process details page is displayed.
4. Check the running status of the snmpagentservice process on the displayed
page. The status of the service is Running.

5. On the Processes tab page, enter nbisnmpconfigwebsite in the search box


and process details page is displayed.
6. Check the running status of the nbisnmpconfigwebsite process on the
displayed page. The status of the service is Running.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 84


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

----End

1.8.5.2 Configuring a Security Policy


Security settings allow you to configure the lockout policy for the login IP address
after the SNMP NBI authentication fails. By default, if incorrect passwords are
entered for consecutive three times within 60 minutes, the login IP address will be
locked for 5 minutes.

Prerequisites
You have the Northbound Interface operation right.

Procedure
Step 1 Log in to the NCEO&M plane as the admin user.

Step 2 Open the System Settings app and choose System Settings > Northbound
Interface from the main menu.

Step 3 In the navigation pane, choose SNMP NBI > Security Settings.

Step 4 On the Security Settings page, retain the default settings.

Table 1-25 lists the SNMP NBI Security Policy parameters.

Table 1-25 Configuring a Security Policy

Parameter Description Default


Value

Maximum number Maximum number of consecutive login 3


of login attempts failures on a client IP address.

Login period Period (in minutes) within which 60


consecutive login failures are measured.

Lockout duration Lock period (in minutes) after 5


consecutive login failures.

Step 5 Click Save.

----End

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 85


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.5.3 Configuration Parameters


NCE can connect to the OSS after you correctly set general parameters on the NCE
NBI configuration page. You can also set advanced parameters to customize the
messages queried or reported through the SNMP NBI.

1.8.5.3.1 General Parameters


The SNMP NBI runs on NCE. It receives requests from the OSS, performs required
operations on NCE, and reports alarms to the OSS in real time. General
parameters for the SNMP NBI include the trap transmitting IP address or port,
request receiving IP address or port, and SNMP version.

Navigation Path
Log in to the control plane. Open the System app and choose System Settings >
Northbound Interface from the main menu. Choose SNMP NBI > Basic Settings
from the navigation pane.

Parameters

NOTICE

The trap sending address and request receiving address are both the NCE server IP
address (You are advised to use the default IP address, that is, the planned
network communication IP address of the SNMP NBI. If you select other IPv4
addresses, NCE may fail to communicate with third-party systems. The SNMP NBI
supports both IPv4 and IPv6. If third-party system A requires IPv4 but third-party
system B requires IPv6, you can select both IPv4 and IPv6 addresses for the two
systems to communicate with NCE at the same time.). Ensure that this IP address
can be used for successful communication between NCE and the OSS.
When configuring ports for the SNMP NBI, refer to iMaster NCE Communication
Matrix to prevent port conflicts.
On NCE, the recommended port number of the SNMP protocol is from 1025 to
32767.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 86


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Value

Address for IP address used by an SNMP agent -


sending to receive requests from the upper-
traps layer NMS. The SNMP agent can
communicate with the upper-layer
NMS using this IP address. You are
advised to set this parameter to
the northbound floating IP
address.
● In the Manager+Controller
+Analyzer scenario with IP
address convergence, it is the
LVS-Northbound IP of the GW
node.

Port for Port for sending traps. 1024 to 65535


sending Default: 6666
traps

Address for IP address used by an SNMP agent -


receiving to send trap packets to the upper-
requests layer NMS. The SNMP agent can
communicate with the upper-layer
NMS using this IP address. You are
advised to set this parameter to
the northbound floating IP
address.

Port for Port of the SNMP service. It is used 1024 to 65535


receiving to receive requests from the upper- Default: 9812
requests layer NMS.

1.8.5.3.2 Advanced Configuration


You can set the advanced parameters for the SNMP NBI on the SNMP NBI
configuration page.

Navigation Path
1. Open the System app and choose System Settings > Northbound Interface
from the main menu..
2. Choose SNMP NBI > Basic Settings from the navigation pane.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 87


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

SNMP Agent Settings


Parameter Description Default
Value

MIB type MIB1: The OSS uses the MIB file HW- MIB1
IMAPV1NORTHBOUND-TRAP-MIB.mib or HW-
IMAPV2NORTHBOUND-TRAP-MIB.mib.
● For details about the supported alarm fields (VB),
see 1.8.2.3 Alarm Fields Reported by MIB1.
● iMaster NCE-Fabric supports only MIB1.
MIB2: The OSS uses the MIB file
IMAP_NORTHBOUND_MIB-V1.mib or
IMAP_NORTHBOUND_MIB-V2.mib.
MIB3: The OSS uses the MIB file T2000-
NETMANAGEMENT-MIB.mib.

Alarm Interval at which alarms are reported. The value can 0


reporting range from 0 ms to 1000 ms.
interval
(ms)

Time type ● UTC time UTC time


● EMS time
● NE system time

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 88


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default


Value

Time Time format of the VB field that identifies alarm UTC time
format time. in the
● UTC time in the format of yyyy/MM/dd - format of
HH:mm:ssZ: uses the local time without the time yyyy/MM/
zone. dd -
HH:mm:ss
● Local time without the time zone in the format of Z
yyyy/MM/dd - HH:mm:ss: uses the UTC time
which has a different time format from the UTC
time used when this parameter is set to 0.
● Local time with the time zone in the format of
yyyy/MM/dd - HH:mm:ssTZ[DST]
● UTC time in the format of yyyy-MM-dd HH:mm:ss
● Local time in the format of yyyy-MM-dd
HH:mm:ss + hh:mm TZ + hh:mm DST
● Local time without the time zone in the format of
yyyy-MM-dd,HH:mm:ss.0

Maximum 255-4096 4096


length of
reported
alarm
fields

Query Whether to query active alarms. Yes


active ● Yes: Active alarms will be queried.
alarms
● No: Current alarms will be queried.
NOTE
● Active alarms refer to uncleared and
unacknowledged alarms, and uncleared but
acknowledged alarms.
● Current alarms refer to uncleared and
unacknowledged alarms, cleared but
unacknowledged alarms, and uncleared but
acknowledged alarms.

Alarm Character set encoding format of the reported alarm UTF-8


encoding traps.
format ● UTF-8
● ISO-8859-1
● GBK

Record Whether to print PDU trace records in logs. No


PDU in logs ● No: PDU trace records will not be printed in logs.
● Yes: PDU trace records will be printed in logs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 89


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default


Value

Filter Whether to report correlative alarms. No


correlative ● Yes: Only common alarms and root alarms are
alarms reported.
● No: Common alarms, root alarms, and correlative
alarms are reported.

Number of Cache size for real-time alarms. The value can range 10000
cached from 10000 to 50000.
alarms

NOTICE

This setting has a direct impact on the successful communication between iMaster
NCE-Fabric and the OSS for alarm management. Confirm with the OSS when
setting the MIB frame.

Inform/Trap Settings
You can set the reporting mode and the relevant parameters.

CAUTION

● Trap mode: A received alarm is reported immediately regardless of whether the


OSS returns a response to the previous alarm reporting.
● Inform mode: A received alarm is reported immediately after the OSS returns a
response to the previous alarm reporting or the number of retry attempts is
exceeded. In this mode, if the parameters configured for the OSS are incorrect,
the SNMP agent tries connecting to the OSS for many times. This will occupy a
large number of resources. As a result, the efficiency of the SNMP agent is
reduced. Therefore, exercise caution when you set this parameter to Inform.

Parameter Description Default


Value

Alarm reporting ● Inform: Alarms are reported in informs. Trap


mode ● Trap: Alarms are reported in traps.

Timeout period Timeout period for sending inform packets. This 5


(s) parameter is specified in the SNMP inform
protocol. The unit is second. The minimum
value is 1 and the default value is 5.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 90


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default


Value

Number of Maximum number of times an inform packet 3


retries can be retransmitted. This parameter is
specified in the SNMP inform protocol. The
minimum value is 0.

SNMPv3 Parameter Settings


Parameter Description Default
Value

Security Level Security level. This parameter can only be set Authenticated
to Authenticated and encrypted by default. and encrypted

Authenticatio Authentication protocol, which can be set to: SHA2-512


n protocol ● SHA2-256
● SHA2-384
● SHA2-512

Encryption Encryption protocol of SNMPv3, which can be AES-256


protocol set to:
● AES-128
● AES-192
● AES-256

RFC Whether to convert the value of Engine ID to Yes


specifications comply with the RFC specifications.
● Yes: Converts the Engine ID into a value
that complies with the RFC specifications to
report to the OSS.
● No: Directly reports the Engine ID to the
OSS.

Engine ID Engine ID, which is configurable and indicates Engine ID


the unique identifier of the SNMP entity. automatically
NOTE identified by
The value of Engine ID contains 5 to 32 characters. the system.
Only combinations of the following characters are
The default
allowed: lowercase letters (a–z), uppercase letters
(A–Z), digits (0–9), spaces and special characters =~! value is the IP
@#%^&*()-_+[{}]:./?,. address of the
Engine ID cannot start or ends with spaces. first NIC of
the node
where
NBIService
service is
configured

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 91


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Heartbeat Period Settings


iMaster NCE-Fabric can periodically send heartbeat information to the OSS
through the SNMP NBI. Based on the heartbeat information, the OSS determines
whether the communication is successful.

Table 1-26 Heartbeat parameters


Parameter Description Default Value

Report Whether to send heartbeat traps. Enable


heartbeat ● Disable: Heartbeat traps will not be
notifications sent.
● Enable: Heartbeat traps will be
sent.

Heartbeat Period for sending heartbeat traps. The 60


period(second value of MIB1 ranges from 3 seconds
) to 300 seconds. The value of MIB2
ranges from 3 seconds to 3600
seconds. The default value is 60
seconds.

Heartbeat ID ID of a heartbeat trap. SNMP Agent

SNMP NBI Advanced Parameter Settings


Parameter Description Default
Value

Parameter Name of the configuration item of the SNMP EmsName


interface.
● EmsName
● Delimiter
● ResIDFormat
● SupportX733Alarm
● KeepAliveVBOID
● NotifyOID
● T2000Support
● SupportOldGroupID

Value Name of the configuration item of the SNMP Huawei/NCE


interface.

MIB Alarm Reporting Settings


The reported alarm field, also called VB, specifies the alarm information to be
reported through the SNMP NBI.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 92


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTICE

● This parameter is applicable to all third-party NMSs connected to the SNMP


NBI.
● iMaster NCE-Fabric automatically fills the alarm field.

Table 1-27 T2000Support=0


Name Name in the Description Value Parsing
MIB Supported

NE hwNmNorthb Name of the NE where an Octet No


Name oundNENam alarm is generated. string
e ● For alarms generated on
an NE, the NE name is
reported.
● For alarms generated due
to NE disconnection, the
NE name is reported. For
example, if alarms are
generated due to NE
login failures or NE
disconnection, the NE
name is reported.
● For other NMS alarms,
the NMS name is
reported. By default, OSS
is reported. If the NMS
name is changed, the
name of the changed
NMS is reported.

NE Type hwNmNorthb Type of the NE on which Octet No


oundNEType alarms are generated. For string
NMS alarms, the NMS name
is reported.

Object hwNmNorthb Location information. For Octet No


instance oundObjectIn details, see Table3 Location string
stance information format.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 93


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

Event hwNmNorthb Alarm type. For non-X.733- Octet Yes. See


Type oundEventTy compliant alarms, options string the
pe are as follows: enumerate
● Environment d value.
● Equipment
● Communication
● Service
● Process
● Security
For X.733-compliant alarms,
options are as follows:
● EnvironmentalAlarm
● EquipmentAlarm
● CommunicationsAlarm
● QualityofServiceAlarm
● ProcessingErrorAlarm
● SecurityAlarm

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 94


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

Alarm hwNmNorthb Time when an alarm is Octet Yes. See


Occurren oundEventTi generated, cleared, string the time
ce Time me acknowledged, format.
unacknowledged, or
changed.
● If an alarm is generated,
this parameter indicates
the time when the alarm
is generated.
● If an alarm is cleared, this
parameter indicates the
time when the alarm is
cleared.
● If an alarm is
acknowledged, this
parameter indicates the
time when the alarm is
acknowledged.
● If an alarm is
unacknowledged, this
parameter indicates the
time when the alarm is
unacknowledged.
● If an alarm is changed,
this parameter indicates
the time when the alarm
is changed.
The options can be in any of
the following formats:
● UTC time. The format is
YYYY/MM/DD -
hh:mm:ssZ, for example,
2009/12/23 - 11:30:30Z.
● Local time without the
time zone. The format is
YYYY/MM/DD -
hh:mm:ss, for example,
2009/12/23 - 19:30:30.
● Local time with the time
zone. The format is
YYYY/MM/DD -
hh:mm:ss,
hh:mmTZ[DST], where
TZ stands for the time
zone information and
DST stands for the DST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 95


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

offset. The following lists


examples:
– 2009/12/23 - 19:30:30,
+08:00[0] (The date is
not in DST.)
– 2009/12/23 - 19:30:30
+08:00[3600] (The
DST offset is 1 hour.
The DST value is
represented in
seconds.)
● Local time. The format is
YYYY-MM-dd hh:mm:ss
+ hh:mm TZ + hh:mm
DST, where TZ stands for
the time zone
information and DST
stands for the DST offset.
The following lists
examples:
– 2009-12-23 19:30:30
+ 08:00 TZ (The date is
not in DST.)
– 2009-12-23 19:30:30
+ 08:00 TZ + 01:00 DST
(The DST offset is 1
hour.)
● UTC time. The format is
YYYY-MM-dd hh:mm:ss,
for example, 2009-12-23
11:30:30.

Alarm hwNmNorthb Possible causes for an alarm. Octet No


Cause oundProbabl Format: ID:[Alarm string
eCause ID],DeviceType:[DeviceType
ID],Alarm Cause

Alarm hwNmNorthb Alarm severity. Octet Yes. See


Severity oundSeverity ● Critical string the
enumerate
● Major d value.
● Minor
● Warning
● Cleared: This option is
supported for X.733-
compliant alarms.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 96


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

Alarm hwNmNorthb ID, device type, and details Octet No


Details oundEventDe of an alarm. string
tail Format: ID:
[AlarmID],DeviceType:
[DeviceType ID],Alarm
Details

Alarm hwNmNorthb Specific location of the NE Octet No


Location oundAddition where an alarm is string
alInfo generated.

Type hwNmNorthb Alarm type. Options are as Octet Yes. See


Flag oundFaultFla follows: string the
g ● Event: indicates that an enumerate
event is generated. d value.
● Fault: indicates that an
alarm is generated.
● Recovery: indicates that
the alarm is cleared.
● Acknowledge: indicates
that the alarm is
acknowledged.
● Unacknowledge:
indicates that the alarm is
unacknowledged.
● Change: indicates that
the alarm is changed.

Alarm hwNmNorthb Alarm type based on Octet Yes. See


Function oundFaultFun functions, which is the same string the
Category ction as hwNmNorthboundEvent- enumerate
Type. d value.

Manage hwNmNorthb IP address of the NE. IP No


d oundDeviceIP address
Equipme
nt
Address

Alarm hwNmNorthb Sequence number of an Integer No


Serial oundSerialNo alarm.
Number

Alarm hwNmNorthb Advice for clearing alarms. Octet No


Clearanc oundProbabl Format: ID: string
e Advice eRepair [AlarmID],DeviceType:
[DeviceType ID], Alarm
Clearance Advice

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 97


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

Resource hwNmNorthb ID of the resource where an Octet No


ID oundResourc alarm is generated. string
eIDs

Event hwNmNorthb Name of an alarm. Octet No


Name oundEventNa Format: ID: string
me [AlarmID],DeviceType:
[DeviceType ID],Event Name

Alarm hwNmNorthb Alarm cause ID. Integer No


Cause ID oundReasonI
D

Alarm ID hwNmNorthb Alarm ID. Integer No


oundFaultID

Manage hwNmNorthb Managed device type. Octet No


d oundDeviceTy string
Equipme pe
nt Type

Trail hwNmNorthb Name of the trail affected by Octet No


Name oundTrailNa an alarm. If alarm A affects string
me a trail, a new change alarm
B will be generated. The
sequence number of alarm B
is the same as that of alarm
A. The severity of alarm B is
Change. Trail Name in
alarm B indicates the
affected trail. However, for
alarm A, Trail Name is
blank.

Root hwNmNorthb Whether the alarm is the Integer Yes. See


Alarm oundRootAlar root alarm or not. Options the
m are as follows: enumerate
● 0: Non-root alarm d value.
● 1: Root alarm

Group ID hwNmNorthb ID of the alarm group. Integer No


oundGroupID

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 98


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

Engineer hwNmNorthb Whether this alarm is Integer Yes. See


ing oundMaintai generated by the NE in the the
Alarm nStatus engineering maintenance enumerate
Status state. Maintenance d value.
engineers can focus on
engineering alarms
selectively.
● 0: Non-engineering
alarms
● 1: Engineering alarms
NOTE
NEs during engineering
commissioning or service
cutover generate a large
number of alarms, and you can
set the NEs to the engineering
maintenance state. Therefore,
the alarms generated by this
kind of NE are engineering
alarms.

Root hwNmNorthb Log sequence number of the Octet No


Alarm oundRootAlar root alarm. string
Serial mSerialNo
Number

Alarm hwNmNorthb Alarm acknowledgement Integer Yes. See


Acknowl oundConfirm status. the
edgeme Status ● 1: acknowledged enumerate
nt Status d value.
● 2: unacknowledged

Alarm hwNmNorthb Alarm clearance status. Integer Yes. See


Clearanc oundRestoreS ● 1: cleared the
e Status tatus enumerate
● 2: uncleared d value.

Alarm hwNorthbou Indicates the alarm UUID of String No


addition ndAdditional the physical resources (NEs,
al VB1 boards, and ports) in the IP
informat domain.
ion 1

Alarm hwNorthbou Reserved field, which is not String No


addition ndAdditional enabled currently.
al VB2
informat
ion 2

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 99


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Name Name in the Description Value Parsing


MIB Supported

Alarm hwNorthbou When iMaster NCE-Fabric String Yes. See


addition ndAdditional interconnects with eSight, the
al VB3 select this parameter to enumerate
informat specify whether the current d value.
ion 3 alarm is automatically
cleared (ADAC) or manually
cleared (ADMC).
● 1: ADAC
● 2: ADMC

Alarm hwNorthbou Reserved field, which is not String No


addition ndAdditional enabled currently.
al VB4
informat
ion 4

Alarm hwNorthbou Reserved field, which is not String No


addition ndAdditional enabled currently.
al VB5
informat
ion 5

Alarm hwNorthbou Reserved field, which is not String No


addition ndAdditional enabled currently.
al VB6
informat
ion 6

Alarm hwNorthbou Reserved field, which is not String No


addition ndAdditional enabled currently.
al VB7
informat
ion 7

Alarm hwNorthbou Reserved field, which is not String No


addition ndAdditional enabled currently.
al VB8
informat
ion 8

1.8.5.3.3 Third-Party NMS


The third-party NMS refers to the NMS (also called SNMP manager) in the SNMP
protocol. For the SNMP NBI, the third-party NMS functions as the OSS. The third-
party NMS sends requests to the SNMP agent, receives responses or traps from
the SNMP agent, parses these packets, and displays the result.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 100


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Navigation Path
1. Open the System app and choose System Settings > Northbound Interface
from the main menu. on the control plane.
2. In the navigation pane, choose SNMP NBI > Third-party System Settings.
3. On the Third-party System Settings page, click Create and set third-party
NMS parameters.

Parameters
NOTE

● SNMPv3 is recommended, because it is more secure than SNMPv1 and SNMPv2c. Before
setting Protocol version to SNMPv1 or SNMPv2c, set SNMP Insecure Switch to
Enable for Northbound interface-SNMP insecure configuration switch. For details,
see Checking Security Configurations.
● The value of IPv4 address is not the IP address of the iMaster NCE-Fabric server but the
IP address of a third-party NMS at the upper layer. If the third-party NMS uses two
servers to receive traps and send requests, the IP addresses for these two servers must
be configured separately. Currently a maximum of 10 third-party NMSs are supported.
Table 1-28 lists the configuration requirements of the third-party NMS.

Table 1-28 Configuration requirements of the third-party NMS


MIB SNMP Configuration Requirements
Type Version

MIB1 v1/v2c You are advised to set different read/write community


names for third-party NMSs. If multiple third-party NMSs
(for example, NMS 1 and NMS 2) use the same read/
write community names, ensure that the SNMP protocol
versions used by the NMSs are the same.

v3 You are advised to set different usernames for third-party


NMSs. If multiple third-party NMSs (for example, NMS 1
and NMS 2) use the same username, the same
authentication password or encryption password must be
set for all the NMSs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 101


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTICE

To ensure the security of iMaster NCE-Fabric, change the default passwords of


iMaster NCE-Fabric and change the passwords regularly.
The password must meet the following requirements to safeguard your user
account:
1. Contain 8 to 64 characters.
2. Contain at least four of the following:
● Lowercase letters (a–z)
● Uppercase letters (A–Z)
● Digits (0–9)
● Special characters such as `~!@#$%^&*()-_=+\|[{}];:'",<.>/? and spaces

Table 1-29 lists the parameters for the upper-layer NMS.

Table 1-29 Parameters for the upper-layer NMS


Parameter Description Default Value

IP address IP address type of the OSS. IPv4


type ● IPv4
● IPv6

IPv4 address IP address used by the OSS to receive None


(or IPv6 traps.
address)

Port Port used by the OSS to receive traps. 8899


IPv4 address (or IPv6 address) and
Port determine the destination of real-
time alarm traps, current alarm query
traps, and heartbeat traps. The port
must be set to 162 or 10162.

Protocol SNMP version. Only SNMPv3 is SNMPv3


version supported by default.

Read Read community name when SNMPv1 None


community or SNMPv2c is used.

Write Write community name when SNMPv1 None


community or SNMPv2c is used.
It is recommended that the parameter
value be different from that of Read
community.

Security SNMPv3 security user. None


username

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 102


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Value

Authorizatio Authentication password of the OSS None


n password user. This parameter is used when
SNMPv3 authentication is enabled.

Data Data encryption password of the OSS None


encryption user. This parameter is used when
password SNMPv3 encryption is enabled.
It is recommended that the parameter
value be different from that of
Authorization and authentication
password.

Filter Settings
NOTE

Filter settings ensure that the third-party or upper-layer NMS servers will receive the alarms
they need.

Table 1-30 Filter settings


Parameter Description Default value

Filter mode How to filter alarms and Mask


events. The options are
as follows:
● Mask
● Report

Effective mode How the filter mode Any criterion


takes effect. The options
are as follows:
● Any criterion
● All criteria

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 103


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default value

Alarm severity Severities used to filter ● If Filter mode is set


alarms. Multiple to Mask, all the
severities can be options are
selected. Alarms at the deselected.
selected severities will be ● If Filter mode is set
reported or masked, to Report, all the
depending on the value options are selected.
of Filter mode. The
options are as follows:
● Critical
● Major
● Minor
● Warning

Alarm category Categories used to filter ● If Filter mode is set


alarms. Multiple to Mask, all the
categories can be options are
selected. Alarms in the deselected.
selected categories will ● If Filter mode is set
be reported or masked, to Report, all the
depending on the value options are selected.
of Filter mode. The
options are as follows:
● Fault alarm
● Clear alarm
● Acknowledge alarm
● Unacknowledge
alarm
● Change alarm
● Event

Engineering alarm Whether to filter ● If Filter mode is set


engineering alarms. The to Mask, the option is
option is as follows: deselected.
● Engineering alarms ● If Filter mode is set
to Report, the option
is selected.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 104


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default value

Alarm mode Modes used to filter Blank


alarms and events.
Multiple modes can be
selected. Alarms in the
selected modes will be
reported or masked,
depending on the value
of Filter mode.
● All
● NORMAL
● GSM
● UMTS
● LTE
● COMM
● NB-loT Cell
● FDD Cell
● TDD Cell
● RFA
● LTE Other
● NR

Add source types Source types used to Blank


filter alarms. Multiple
source types can be
selected. Alarms from
the selected types of
sources will be reported
or masked, depending on
the value of Filter mode.
For details, see Alarm
Source Types.

Alarm sources Sources used to filter Blank


alarms. Multiple sources
can be selected. Alarms
from the selected
sources will be reported
or masked, depending on
the value of Filter mode.
For details, see Alarm
Sources.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 105


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default value

Alarms Alarms or events to Blank


filter. Multiple alarms or
events can be selected,
which will be reported or
masked, depending on
the value of Filter mode.
For details, see Alarms.

Alarm Source Types


Step 1 In the Alarm source types area, click Add Alarm Source Types.

Step 2 In the Available area, select the NEs whose alarms need to be masked or

reported, and click .

Step 3 Click OK.

----End

Alarm Sources
Step 1 In the Alarm sources area, click Add Alarm Sources.

Step 2 In the Available area, select the NEs whose alarms need to be masked or
reported.

Step 3 In the Selected area, select the NEs set in Step 2 and click OK.

----End

Alarms
Step 1 In the Alarms area, click Add Alarms/Events.

Step 2 In the Available area, select the alarms or events that need to be masked or

reported, and click .

Step 3 In the Selected area, select the alarms or events set in Step 2 and click OK.

----End

1.8.6 Testing the SNMP NBI


This chapter describes how to check whether the SNMP NBI functions properly
and whether it is successfully interconnected with the OSS.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 106


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.6.1 MIB1
This section describes how to verify the running status of the SNMP NBI after the
MIB1 is loaded. The MIB1 includes HW-IMAPV1NORTHBOUND-TRAP-MIB.mib
and HW-IMAPV2NORTHBOUND-TRAP-MIB.mib.

Prerequisites
● SnmpAgentService is correctly configured.
● NbiSnmpConfigWebsite is correctly configured.
● The SNMP heartbeat information is configured.
– Heartbeat Period: 60s
– Report Heartbeat Info: yes

Procedure
Step 1 Log in to the iMaster NCE-Fabric management plane and check the SNMP service
status.

If the status is Running, the SNMP NBI has been enabled successfully.
1. Log in to the iMaster NCE-Fabric management plane.
2. Choose Maintenance > Operation and Maintenance Management >
Panoramic Monitoring from the main menu. In the navigation pane, choose
Service Monitoring.
3. On the Processes tab page, enter snmpagentservice in the search box and
process details page is displayed.
4. Check the running status of the snmpagentservice process on the displayed
page. The status of the service is Running.

5. On the Processes tab page, enter nbisnmpconfigwebsite in the search box


and process details page is displayed.
6. Check the running status of the nbisnmpconfigwebsite process on the
displayed page. The status of the service is Running.

If the SNMP NBI process fails to be started, see SNMP Service Process Fails to
Be Started for troubleshooting.

Step 2 Check whether heartbeat messages are received on the related OSS port.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 107


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

If no heartbeat message is received, see OSS Cannot Receive Heartbeat


Information for troubleshooting.

----End

1.8.7 Configuring the SNMP NBI on the OSS


1.8.7.1 Configuring the SNMPv3 NBI
Compared with SNMPv1 and SNMPv2c, the SNMPv3 NBI is characterized by
higher security due to its user-based security model. In this model, usernames and
passwords are used for access authentication and packet data is encrypted.

Prerequisites
● The SNMP version is set to SNMPv3, and Authenticated and encrypted is
selected from the Security level drop-down list (navigation path: Advanced
Settings > SNMPv3 Parameter Settings).
● The OSS has been created and the OSS server can receive real-time alarms or
heartbeats from iMaster NCE-Fabric.

Procedure
Step 1 Confirm SNMP NBI parameters with the iMaster NCE-Fabric administrator.
1. Log in to the control plane as the admin user.
2. Open the System app and choose System Settings > Northbound Interface
from the main menu..
3. Choose SNMP NBI > Third-party System Settings from the navigation pane.

4. Locate the OSS in the list and click in the Operation column.
On the displayed page, set the OSS parameters.
Parameter Description Default Navigation Path
Value

IP address IP address IPv4 In the Third-party System


type type of the Settings area, view IP address
OSS. type.
– IPv4
– IPv6

IPv4 IP address None In the Third-party System


address (or used by the Settings area, view IPv4
IPv6 OSS to receive address (or IPv6 address).
address) traps.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 108


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Navigation Path


Value

Port Port used by 8899 In the Third-party System


the OSS to Settings area, view Port.
receive traps.
IPv4 address
(or IPv6
address) and
Port
determine the
destination of
real-time
alarm traps,
current alarm
query traps,
and heartbeat
traps.

Protocol SNMP version v3 In the Third-party System


version for the SNMP Change the Settings area, view Protocol
NBI. value to v3 version.
if SNMPv3
is used.

Security Security level, Authenticat In the Advanced Settings >


level including ed and SNMPv3 Parameter Settings
Authenticate encrypted area, view Security level.
d and
encrypted.

Authentica Authenticatio HMACSHA In the Advanced Settings >


tion n algorithm, SNMPv3 Parameter Settings
protocol including area, view Authentication
SHA2-256, protocol.
SHA2-384,
and
SHA2-512.

Encryption Encryption AES-256 In the Advanced Settings >


protocol algorithm, SNMPv3 Parameter Settings
including area, view Encryption
AES-128, protocol.
AES-192, and
AES-256.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 109


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Navigation Path


Value

RFC Whether to Yes In the Advanced Settings >


specificatio convert the SNMPv3 Parameter Settings
ns value of area, view RFC specifications.
Engine ID to
comply with
the RFC
specifications.
Yes: Converts
the Engine ID
into a value
that complies
with the RFC
specifications
and then
reports the
converted
value to the
OSS.
No: Directly
reports the
Engine ID to
the OSS.

Engine ID Engine ID, Engine ID In the Advanced Settings >


which is automatical SNMPv3 Parameter Settings
configurable ly identified area, view Engine ID.
and indicates by the
the unique system.
identifier of The default
the SNMP value is the
entity. IP address
NOTE of the first
The value of NIC of the
Engine ID
node where
contains 5 to
32 characters. NBIService
Only service is
combinations configured.
of the
following
characters can
be used:
lowercase
letters,
uppercase
letters, digits,
and special
characters
(=~!@#
%^&*()-_+
[{}]:./?,)

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 110


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Parameter Description Default Navigation Path


Value

Security Username for None In the Third-party System


username authentication Settings area, view Security
. username.

Authorizati Authenticatio - In the Third-party System


on and n password. Settings area, view
authentica Authorization and
tion authentication password
password from the administrator.

Data Data - In the Third-party System


encryption encryption Settings area, view Data
password password. encryption password from the
administrator.

Step 2 Configure the OSS based on the preceding parameters set on iMaster NCE-Fabric.

CAUTION

Confirm with the iMaster NCE-Fabric administrator before modifying parameter


settings. Otherwise, the connection may fail.

----End

Follow-up Procedure
When viewing OSS information, you can perform the following operations:

● Click to modify the OSS information.


When Protocol version is configured as SNMPv3, if you want to change the
values of Authorization and authentication password and Data encryption
password, select Change password to modify the setting. If you do not need
to modify the settings, deselect Change password.
● Click to delete the OSS.

1.8.8 Calling the SNMP NBI

About This Chapter


The OSS calls the SNMP NBI to perform operations such as alarm synchronization
on NCE. Available subinterfaces vary with the loaded MIB.

NOTE

Ensure that the OSS has been connected to NCE through the SNMP NBI and the desired
operations have been licensed for use.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 111


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.8.1 MIB1 Subinterfaces


When the OSS is loaded with the MIB1, the SNMP NBI provides subinterfaces to
enable the following functions: reporting alarms automatically, synchronizing,
clearing, acknowledging, unacknowledging, and filtering alarms.

NOTICE

Ensure that the MIB1 has been loaded to the OSS. To load the MIB1, set the MIB
type to MIB1 when configuring the SNMP NBI.

1.8.8.1.1 Reporting Real-Time Alarms


You do not need to set any parameters for the OSS to receive alarm packets from
NCE through the SNMP NBI. After the SNMP NBI is properly configured on NCE,
alarms will be reported to the OSS in real time.
The SNMP NBI has been configured on NCE.
After the trap receiving IP address or port and SNMP version have been set for the
OSS on NCE, the OSS can receive real-time alarms.
You do not need to set related parameters on the OSS. Ensure that the OSS is
properly connected to NCE and the related ports are permitted by the firewall.
For details about how to configure the SNMP NBI, see Configuring the SNMP NBI.

1.8.8.1.2 Changing Filter Criteria


The SNMP NBI allows the OSS to dynamically change filter criteria for reporting
required alarms during its running.

Function
The OSS can call the alarm filtering interface to change alarm filter criteria
dynamically when the SNMP NBI is running.

MIB Definition
The OID is 1.3.6.1.4.1.2011.2.15.1.3.5.
The full path is as follows:
iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1).hwNmFault(3).thirdNMSFaultFilter(5)

Node Data Type Maximum Access Description


Permission

thirdNMSFaultFil- OCTET STRING read-write Alarm filter


ter criteria are
changed
dynamically.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 112


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Setting Method
The OSS can set the value of the MIB node to change the alarm filter criteria. The
format is as follows:

IPAddress:Port:AlarmFilterLevel:AlarmCategoryFilter

NOTICE

● The thirdNMSFaultFilter node only supports the set operation, that is, only the
write attribute is enabled. Therefore, you need to query the setting results of
the thirdNMSFaultFilter node on the NCE SNMP NBI configuration page.
● When you set the OID of the MIB node, you must add .0 to the end of the
original OID of the MIB node.

Table 1-31 Format description - changing filter criteria

Parameter Description

IPAddress IP address used by the OSS. This IP address is the trap receiving
IP address preset when the SNMP NBI is configured.

Port Port used by the OSS. This port is the trap receiving port preset
when the SNMP NBI is configured.

AlarmFilterL Alarm severity.


evel Four binary digits are used to represent critical, major, minor, or
warning in descending order.
Each binary digit can be set to 0 or 1.
● 1: indicates that the alarms of the corresponding alarm
severity are filtered out and the OSS cannot receive alarms of
that severity.
● 0: indicates that the alarms of the corresponding alarm
severity are reported and the OSS can receive alarms of that
severity.

AlarmCateg Category of an alarm.


oryFilter Six binary digits are used to represent event, fault, clear,
acknowledge, unacknowledge, or change alarm in descending
order.
● 1: indicates that the alarms of the corresponding category are
filtered out and the OSS cannot receive alarms of the
category.
● 0: indicates that the alarms of the corresponding category are
reported and the OSS can receive alarms of the category.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 113


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample
Prerequisites
● The IP address of the OSS is set to 10.70.73.97 and the port for receiving
alarms is set to 6666.
● The OSS connects to the SNMP NBI and can receive heartbeats or real-time
alarms.
Purpose
To change the filter criteria so that only critical or major fault and clear alarms are
reported.
The following table lists the parameters of this sample.

Table 1-32 Sample parameters - changing filter criteria


Parameter Value MIB Object

The IP of the upper-layer 10.70.73.97 10.70.73.97


NMS

Receive Trap Port 6666 6666

Alarm Severity to be Critical, Major 0011


Reported

Alarm Category to be Fault Alarm, Clearance 100111


Reported Alarm

Procedure
1. The OSS sets the OID of the thirdNMSFaultFilter node to:
1.3.6.1.4.1.2011.2.15.1.3.5.0.
2. The OSS sets thirdNMSFaultFilter to:
10.70.73.97:6666:0011:100111.
The OSS receives responses from NCE, indicating that the filter criteria are
changed successfully. The OSS will then receive the required alarms only.

1.8.8.1.3 Synchronizing Alarms


The SNMP NBI allows the OSS to initiate the synchronization operation to ensure
that the alarm information on the OSS and NCE is consistent.

Function
The UDP-based SNMP protocol cannot guarantee that all alarms are reported to
the OSS. Therefore, the OSS synchronizes alarms to ensure alarm data consistency
with NCE. The OSS can pause the synchronization as required.
When the synchronization starts, the SNMP NBI sends a "start" trap to inform the
OSS that alarm synchronization has started.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 114


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

When the synchronization is successfully complete or paused, the SNMP NBI sends
a "stop" trap to inform the OSS that alarm synchronization has stopped.
The following figure shows the alarm synchronization process.

Figure 1-11 Alarm synchronization process

Operation Description

Synchronize 1. The OSS synchronizes alarms.


alarms 2. The SNMP NBI sends a "start" trap to inform the OSS
that alarm synchronization has started.
3. The SNMP NBI sends a result trap containing all valid
alarms in the NCE database.
4. After all valid alarms are reported, the SNMP NBI sends a
"stop" trap to inform the OSS that alarm synchronization
has stopped.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 115


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Operation Description

Stop the alarm 1. The OSS stops the alarm synchronization.


synchronization 2. The SNMP NBI sends a "stop" trap to inform the OSS
that alarm synchronization has stopped.

NOTE

Active alarms (uncleared alarms) are synchronized by default.


For details about the alarm synchronization start trap, see 1.8.2.4.2 Alarm Synchronization
Start Trap.
For details about the alarm synchronization result trap, see Alarm Synchronization Result
Trap.
For details about the alarm synchronization stop trap, see Alarm Synchronization End Trap.

MIB Definition
There are two MIB nodes for alarm synchronization:
hwNmNorthboundEventSynchronizationCommandStart and
hwNmNorthboundEventSynchronizationCommandStop. The former indicates
starting alarm synchronization, whereas the latter indicates stopping alarm
synchronization.

The OIDs are 1.3.6.1.4.1.2011.2.15.1.7.7.4 and 1.3.6.1.4.1.2011.2.15.1.7.7.5.

The full path is as follows:

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1).hwNmNorthboundEvent(7).hwNmNorth
boundEventSynchronization(7).hwNmNorthboundEventSynchronizationCommand
Start(4)

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1).hwNmNorthboundEvent(7).hwNmNorth
boundEventSynchronization(7).hwNmNorthboundEventSynchronizationCommand
Stop(5)

Node Data Type Maximum Access Description


Permission

hwNmNorthboun OCTET STRING read-write Alarm


dEventSynchroni- synchronization is
zationCommandSt started.
art

hwNmNorthboun OCTET STRING read-write Alarm


dEventSynchroni- synchronization is
zationCommandSt stopped.
op

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 116


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Setting Method
Start alarm synchronization.

The OSS can set the value of the MIB node to start alarm synchronization within a
specified period. The format is as follows:

IP:port:start time:end time

Stop alarm synchronization.

The OSS can set the value of the MIB node to stop alarm synchronization. The
format is as follows:

IP:port

NOTE

● When you set the OID of the MIB node, you must add .0 to the end of the original OID
of the MIB node.
● You do not need to set the start and end time to stop the alarm synchronization.

Table 1-33 Format description - synchronizing alarms

Parameter Description

IP IP address used by the OSS. This IP address is the trap receiving


IP address preset when the SNMP NBI is configured.

port Port used by the OSS. This port is the trap receiving port preset
when the SNMP NBI is configured.

start Start and end time for alarm synchronization.


time:endtim The alarms generated within this period are synchronized.
e
NOTE
● If the end time is not set, the current system time of NCE is used as
the end time.
● If the start and end time are not set, all valid alarms are synchronized.
● If the end time is set, the start time is mandatory.
● Both the start and end time indicate the time when alarms are
generated rather than when alarms are reported to NCE.
● The UTC time, local time, and local time with the time zone are not
distinguished.
The start time and end time are in the format of
YYYYMMDDhhmmss.
● YYYY: Four-digit year. The value starts from 1970.
● MM: Two-digit month. The value range is 01 to 12.
● DD: Two-digit date. The value range is 01 to 31.
● hh: Two-digit hour. The value range is 00 to 23.
● mm: Two-digit minutes. The value range is 00 to 59.
● ss: Two-digit seconds. The value range is 00 to 59.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 117


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample
Prerequisites

● The IP address of the OSS is set to 10.70.73.97 and the port for receiving
alarms is set to 6666.
● The OSS connects to the SNMP NBI and can receive heartbeats or real-time
alarms.

Purpose

To synchronize alarms that are generated between 2011-03-01 00:00:00 and


2011-03-15 00:00:00.

The following table lists the parameters of this sample.

Table 1-34 Sample parameters - synchronizing alarms

Parameter Value MIB Object

The IP of the upper-layer 10.70.73.97 10.70.73.97


NMS

Receive Trap Port 6666 6666

Start time 2011-03-01 00:00:00 20110301000000

End Time 2011-03-15 00:00:00 20110315000000

Procedure

1. The OSS sets the OID of the


hwNmNorthboundEventSynchronizationCommandStart node to:
1.3.6.1.4.1.2011.2.15.1.7.7.4.0
2. The OSS sets the value of the
hwNmNorthboundEventSynchronizationCommandStart node to:
10.70.73.97:6666:20110301000000:20110315000000
– If set successfully, the SNMP NBI sends a "start" trap to inform the OSS
that alarm synchronization has started.
– The OSS receives alarms (from the NCE database) that generated within
the specified period. The SNMP NBI reports valid alarms to the OSS in the
form of a result trap.
3. (Optional) To stop the synchronization, the OSS sets the
hwNmNorthboundEventSynchronizationCommandStop node to:
10.70.73.97:6666
4. When the synchronization is successfully complete or paused, the SNMP NBI
sends a "stop" trap to inform the OSS that alarm synchronization has
stopped.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 118


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.8.8.1.4 Acknowledging Alarms


The SNMP NBI allows the OSS to acknowledge alarms on NCE by alarm SN. An
acknowledged alarm is an alarm that has been handled.

Function
The OSS can acknowledge NCE alarms based on the alarm SNs.
The alarm status will change after the alarm is acknowledged. If acknowledged
alarms are specified as the filter criteria, the OSS will receive the information
about state changes along with the alarms.

NOTE

The Acknowledgement User parameter is SNMP Agent User on the NCE client after an
alarm is acknowledged by the OSS through the SNMP NBI.
Alarms with invalid or nonexistent SNs and historical alarms cannot be acknowledged and
the SNs will be returned to the OSS.

MIB Definition
The OID is 1.3.6.1.4.1.2011.2.15.1.3.7.
The full path is as follows:
iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1).hwNmFault(3).hwNmAcknowledgeAlarm
s(7)

Node Data Type Maximum Access Description


Permission

hwNmAcknowled OCTET STRING read-write Alarms are


geAlarms acknowledged
based on SNs.

NOTE

The GET operation is not supported on this MIB node.

Setting Method
The OSS can set the value of the MIB node to acknowledge the active alarm on
NCE. The format is as follows:
Serial Number,Serial Number,...

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 119


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-35 Format description - acknowledging alarms


Parameter Description

Serial SN of an alarm.
Number,Seri Integer, separated by a comma (,).
al Number,...

The following table lists the status changes when alarms are acknowledged.

Table 1-36 Alarm status - acknowledging alarms


No. Alarm Status Status Change SET Response Failed List

1 Unacknowledge Acknowledged Success Empty


d and and uncleared
uncleared

2 Unacknowledge Acknowledged Success Empty


d and cleared and cleared

3 Acknowledged Acknowledged Success Empty


and uncleared and uncleared

4 Acknowledged None Success Alarm SN


and cleared

NOTE

If you set the lifecycle for acknowledged and cleared alarms and these alarms are not
converted to historical alarms, no data will be returned after you acknowledge these
alarms. The lifecycle specifies the period in which these alarms are saved in the current-
alarm database.
When you set the OID of the MIB node, you must add .0 to the end of the original OID of
the MIB node.

Sample
Prerequisites
The OSS connects to the SNMP NBI and can receive heartbeats or real-time
alarms.
Purpose
To acknowledge the alarm on NCE with the SN of 20,30,10005,18000.
The following table lists the parameters of this sample.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 120


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-37 Sample parameters - acknowledging alarms

Parameter Value MIB Object

Alarm SN 20,30,10005,18000 20,30,10005,18000

Procedure

1. The OSS sets the OID of the hwNmAcknowledgeAlarms node to:


1.3.6.1.4.1.2011.2.15.1.3.7.0.
2. The OSS sets hwNmAcknowledgeAlarms to:
20,30,10005,18000.

Query the alarm status on the OSS or NCE. The state for alarm 20,30,10005,18000
is Acknowledge, indicating that the alarm is acknowledged successfully. The
Acknowledgement User parameter is SNMP Agent User on the NCE client.

NOTE

If acknowledged alarms are specified as the filter criteria, the OSS will receive the
information about state changes along with the alarms. The alarm time is when the alarm
is acknowledged.

1.8.8.1.5 Unacknowledging Alarms


The SNMP NBI allows the OSS to unacknowledge alarms on NCE by alarm SN.
This function allows you to unacknowledge an acknowledged alarm if necessary.

Function
The OSS can unacknowledge alarms on NCE based on alarm SNs.

The alarm status will change after the alarm is unacknowledged. If


unacknowledged alarms are specified as the filter criteria, the OSS will receive the
information about state changes along with the alarms.

NOTE

The Acknowledgement User parameter is SNMP Agent User on the NCE client after an
alarm is unacknowledged by the OSS through the SNMP NBI.
Alarms with invalid or nonexistent SNs and historical alarms cannot be unacknowledged
and the SNs will be returned to the OSS.

MIB Definition
The OID is 1.3.6.1.4.1.2011.2.15.1.3.8.

The full path is as follows:

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1).hwNmFault(3).hwNmUnAcknowledgeAla
rms(8)

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 121


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Node Data Type Maximum Access Description


Permission

hwNmUnAcknowl OCTET STRING read-write Alarms are


edgeAlarms unacknowledged
based on SNs.

NOTE

The GET operation is not supported on this MIB node.

Setting Method
The OSS can set the value of the MIB node to unacknowledge the active alarm on
NCE. The format is as follows:
Serial Number,Serial Number,...

Table 1-38 Format description - acknowledging alarms


Parameter Description

Serial SN of an alarm.
Number,Seri Integer, separated by a comma (,).
al Number,...

The following table lists the status changes when alarms are unacknowledged.

Table 1-39 Alarm status - unacknowledging alarms


No. Alarm Status Status Change SET Response Failed List

1 Unacknowledg Unacknowledge Success Empty


ed and d and uncleared
uncleared

2 Unacknowledg Unacknowledge Success Empty


ed and cleared d and cleared

3 Acknowledged Unacknowledge Success Empty


and uncleared d and uncleared

3 Acknowledged None Success Alarm SN


and cleared

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 122


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NOTE

If you set the lifecycle for acknowledged and cleared alarms and these alarms are not
converted to historical alarms, no data will be returned after you unacknowledge these
alarms. The lifecycle specifies the period in which these alarms are saved in the current-
alarm database.
When you set the OID of the MIB node, you must add .0 to the end of the original OID of
the MIB node.

Sample
Prerequisites
The OSS connects to the SNMP NBI and can receive heartbeats or real-time
alarms.
Purpose
To unacknowledge the alarm on NCE with the SN of 20,30,10005,18000.
The following table lists the parameters of this sample.

Table 1-40 Sample parameters - unacknowledging alarms


Parameter Value MIB Object

Alarm SN 20,30,10005,18000 20,30,10005,18000

Procedure
● The OSS sets the OID of the hwNmUnAcknowledgeAlarms node to:
1.3.6.1.4.1.2011.2.15.1.3.8.0.
● The OSS sets hwNmUnAcknowledgeAlarms to:
20,30,10005,18000.
Query the alarm status on the OSS or NCE. The state for alarm 20,30,10005,18000
is Unacknowledge, indicating that the alarm is unacknowledged successfully. The
Acknowledgement User parameter is SNMP Agent User on the NCE client.

NOTE

If unacknowledged alarms are specified as the filter criteria, the OSS will receive the
information about state changes along with the alarms. The alarm time is when the alarm
is generated.

1.8.8.1.6 Clearing Alarms


The SNMP NBI allows the OSS to clear alarms on NCE by alarm SN. Manually
clear the alarm if NCE cannot automatically clear the alarm or this alarm does not
exist on an NE.

Function
The OSS can clear alarms on NCE based on the alarm SNs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 123


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

The alarm status will change after the alarm is cleared. If cleared alarms are
specified as the filter criteria, the OSS will receive the information about state
changes along with the alarms.

NOTE

The Clearance User parameter is SNMP Agent User on the NCE client after an alarm is
cleared by the OSS through the SNMP NBI.
Alarms with invalid or nonexistent SNs and historical alarms cannot be cleared and the SNs
will be returned to the OSS.

MIB Definition
The OID is 1.3.6.1.4.1.2011.2.15.1.3.6.

The full path is as follows:

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.hwNetManagement(15).hwNmAgent(1).hwNmFault(3).hwNmClearAlarms(6)

Node Data Type Maximum Access Description


Permission

hwNmClearAlarm OCTET STRING read-write Alarms are


s cleared based on
SNs.

NOTE

The GET operation is not supported on this MIB node.

Setting Method
The OSS can set the value of the MIB node to clear the active alarm on NCE. The
format is as follows:

Serial Number,Serial Number,...

Table 1-41 Format description - clearing alarms

Parameter Description

Serial SN of an alarm.
Number,Seri Integer, separated by a comma (,).
al Number,...

The following table lists the status changes when alarms are cleared.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 124


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-42 Alarm status - clearing alarms

No. Alarm Status Status SET Response Failed List


Change

1 Unacknowled Unacknowled Success Empty


ged and ged and
uncleared cleared

2 Unacknowled Unacknowled Success Empty


ged and ged and
cleared cleared

3 Acknowledge Acknowledge Success Empty


d and d and cleared
uncleared

4 Acknowledge None Success Alarm SN


d and cleared

NOTE

If you set the lifecycle for acknowledged and cleared alarms and these alarms are not
converted to historical alarms, no data will be returned after you clear these alarms. The
lifecycle specifies the period in which these alarms are saved in the current-alarm database.
When you set the OID of the MIB node, you must add .0 to the end of the original OID of
the MIB node.

Sample
Prerequisites
The OSS connects to the SNMP NBI and can receive heartbeats or real-time
alarms.
Purpose
To clear the alarm on NCE with the SN of 20,30,10005,18000.
The following table lists the parameters of this sample.

Table 1-43 Sample parameters - clearing alarms

Parameter Value MIB Object

Alarm SN 20,30,10005,18000 20,30,10005,18000

Procedure
1. The OSS sets the OID of the hwNmClearAlarms node to:
1.3.6.1.4.1.2011.2.15.1.3.6.0.
2. The OSS sets hwNmClearAlarms to:

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 125


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

20,30,10005,18000.

Query the alarm status on the OSS or NCE. The state for alarm 20,30,10005,18000
is Clear, indicating that the alarm is cleared successfully. The Clearance User
parameter is SNMP Agent User on the NCE client.

NOTE

If a cleared alarm is also an acknowledged one, it becomes a historical alarm.


If cleared alarms are specified as the filter criteria, the OSS will receive the information
about state changes along with the alarms. The alarm time is when the alarm is cleared.

1.8.8.1.7 Reporting Alarm Acknowledgement Status


The SNMP NBI reports the alarm acknowledgement status.

Function
After you configure alarm acknowledgement status reporting through the SNMP
NBI on NCE, the OSS receives alarm acknowledgement status in real time.

MIB Definition
The OID is 1.3.6.1.4.1.2011.2.15.1.7.1.33.

The full path is as follows:

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.netManagement(15).nmAgent(1).nmNorthboundEvent(7).hwNmNorthboundEven
tInfo(1).hwNmNorthboundConfirmStatus(33)

Node Data Type Maximum Access Description


Permission

hwNmNorthboun Integer32 read-write ● 1:


dConfirmStatus acknowledged
● 2:
unacknowledg
ed

NOTE

The Get and Set operations are not supported on this MIB node.

Setting Method
For details, see Configuration Operations.

1.8.8.1.8 Reporting Alarm Clearance Status


The SNMP NBI reports the alarm clearance status.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 126


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Function
After you configure alarm clearance status reporting through the SNMP NBI on
NCE, the OSS receives alarm clearance status in real time.

MIB Definition
The OID is 1.3.6.1.4.1.2011.2.15.1.7.1.34.
The full path is as follows:
iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).huawei(2011).products(2)
.netManagement(15).nmAgent(1).nmNorthboundEvent(7).hwNmNorthboundEven
tInfo(1).hwNmNorthboundRestoreStatus(34)

Node Data Type Maximum Access Description


Permission

hwNmNorthboun Integer32 read-write ● 1: cleared


dRestoreStatus ● 2: uncleared

NOTE

The Get and Set operations are not supported on this MIB node.

Setting Method
For details, see Configuration Operations.

1.9 Interface Reference

1.9.1 User Authentication Service


API used by a machine-machine account to obtain a token based on the username
and password.

1.9.1.1 Obtain a Token

Typical Scenarios
A token needs to be obtained using the user name and password when a third-
party system is interconnected and needs to access an open API.

Functions
Allow northbound systems to obtain tokens. By default, an account is locked for
10 minutes when it fails to obtain a token for five consecutive times within 10
minutes. The account policy can be customized based on site requirements.The
interface can process a maximum of 25 requests per second. If there are more

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 127


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

than 25 requests, the interface will return a message indicating that the system is
busy.

Constraints
N/A.

HTTP Method
POST

URI
/controller/v2/tokens

Request Parameters

Table 1-44 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

authCr Yes REFER For details, see Parameter for -


edit ENCE Table 1-45. obtaining a
token.

Table 1-45 AuthCreditV2In parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

userNa No string 1 to - User name. "zhangsan@xx


me 128 x.com"
charac
ters.

passw No passw 5 to - This field may "******"


ord ord 128 contain
charac sensitive or
ters. personal data.
Keep it secure.
User password.

Sample Request
cURL

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 128


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

curl -k -s -L -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-


Language: en-US' 'https://192.168.1.125:18002/controller/v2/tokens' -d '{
"userName" : "zhangsan@xxx.com",
"password" : "******"
}'

HTTP
POST /controller/v2/tokens HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
{
"userName" : "zhangsan@xxx.com",
"password" : "******"
}

Response Parameters
Response status code 200: OK

Table 1-46 AuthTokenV2Out parameters

Param Type Value Range Defaul Description Example


eter t Value

data REFER For details, see Table - -


ENCE 1-47.

errcod string 0 to 128 - Error code. "0x11aa22bb"


e characters.

errmsg string 0 to 128 - Error message. "The userName


characters. or password is
incorrect."

Table 1-47 data parameters

Param Type Value Range Defaul Description Example


eter t Value

token_i string 0 to 1024 - Token ID. "xxxxxxxxxxxxx


d characters. xxxxxxxxxxxxxx
xxxxxx"

expired string 0 to 128 - Token timeout "2018-10-30


Date characters. time, in the 10:09:23"
format yyyy-
MM-dd
HH:mm:ss.

Response status code 401: Unauthorized.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 129


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"data" : {
"token_id" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"expiredDate" : "2018-10-30 10:09:23"
},
"errcode" : "0x11aa22bb",
"errmsg" : "The userName or password is incorrect."
}

Response status code 401: Unauthorized.


HTTP/1.1 401 Unauthorized
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.1.2 Delete a Token

Typical Scenarios
A token used during interconnection with a third-party system needs to be deleted
if it is no longer used.

Functions
Delete a token.

Constraints
N/A.

HTTP Method
DELETE

URI
/controller/v2/tokens

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 130


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-48 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

revoke Yes REFER For details, see Parameter for -


Token ENCE Table 1-49. releasing a
token.

Table 1-49 revokeTokenV2In parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

token No string 0 to - This field may "xxxxxxxxxxxxx


1024 contain xxxxxxxxxxxxxx
charac sensitive or xxxxxx"
ters. personal data.
Keep it secure.
Token ID.

Sample Request
cURL
curl -k -s -L -i -X DELETE -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-
Language: en-US' 'https://192.168.1.125:18002/controller/v2/tokens' -d '{
"token" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'

HTTP
DELETE /controller/v2/tokens HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
{
"token" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}

Response Parameters
Response status code 200: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 131


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-50 revokeTokenV2Out parameters


Param Type Value Range Defaul Description Example
eter t Value

errcod string 0 to 128 - Error code. "0x22aa33bb"


e characters.

errmsg string 0 to 128 - Error message. "The


characters. parameter is
invalid."

Response status code 401: Unauthorized.


For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errcode" : "0x22aa33bb",
"errmsg" : "The parameter is invalid."
}

Response status code 401: Unauthorized.


HTTP/1.1 401 Unauthorized
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.1.3 Change Personal Password

Typical Scenarios
The password of the northbound operator needs to be changed when a third-
party system is interconnected and the user password becomes invalid. Only the
password of the current user can be changed. When this API is invoked, the token
value that identifies the user must be transferred in the HTTP context header.

Functions
Change the password.

Constraints
N/A.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 132


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/restconf/operations/huawei-ac-access-token:update-password

Request Parameters

Table 1-51 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

x- Yes string - - X-Uni-Session- -


access- Id
token

Table 1-52 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

update Yes REFER For details, see Parameter for -


Passw ENCE Table 1-53. updating a
ord password.

Table 1-53 RestconfUpdatePasswordV2In parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

input No REFER For details, see - -


ENCE Table 1-54.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 133


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-54 input parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

oldpw No string 5 to - This field may "******"


d 128 contain
charac sensitive or
ters. personal data.
Keep it secure.
Old password.

newpw No string 5 to - This field may "******"


d 128 contain
charac sensitive or
ters. personal data.
Keep it secure.
New password.

Sample Request
cURL
curl -k -s -L -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-
Language: en-US' -H 'x-access-token: ' 'https://192.168.1.125:18002/restconf/operations/huawei-ac-access-
token:update-password' -d '{
"input" : {
"oldpwd" : "******",
"newpwd" : "******"
}
}'

HTTP
POST /restconf/operations/huawei-ac-access-token:update-password HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
x-access-token:
{
"input" : {
"oldpwd" : "******",
"newpwd" : "******"
}
}

Response Parameters
Response status code 200: OK

Response status code 401: Unauthorized.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 134


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 401: Unauthorized.


HTTP/1.1 401 Unauthorized
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.1.4 Authenticate a User

Functions
This interface is used for third-party user authentication and login.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
When accessing the application interface, set the HTTP header to the session
obtained after the northbound login. The key is X-Auth-Token and the value is the
session value, for example, X-Auth-Token:xxx.

HTTP Method
PUT

URI
/rest/plat/smapp/v1/sessions
Path parameters
None

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 135


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Query parameters

None

Request
● Header parameters
See the sample request.
● Body parameters

Paramete Mandato Type Value Description


r ry Range

grantType Yes strin None Indicates the grant type.


g

userName Yes strin None Indicates the username of a


g third-party system access
user.

value Yes pass None Indicates the password.


word

organizati No strin None Indicates the orgname of a


onName g third-party system access
user.

● Sample request
PUT /rest/plat/smapp/v1/sessions HTTP/1.1
Accept:application/json
Content-Type:application/json;charset=UTF-8
{
"grantType": "password",
"userName": "XXX",
"value": "***"
}

Response
● Response parameters
– Response status code 200:
The string is returned.
● Sample response
HTTP/1.1 200 OK
Content-Type:application/json
{
"accessSession": "x-yyyyyyy",
"roaRand": "xxxxxxx",
"expires": 1800,
"additionalInfo": {
"expires":"2",
"passwdStatus":"expiring"
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 136


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Status Codes
Status Code Description

200 The request is successful.

400 Incorrect username or password.


Parameter error.
The number of incorrect password
attempts reaches the maximum.
The user is locked.
The password has expired.
The centralized authentication server
fails to be connected.
In centralized authentication mode,
the database or service is abnormal.
In centralized authentication mode,
the unauthorized user is not allowed
to log in. Contact the administrator.
The number of login attempts has
reached the upper limit. Contact the
administrator.

403 The login is restricted. Contact the


administrator. For example:account
suspension.

Operation Severity
Minor

1.9.1.5 Log Out a Session

Functions
This interface is used to log out the current third-party session or a common
session.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 137


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

SLA Item Description

TP99.9 request delay 200 ms

Precautions
None

HTTP Method
DELETE

URI
/rest/plat/smapp/v1/sessions
Path parameters
None
Query parameters
None

Request
● Header parameters
Paramete Mandato Type Value Description
r ry Range

Cookie No strin None Indicates the accessSession


g value returned in the process
of invoking an
authentication interface. The
format is accessSession=x-
yyyyyyy. Note: If this
interface is invoked by
OpenAPI, the accessSession
validity is not checked. If this
interface is invoked by a
browser, X-Auth-Token is not
required.

roaRand No strin None Indicates the roaRand value


g returned in the process of
invoking an authentication
interface.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 138


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramete Mandato Type Value Description


r ry Range

X-Auth- No strin None Indicates the accessSession


Token g value returned in the process
of invoking an
authentication interface.
Note: If this interface is
invoked by OpenAPI, either
Cookie or X-Auth-Token, or
both, must be transferred.

● Body parameters
None
● Sample request

DELETE /rest/plat/smapp/v1/sessions HTTP/1.1


Accept:application/json
Content-Type:application/json;charset=UTF-8
Cookie:accessSession=x-yyyyyyy
roaRand:xxxxxxx

DELETE /rest/plat/smapp/v1/sessions HTTP/1.1


Accept:application/json
Content-Type:application/json;charset=UTF-8
X-Auth-Token:x-yyyyyyy

Response
● Response parameters
● Sample response
HTTP/1.1 200 OK
Content-Type:application/json

Status Codes
Status Code Description

200 The request has been successfully


delivered.

406 Invalid parameter.

Operation Severity
Minor

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 139


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.1.6 Authenticate a User V1 (Compatible with Earlier Versions)

Functions
This interface is used for third-party user authentication and login.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
When accessing the application interface, set the HTTP header to the session
obtained after the northbound login. The key is X-Auth-Token and the value is the
session value, for example, X-Auth-Token:xxx.

HTTP Method
PUT

URI
/rest/plat/smapp/v1/oauth/token
Path parameters
None
Query parameters
None

Request
● Header parameters
See the sample request.
● Body parameters

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 140


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramete Mandato Type Value Description


r ry Range

grantType Yes strin None Indicates the grant type.


g

userName Yes strin None Indicates the username of a


g third-party system access
user.

value Yes pass None Indicates the password.


word

organizati No strin None Indicates the orgname of a


onName g third-party system access
user.

● Sample request
PUT /rest/plat/smapp/v1/oauth/token HTTP/1.1
Accept:application/json
Content-Type:application/json;charset=UTF-8
{
"grantType": "password",
"userName": "XXX",
"value": "***"
}

Response
● Response parameters
– Response status code 200:
The string is returned.
● Sample response
HTTP/1.1 200 OK
Content-Type:application/json
{
"accessSession": "x-yyyyyyy",
"roaRand": "xxxxxxx",
"expires": 1800,
"additionalInfo": {
"expires":"2",
"passwdStatus":"expiring"
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 141


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Status Codes
Status Code Description

200 The request is successful. The meaning


of each field in the returned string is
as follows:
● accessSession After a user logs in to
the NBI system and accesses the
application interface, the user sets
the session to the HTTP cookie. The
key is accessSession.
● roaRand When a user accesses a
non-GET ROA interface, the
roaRand needs to be added to the
request header. The key is roarand.
● expires The session becomes invalid
when it does not respond within
this period.
● In additionalInfo, expires represents
the remaining validity days of the
password. passwdStatus represents
the password status, and the value
expiring indicates that the password
is about to expire.

400 Incorrect username or password.


Parameter error.
The number of incorrect password
attempts reaches the maximum.
The user is locked.
The password has expired.
The centralized authentication server
fails to be connected.
In centralized authentication mode,
the database or service is abnormal.
In centralized authentication mode,
the unauthorized user is not allowed
to log in. Contact the administrator.
The number of login attempts has
reached the upper limit. Contact the
administrator.

403 The login is restricted. Contact the


administrator. For example:account
suspension.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 142


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Operation Severity
Minor

1.9.1.7 Add an SSO Server Whitelist

Functions
Add an SSO server whitelist.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
Users attached to the SMManagers role can call this interface. When accessing the
application interface, set the HTTP header to the session obtained after the
northbound login. The key is X-Auth-Token and the value is the session value, for
example, X-Auth-Token:xxx.

HTTP Method
POST

URI
/rest/plat/smapp/v1/sso-server

Path parameters

None

Query parameters

None

Request
● Header parameters
See the sample request.
● Body parameters

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 143


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramete Mandato Type Value Description


r ry Range

id No strin None Whitelist ID.


g

descriptio No strin None Whitelist description, which


n g contains a maximum of 127
characters.

host No strin None Whitelist address, which can


g be a domain name, IPv4
address, or IPv6 address. This
parameter is mandatory
when the whitelist address is
a single IP address and its
type is a domain name.

startip No strin None Start IP address. This


g parameter is mandatory
when the whitelist address
type is a range.

endip No strin None End IP address. This


g parameter is mandatory
when the whitelist address
type is a range.

createDat No strin None Creation time. This


eTime g parameter is returned only
for query and is not required
for creation.

type Yes int32 None Whitelist address type. The


value 0 indicates an IPv4
address, 1 indicates an IPv6
address, 2 indicates a
domain name, 3 indicates an
IPv4 address range, and 4
indicates an IPv6 address
range.

● Sample request
POST /rest/plat/smapp/v1/sso-server HTTP/1.1
Content-Type:application/json;charset=UTF-8
Accept:application/json
{
"description":"fdaf",
"host":"***.***.***",
"startip":"",
"endip":"",
"type":2
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 144


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response
● Response parameters
● Sample response
HTTP/1.1 200 OK
Content-Type:text/plain

Status Codes
Status Code Description

200 The request is successful.

406 Parameter error.


The format of the entered trusted
address is incorrect.

400 The whitelist to be added already


exists.

403 Authentication failed

Operation Severity
Minor

1.9.1.8 Query SSO Server Whitelists

Functions
Query SSO server whitelists.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
Users attached to the SMManagers role can call this interface. When accessing the
application interface, set the HTTP header to the session obtained after the

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 145


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

northbound login. The key is X-Auth-Token and the value is the session value, for
example, X-Auth-Token:xxx.

HTTP Method
GET

URI
/rest/plat/smapp/v1/sso-server
Path parameters
None
Query parameters

Parameter Mandator Type Value Description


y Range

ssoServerA Yes string None Query the SSO server address.


ddress If the value of SSO server
address has a range, you need
to enter a start IP address and
an end IP address, for
example,
10.111.111.111~10.222.222.22
2.

Request
● Header parameters
See the sample request.
● Body parameters
None
● Sample request
GET /rest/plat/smapp/v1/sso-server?ssoServerAddress=10.111.111.111~10.222.222.222
HTTP/1.1
Content-Type:application/json;charset=UTF-8
Accept:application/json

Response
● Response parameters
– Response status code 200:
The string is returned.
● Sample response
HTTP/1.1 200 OK
Content-Type:application/json
{
"id":1,
"description":"",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 146


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"host":null,
"startip":"10.111.111.111",
"endip":"10.222.222.222",
"createDateTime":null,
"type":3
}

Status Codes
Status Code Description

200 The request is successful. If the queried


SSO Server exists, the SSO Server
information is returned. If the queried
SSO Server does not exist, an empty
string is returned.

406 Parameter error.

403 Authentication failed

Operation Severity
Minor

1.9.1.9 Delete SSO Server Whitelists in Batches

Functions
Delete SSO server whitelists in batches.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
Users attached to the SMManagers role can call this interface. When accessing the
application interface, set the HTTP header to the session obtained after the
northbound login. The key is X-Auth-Token and the value is the session value, for
example, X-Auth-Token:xxx. All corresponding IDs of the SSO server whitelists to

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 147


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

be deleted must exist. Otherwise, the interface fails to be called and the error
code 400 is returned.

HTTP Method
DELETE

URI
/rest/plat/smapp/v1/sso-server
Path parameters
None
Query parameters

Parameter Mandator Type Value Description


y Range

ids Yes string None Whitelist IDs.

Request
● Header parameters
See the sample request.
● Body parameters
None
● Sample request
DELETE /rest/plat/smapp/v1/sso-server?ids=[1,2,3,4] HTTP/1.1
Content-Type:application/json;charset=UTF-8
Accept:text/plain

Response
● Response parameters
● Sample response
HTTP/1.1 200 OK
Content-Type:application/json

Status Codes
Status Code Description

200 The request is successful.

406 Parameter error.

400 Some deleted SSO server whitelists do


not exist.

403 Authentication failed

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 148


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Operation Severity
Minor

1.9.1.10 Modify an SSO Server Whitelist

Functions
Modify the SSO server whitelist of a specified ID.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
Users attached to the SMManagers role can call this interface. When accessing the
application interface, set the HTTP header to the session obtained after the
northbound login. The key is X-Auth-Token and the value is the session value, for
example, X-Auth-Token:xxx. Any modified SSO server whitelist cannot be identical
to an existing one. Otherwise, the interface fails to be called and the error code
400 is returned.

HTTP Method
PUT

URI
/rest/plat/smapp/v1/sso-server/{id}
Path parameters

Parameter Mandator Type Value Description


y Range

id Yes string None Whitelist ID.

Query parameters
None

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 149


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request
● Header parameters
See the sample request.
● Body parameters
Paramete Mandato Type Value Description
r ry Range

id No strin None Whitelist ID.


g

descriptio No strin None Whitelist description, which


n g contains a maximum of 127
characters.

host No strin None Whitelist address, which can


g be a domain name, IPv4
address, or IPv6 address. This
parameter is mandatory
when the whitelist address is
a single IP address and its
type is a domain name.

startip No strin None Start IP address. This


g parameter is mandatory
when the whitelist address
type is a range.

endip No strin None End IP address. This


g parameter is mandatory
when the whitelist address
type is a range.

createDat No strin None Creation time. This


eTime g parameter is returned only
for query and is not required
for creation.

type Yes int32 None Whitelist address type. The


value 0 indicates an IPv4
address, 1 indicates an IPv6
address, 2 indicates a
domain name, 3 indicates an
IPv4 address range, and 4
indicates an IPv6 address
range.

● Sample request
PUT /rest/plat/smapp/v1/sso-server/1 HTTP/1.1
Content-Type:application/json;charset=UTF-8
{
"description":"testDescription",
"host":"X.X.X.X",
"startip":"",
"endip":"",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 150


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"type":0
}

Response
● Response parameters
● Sample response
HTTP/1.1 200 OK
Content-Type:text/plain

Status Codes
Status Code Description

200 The request is successful.

406 Parameter error.

400 The modified SSO server whitelist is


identical to an existing one.

403 Authentication failed

Operation Severity
Minor

1.9.1.11 Authenticate a User V2 (Compatible with Earlier Versions)

Functions
This interface is used for third-party user authentication and login.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
When accessing the application interface, set the HTTP header to the session
obtained after the northbound login. The key is X-Auth-Token and the value is the

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 151


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

session value, for example, X-Auth-Token:xxx. Content-Type of this interface can be


application/json;charset=UTF-8 or application/x-www-form-
urlencoded;charset=UTF-8.

HTTP Method
PUT

URI
/rest/openapi/sm/session
Path parameters
None
Query parameters
None

Request
● Header parameters
See the sample request.
● Body parameters
Paramete Mandato Type Value Description
r ry Range

userid Yes strin None Indicates the username.


g

value Yes pass None Indicates the user password


word of a third-party system
access user.

ipaddr No strin None Indicates the IP address.


g Note: The IP address
returned for the request is
used in priority. This IP
address is a reserved IP
address and used only when
no IP address is returned for
the request.

● Sample request
PUT /rest/openapi/sm/session HTTP/1.1
Accept:application/json
Content-Type:application/json;charset=UTF-8
{
"userid": "XXX",
"value": "XXX",
"ipaddr": "127.0.0.1"
}

PUT /rest/openapi/sm/session HTTP/1.1

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 152


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept:application/x-www-form-urlencoded
Content-Type:application/x-www-form-urlencoded;charset=UTF-8
userid=XXX&value=XXX&ipaddr=127.0.0.1

Response
● Response parameters
– Response status code 200:
The OpenAPIResult object is returned.
Attributes of the OpenAPIResult object
Paramet Mandato Type Value Description
er ry Range

code Yes int32 None Indicates the response


code of the operation. The
options are as follows:
● 0: Successful
● Other value: Failed

data No strin None Returned session


g

descripti No strin None Indicates the description of


on g the returned information

● Sample response
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 0,
"data" : "xxxxxxxxxxxxxxxxxxxxxxxx",
"description" : "Operation success."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "Login failure. Incorrect user name or password."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "Login failed due to incorrect user name or password. The user account
has been locked."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "Password has expired."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 153


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"description" : "Failed to connect to the centralized authentication server."


}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "The service is not started or the database fails to be connected.
Contact the administrator to resolve the problem."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "An unauthorized user cannot log in. Contact the system administrator."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "Login not allowed. Contact the administrator."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "Internal service error. Contact the administrator to resolve the
problem."
}

Status Codes
Status Code Description

200 The request is successful or failed.

Operation Severity
Minor

1.9.1.12 Log Out a Session V2 (Compatible with Earlier Versions)

Functions
This interface is used to log out the current third-party session or a common
session.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 154


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

SLA Item Description

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
None

HTTP Method
DELETE

URI
/rest/openapi/sm/session
Path parameters
None
Query parameters
None

Request
● Header parameters
Paramete Mandato Type Value Description
r ry Range

openid No strin None Indicates the session ID of


g the user who needs to be
logged out.
Note: This parameter is
obtained by invoking the
OpenAPI authentication
interface.

● Body parameters

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 155


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramete Mandato Type Value Description


r ry Range

openid No strin None Indicates the session ID of


g the user who needs to be
logged out.
Note: This parameter is
obtained by invoking the
OpenAPI authentication
interface. If openid is
available both in the request
header and in the parameter
list, openid in the request
header takes effect.

● Sample request
DELETE /rest/openapi/sm/session HTTP/1.1
Accept:application/json
Content-Type:application/json;charset=UTF-8
openid:r-xxxxxxxxxxxxxxxxx

DELETE /rest/openapi/sm/session HTTP/1.1


Accept:application/json
Content-Type:application/json;charset=UTF-8
{
"openid": "r-xxxxxxxxxxxxxxxxx"
}

Response
● Response parameters
– Response status code 200:
The OpenAPIResult object is returned.
Attributes of the OpenAPIResult object
Paramet Mandato Type Value Description
er ry Range

code Yes int32 None Indicates the response


code of the operation. The
options are as follows:
● 0: Successful
● Other value: Failed

data No strin None Returned session


g

descripti No strin None Indicates the description of


on g the returned information

● Sample response
HTTP/1.1 200 OK
Content-Type:application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 156


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"code" : 0,
"description" : "Operation success."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "openID is wrong."
}
HTTP/1.1 200 OK
Content-Type:application/json
{
"code" : 1,
"description" : "failed. user has logout."
}

Status Codes
Status Code Description

200 The request is successful or failed.

Operation Severity
Minor

1.9.1.13 Authenticate a Common User or a Remote User

Functions
This interface authenticates the login of a common user or a remote user.

SLA Item Description

Request success rate ≥ 99%

Availability Tier2

Data consistency Eventually consistent, inconsistent


duration < 1 minute

Throughput 20 tps

TP50 request delay 20 ms

TP99.9 request delay 200 ms

Precautions
This interface must be accessed through HTTPS.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 157


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
PUT

URI
/rest/plat/uam/v1/auth/uniauth
Path parameters
None
Query parameters
None

Request
● Header parameters
See the sample request.
● Body parameters

Paramete Mandato Type Value Description


r ry Range

terminal Yes strin None Indicates the IP address of a


g terminal.

userName Yes strin Default: "" Indicates the username.


g

userEmail No strin Default: "" Indicates the user email , it


g is used when login by email.

userPhon No strin Default: "" Indicates the user phone


e g number, it is used when
login by phone number.

value Yes pass None Indicates the password used


word by users for login.

sessionInv No boole true,false Indicates whether a session


alid an Default: is invalid. This parameter is
false required for generating a
session and not required if
only passwords are verified.
true: The user logins are not
limited and the number of
user logins is not consumed.
false: The session is valid.
User logins are limited by
the values of Max. online
sessions and Allowed logins.

organizati No strin None Indicates the tenant name.


onName g

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 158


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramete Mandato Type Value Description


r ry Range

attributes No Map None Indicates extended


<obje attributes.
ct,
strin
g>

● Sample request
PUT /rest/plat/uam/v1/auth/uniauth HTTP/1.1
Accept:application/json
Content-Type:application/json;charset=UTF-8
X-Auth-Token: x-hesbaoru3sj********bznw7x7xfy2kaptjju
{
"terminal": "127.0.0.1",
"userName": "XXX",
"value": "***",
"sessionInvalid": "true"
}

Response
● Response parameters
– Response status code 200:
The UniUserInfo object is returned.
Attributes of the UniUserInfo object
Paramet Mandato Type Value Description
er ry Range

userId No int32 None Indicates the user ID.

userNam No strin None Indicates the username.


e g

type No int32 None Indicates the user type.

enableIdl No bool true,false Specifies whether to


eTime ean Default: enable the idle timeout
false period.

idleTime No int32 Default: 0 Indicates the idle timeout


period.

roleIds No List< None Indicates the list of IDs of


int32 roles to which users
> belong.

roleNam No List< None Indicates the list of names


es strin of roles to which users
g> belong.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 159


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramet Mandato Type Value Description


er ry Range

region No Regi None Indicates the region to


on which a user belongs.
obje
ct

resource No Map None Indicates the resource


Groups <obj groups bound to a user.
ect,
List<
User
Reso
urce
Grou
p>>

permissio No Map None This is a discarded field.


ns <obj
ect,
List<
strin
g>>

callBack No CallB None Indicates an object


Url ackU containing callback
rl functions that are used
obje when roles or resource
ct groups do not meet
requirements.

domain No Regi None This is a reserved field.


on
obje
ct

privateRo No int32 None Indicates the private role


leId ID to which users belong.

organizat No strin None Indicates the organization


ionName g name.

organizat No strin None Indicates the organization


ionId g ID.

refreshTo No strin None Indicates the refresh token.


ken g

Attributes of the Region object

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 160


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramet Mandato Type Value Description


er ry Range

id No strin None Indicates the region ID.


g

name No strin None Indicates the region name.


g

descripti No strin None Indicates the region


on g description.

domain No int32 None Indicates the domain to


which the region belongs.

mgrRoleI No int32 None Indicates the role ID of the


d region administrator.

mgrUserI No int32 None Indicates the user ID of the


d region administrator.

organizat No strin None Indicates the organization


ionId g ID.

parentId No strin None Indicates the parent region


g ID.

isParent No bool true,false Indicates whether has child


ean region.

maxUser No int32 None Total number of users that


Count can be created in the
current region and its
lower-level regions. This
parameter is used only in
NCE-E and is mandatory.

maxRegi No int32 None Total number of regions


onCount that can be created in the
current region and its
lower-level regions. This
parameter is used only in
NCE-E and is mandatory.

currentU No int32 None Total number of existing


serCount users in the current region
and its lower-level regions.
This parameter is used
only in NCE-E.

currentR No int32 None Total number of existing


egionCou regions in the current
nt region and its lower-level
regions. This parameter is
used only in NCE-E.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 161


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Paramet Mandato Type Value Description


er ry Range

path No strin None String of all parent region


g IDs separated by vertical
lines (|).

extend1 No strin None Indicates the first extend


g field.

extend2 No strin None Indicates the second


g extend field.

Attributes of the CallBackUrl object


Paramet Mandato Type Value Description
er ry Range

roleCallB No strin None Indicates the callback URL


ack g used for verifying roles.

resource No strin None Indicates the callback URL


CallBack g used for verifying resource
groups.

permissio No strin None This is a discarded field.


nCallBac g
k

● Sample response
HTTP/1.1 200 OK
Content-Type:application/json
{
"userId": 198245,
"userName": "user007",
"type": 0,
"enableIdleTime": true,
"idleTime": 600000,
"roleIds": [1],
"roleNames": ["Administrators"],
"region": {
"id": "global",
"name": "global",
"description": null,
"domain": 0,
"mgrRoleId": 0
},
"resourceGroups": {
"1": [{
"source": null,
"groupId": "2",
"tag": null
}
]
},
"permissions": {},

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 162


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"callBackUrl": {
"roleCallBack": "/rest/plat/xxx/xxx",
"resourceCallBack": "/rest/plat/xxx/xxx",
"permissionCallBack": ""
},
"domain": {
"id": "0",
"name": "global",
"description": null,
"domain": 0,
"mgrRoleId": 0
}
}

Status Codes
Status Code Description

200 Authenticated user information is


obtained.

400 Incorrect username or password.


Parameter error.
The user is locked because the number
of incorrect password attempts reaches
the maximum.
The IP address is locked because the
number of the incorrect password
attempts reaches the maximum.
The initial password is not changed.
The password is about to expire.
The password has expired.
The unauthorized user is not allowed
to log in. Contact the administrator.
The number of login attempts has
reached the upper limit. Contact the
administrator.

403 The login is restricted. Contact the


administrator. For example:account
suspension.

406 Invalid parameter.

Operation Severity
Minor

1.9.2 ZTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 163


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.2.1 ZTP Region Management


ZTP region management APIs for adding, deleting, modifying, and querying
regions.

1.9.2.1.1 Query Global Configurations

Typical Scenarios
The global configuration needs to be queried.

Functions
Query global configurations.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/regions/global

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/regions/global HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Table 1-55 QueryRegionGlobalDto parameters

Param Type Value Range Defaul Description Example


eter t Value

snmpA string 1 to 32 - SNMP account. "huawei"


ccount characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 164


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

authPr string 4 to 8 - Authentication "HMAC_SHA"


otocol characters. protocol.

authP string 8 to 255 - This field may -


WDInf characters. contain
o sensitive or
personal data.
Keep it secure.
Authentication
password.

encryp string 4 to 7 - Encryption "AES_128"


tAlgori characters. algorithm.
thm

encryp string 8 to 255 - This field may -


tPWDI characters. contain
nfo sensitive or
personal data.
Keep it secure.
Encryption
password.

snmpP int32 [1-65535] 0 SNMP port 161


ort number.

timeou int32 [3000-2147483 0 Timeout 4000


t 647] interval.

repetiti int32 [0-255] 0 Number of 3


ons repetitions.

netcon string 1 to 32 - NETCONF "huawei"


fAccou characters. account.
nt

netcon string 8 to 255 - This field may -


fPWDI characters. contain
nfo sensitive or
personal data.
Keep it secure.
NETCONF
password.

netcon int32 [1-65535] 0 NETCONF port 22


fPort number.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 165


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"snmpAccount" : "huawei",
"authProtocol" : "HMAC_SHA",
"encryptAlgorithm" : "AES_128",
"snmpPort" : 161,
"timeout" : 4000,
"repetitions" : 3,
"netconfAccount" : "huawei",
"netconfPort" : 22
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.2 Update Global Configurations

Typical Scenarios
The global configuration needs to be queried.

Functions
Update global configurations.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 166


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
PUT

URI
/sdn/acdcn/v3/underlay/ztp/regions/global

Request Parameters

Table 1-56 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-57. updating
global
configurations.

Table 1-57 RegionGlobalDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

snmpA Yes string 1 to 32 - SNMP account. "huawei"


ccount charac
ters.

authPr Yes string 4 to 8 - Authentication "HMAC_SHA"


otocol charac protocol.
ters.

authP Yes string 8 to - This field may "********"


WDInf 255 contain
o charac sensitive or
ters. personal data.
Keep it secure.
Authentication
password.

encryp Yes string 4 to 7 - Encryption "AES_128"


tAlgori charac algorithm.
thm ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 167


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

encryp Yes string 8 to - This field may "********"


tPWDI 255 contain
nfo charac sensitive or
ters. personal data.
Keep it secure.
Encryption
password.

snmpP Yes int32 [1-655 0 SNMP port 161


ort 35] number.

timeou Yes int32 [3000- 0 Timeout 4000


t 21474 interval.
83647]

repetiti Yes int32 [0-255 0 Number of 3


ons ] repetitions.

netcon Yes string 1 to 32 - NETCONF "huawei"


fAccou charac account.
nt ters.

netcon Yes string 8 to - This field may "********"


fPWDI 255 contain
nfo charac sensitive or
ters. personal data.
Keep it secure.
NETCONF
password.

netcon Yes int32 [1-655 0 NETCONF port 22


fPort 35] number.

Sample Request
HTTP
PUT /sdn/acdcn/v3/underlay/ztp/regions/global HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"snmpAccount" : "huawei",
"authProtocol" : "HMAC_SHA",
"authPWDInfo" : "********",
"encryptAlgorithm" : "AES_128",
"encryptPWDInfo" : "********",
"snmpPort" : 161,
"timeout" : 4000,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 168


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"repetitions" : 3,
"netconfAccount" : "huawei",
"netconfPWDInfo" : "********",
"netconfPort" : 22
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.3 Query Detailed Region Information by Region ID

Typical Scenarios
Detailed region information needs to be queried.

Functions
Query detailed region information by region ID.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 169


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/regions/info

Table 1-58 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regioni Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/regions/info?regionid=DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Table 1-59 RegionDto parameters

Param Type Value Range Defaul Description Example


eter t Value

regionI string 0 to 36 - Region ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

region string 1 to 32 - Region name. "Region One"


Name characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 170


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

deploy string 7 to 16 - Deployment "IN_BAND"


Mode characters. mode.

relyLld boolea - - Whether to use true


p n LLDP relay.

precise boolea - - Whether to false


Plan n perform
refined
planning.

manag string 0 to 64 - Management "vpn"


eVpn characters. VPN.

fabricI string 0 to 36 - Fabric ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabric string 0 to 128 - Fabric name. "Fabric One"


Name characters.

ftpIp string 0 to 15 - FTP address. "192.168.1.1"


characters.

ftpPort int32 [0-65535] 0 FTP port 22


number.

ftpAcc string 0 to 32 - FTP account. "admin"


ount characters.

ftpPW string 0 to 256 - This field may "********"


DInfo characters. contain
sensitive or
personal data.
Keep it secure.
FTP password.

ftpMer boolea - - Whether to false


ge n enable FTP
backup.

ftpIpv6 string 0 to 15 - IPv6 address of "fc00::/7"


characters. the FTP server.

ftpPort int32 [0-65535] 0 IPv6 port 22


v6 number of the
FTP server.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 171


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

ftpAcc string 0 to 32 - IPv6 account of "admin"


ountv6 characters. the FTP server.

ftpPW string 0 to 256 - This field may "******"


DInfov characters. contain
6 sensitive or
personal data.
Keep it secure.
IPv6 password
of the FTP
server.

backup string 0 to 15 - IP address for "10.0.0.0"


FtpIp characters. FTP backup.

backup int32 [0-65535] 0 Port number 22


FtpPor for FTP backup.
t

backup string 0 to 32 - Account for "admin"


FtpAcc characters. FTP backup.
ount

backup string 0 to 32 - This field may "******"


FtpPW characters. contain
DInfo sensitive or
personal data.
Keep it secure.
Password for
FTP backup.

usedSl boolea - - Whether the false


aveBac n backup FTP
kupFtp server is used.

slaveB string 0 to 15 - IP address of "10.2.3.4"


ackupF characters. the backup FTP
tpIp server. The
value contains
0 to 15
characters.

slaveB int32 [0-65535] 0 Port number of 22


ackupF the backup FTP
tpPort server. The
value is in the
range from 0
to 65535.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 172


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

slaveB string 0 to 32 - Backup FTP "admin"


ackupF characters. account. The
tpAcco value contains
unt 0 to 32
characters.

slaveB string 0 to 32 - This field may "******"


ackupF characters. contain
tpPWD sensitive or
Info personal data.
Keep it secure.
Password for
logging in to
the backup FTP
server. The
value contains
0 to 32
characters.

dhcpIp string 0 to 15 - IP address of "10.0.0.0"


characters. the DHCP
server. The
value is in the
range from 0
to 15.

region string 0 to 128 - Region "memo"


Memo characters. remarks.

region ARRAY For details, see Table Extended -


Extend _REFER 1-60. region
edList ENCE information.

Table 1-60 RegionExtendedDto parameters


Param Type Value Range Defaul Description Example
eter t Value

extAttr string 1 to 256 - Extended "DBB702C3-77


Id characters. attribute value. 19-4FE6-
A5AD-3A9C9E2
65309"

extAttr string 1 to 256 - Extended "A-1"


Name characters. attribute name.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 173


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extAttr string 1 to 256 - Extended "123"


Value characters. attribute ID.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionName" : "Region One",
"deployMode" : "IN_BAND",
"relyLldp" : true,
"precisePlan" : false,
"manageVpn" : "vpn",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "Fabric One",
"ftpIp" : "192.168.1.1",
"ftpPort" : 22,
"ftpAccount" : "admin",
"ftpPWDInfo" : "********",
"ftpMerge" : false,
"ftpIpv6" : "fc00::/7",
"ftpPortv6" : 22,
"ftpAccountv6" : "admin",
"ftpPWDInfov6" : "******",
"backupFtpIp" : "10.0.0.0",
"backupFtpPort" : 22,
"backupFtpAccount" : "admin",
"backupFtpPWDInfo" : "******",
"usedSlaveBackupFtp" : false,
"slaveBackupFtpIp" : "10.2.3.4",
"slaveBackupFtpPort" : 22,
"slaveBackupFtpAccount" : "admin",
"slaveBackupFtpPWDInfo" : "******",
"dhcpIp" : "10.0.0.0",
"regionMemo" : "memo",
"regionExtendedList" : [
{
"extAttrId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"extAttrName" : "A-1",
"extAttrValue" : "123"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 174


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.4 Query Basic Region Information

Typical Scenarios
Basic region information needs to be queried.

Functions
Query basic region information based on the pagination information and keyword.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/regions/list

Table 1-61 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

limit Yes string 1 to 10 - Maximum "10"


charac number of
ters. records on a
page.

offset Yes string 1 to 10 - Start location. "1"


charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 175


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

keywor No string 1 to 32 - Keyword. "region1"


d charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/regions/list?limit=10&offset=1&keyword=region1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Table 1-62 RegionListDto parameters


Param Type Value Range Defaul Description Example
eter t Value

pageIn int32 [1-2147483647 0 Page index. 1


dex ]

pageSi int32 [1-2147483647 0 Page size. 10


ze ]

totalRe int32 [1-2147483647 0 Total number 100


cords ] of records.

data ARRAY For details, see Table Region data -


_REFER 1-59. list.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 176


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"pageIndex" : 1,
"pageSize" : 10,
"totalRecords" : 100,
"data" : [
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionName" : "Region One",
"deployMode" : "IN_BAND",
"relyLldp" : true,
"precisePlan" : false,
"manageVpn" : "vpn",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "Fabric One",
"ftpIp" : "192.168.1.1",
"ftpPort" : 22,
"ftpAccount" : "admin",
"ftpPWDInfo" : "********",
"ftpMerge" : false,
"ftpIpv6" : "fc00::/7",
"ftpPortv6" : 22,
"ftpAccountv6" : "admin",
"ftpPWDInfov6" : "******",
"backupFtpIp" : "10.0.0.0",
"backupFtpPort" : 22,
"backupFtpAccount" : "admin",
"backupFtpPWDInfo" : "******",
"usedSlaveBackupFtp" : false,
"slaveBackupFtpIp" : "10.2.3.4",
"slaveBackupFtpPort" : 22,
"slaveBackupFtpAccount" : "admin",
"slaveBackupFtpPWDInfo" : "******",
"dhcpIp" : "10.0.0.0",
"regionMemo" : "memo",
"regionExtendedList" : [
{
"extAttrId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"extAttrName" : "A-1",
"extAttrValue" : "123"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 177


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.5 Change the Password of a File Server

Typical Scenarios
The password of a file server in a region needs to be queried.

Functions
Change the password of the file server in a region.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/sdn/acdcn/v3/underlay/ztp/regions/password

Request Parameters

Table 1-63 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-64. changing a file
server
password.

Table 1-64 ModifyPasswordDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 178


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

type Yes string 0 to 64 - Type of the "ftp"


charac password to be
ters. changed. The
value contains
0 to 64
characters.

oldPW Yes string 0 to 32 - This field may "******"


DInfo charac contain
ters. sensitive or
personal data.
Keep it secure.
Old password.

newP Yes string 0 to 32 - This field may "********"


WDInf charac contain
o ters. sensitive or
personal data.
Keep it secure.
New password.

Sample Request
HTTP
PUT /sdn/acdcn/v3/underlay/ztp/regions/password HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : "ftp",
"oldPWDInfo" : "******",
"newPWDInfo" : "********"
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 179


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.6 Create a Region

Typical Scenarios
A region needs to be created.

Functions
Create a region based on related information.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/regions/region

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 180


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-65 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-66. creating a
regional.

Table 1-66 RegionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI No string 0 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

region Yes string 1 to 32 - Region name. "Region One"


Name charac
ters.

deploy Yes string 7 to 16 - Deployment "IN_BAND"


Mode charac mode.
ters.

relyLld Yes boolea - - Whether to use true


p n LLDP relay.

precise Yes boolea - - Whether to false


Plan n perform
refined
planning.

manag No string 0 to 64 - Management "vpn"


eVpn charac VPN.
ters.

fabricI No string 0 to 36 - Fabric ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

fabric No string 0 to - Fabric name. "Fabric One"


Name 128
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 181


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ftpIp Yes string 0 to 15 - FTP address. "192.168.1.1"


charac
ters.

ftpPort Yes int32 [0-655 0 FTP port 22


35] number.

ftpAcc Yes string 0 to 32 - FTP account. "admin"


ount charac
ters.

ftpPW Yes string 0 to - This field may "********"


DInfo 256 contain
charac sensitive or
ters. personal data.
Keep it secure.
FTP password.

ftpMer Yes boolea - - Whether to false


ge n enable FTP
backup.

ftpIpv6 No string 0 to 15 - IPv6 address of "fc00::/7"


charac the FTP server.
ters.

ftpPort No int32 [0-655 0 IPv6 port 22


v6 35] number of the
FTP server.

ftpAcc No string 0 to 32 - IPv6 account of "admin"


ountv6 charac the FTP server.
ters.

ftpPW No string 0 to - This field may "******"


DInfov 256 contain
6 charac sensitive or
ters. personal data.
Keep it secure.
IPv6 password
of the FTP
server.

backup No string 0 to 15 - IP address for "10.0.0.0"


FtpIp charac FTP backup.
ters.

backup No int32 [0-655 0 Port number 22


FtpPor 35] for FTP backup.
t

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 182


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

backup No string 0 to 32 - Account for "admin"


FtpAcc charac FTP backup.
ount ters.

backup No string 0 to 32 - This field may "******"


FtpPW charac contain
DInfo ters. sensitive or
personal data.
Keep it secure.
Password for
FTP backup.

usedSl No boolea - - Whether the false


aveBac n backup FTP
kupFtp server is used.

slaveB No string 0 to 15 - IP address of "10.2.3.4"


ackupF charac the backup FTP
tpIp ters. server. The
value contains
0 to 15
characters.

slaveB No int32 [0-655 0 Port number of 22


ackupF 35] the backup FTP
tpPort server. The
value is in the
range from 0
to 65535.

slaveB No string 0 to 32 - Backup FTP "admin"


ackupF charac account. The
tpAcco ters. value contains
unt 0 to 32
characters.

slaveB No string 0 to 32 - This field may "******"


ackupF charac contain
tpPWD ters. sensitive or
Info personal data.
Keep it secure.
Password for
logging in to
the backup FTP
server. The
value contains
0 to 32
characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 183


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dhcpIp No string 0 to 15 - IP address of "10.0.0.0"


charac the DHCP
ters. server. The
value is in the
range from 0
to 15.

region No string 0 to - Region "memo"


Memo 128 remarks.
charac
ters.

region No ARRAY For details, see Extended -


Extend _REFER Table 1-67. region
edList ENCE information.

Table 1-67 RegionExtendedDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extAttr Yes string 1 to - Extended "DBB702C3-77


Id 256 attribute value. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

extAttr Yes string 1 to - Extended "A-1"


Name 256 attribute name.
charac
ters.

extAttr Yes string 1 to - Extended "123"


Value 256 attribute ID.
charac
ters.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/regions/region HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionName" : "Region One",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 184


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"deployMode" : "IN_BAND",
"relyLldp" : true,
"precisePlan" : false,
"manageVpn" : "vpn",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "Fabric One",
"ftpIp" : "192.168.1.1",
"ftpPort" : 22,
"ftpAccount" : "admin",
"ftpPWDInfo" : "********",
"ftpMerge" : false,
"ftpIpv6" : "fc00::/7",
"ftpPortv6" : 22,
"ftpAccountv6" : "admin",
"ftpPWDInfov6" : "******",
"backupFtpIp" : "10.0.0.0",
"backupFtpPort" : 22,
"backupFtpAccount" : "admin",
"backupFtpPWDInfo" : "******",
"usedSlaveBackupFtp" : false,
"slaveBackupFtpIp" : "10.2.3.4",
"slaveBackupFtpPort" : 22,
"slaveBackupFtpAccount" : "admin",
"slaveBackupFtpPWDInfo" : "******",
"dhcpIp" : "10.0.0.0",
"regionMemo" : "memo",
"regionExtendedList" : [
{
"extAttrId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"extAttrName" : "A-1",
"extAttrValue" : "123"
}
]
}

Response Parameters
Response status code 201: Created

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Created
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 185


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.7 Modify a Region

Typical Scenarios
Region information needs to be modified.

Functions
Modify a region.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/sdn/acdcn/v3/underlay/ztp/regions/region

Request Parameters

Table 1-68 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-66. modifying a
region.

Sample Request
HTTP
PUT /sdn/acdcn/v3/underlay/ztp/regions/region HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 186


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionName" : "Region One",
"deployMode" : "IN_BAND",
"relyLldp" : true,
"precisePlan" : false,
"manageVpn" : "vpn",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "Fabric One",
"ftpIp" : "192.168.1.1",
"ftpPort" : 22,
"ftpAccount" : "admin",
"ftpPWDInfo" : "********",
"ftpMerge" : false,
"ftpIpv6" : "fc00::/7",
"ftpPortv6" : 22,
"ftpAccountv6" : "admin",
"ftpPWDInfov6" : "******",
"backupFtpIp" : "10.0.0.0",
"backupFtpPort" : 22,
"backupFtpAccount" : "admin",
"backupFtpPWDInfo" : "******",
"usedSlaveBackupFtp" : false,
"slaveBackupFtpIp" : "10.2.3.4",
"slaveBackupFtpPort" : 22,
"slaveBackupFtpAccount" : "admin",
"slaveBackupFtpPWDInfo" : "******",
"dhcpIp" : "10.0.0.0",
"regionMemo" : "memo",
"regionExtendedList" : [
{
"extAttrId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"extAttrName" : "A-1",
"extAttrValue" : "123"
}
]
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 187


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.1.8 Delete a Region by ID

Typical Scenarios
A region needs to be deleted.

Functions
Delete a region by ID.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/sdn/acdcn/v3/underlay/ztp/regions/region

Request Parameters

Table 1-69 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-70. deleting a
region.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 188


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-70 RegionIdListDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes array< Each - Region ID list. -


dList string> item
has 0
to 36
charac
ters.

Sample Request
HTTP
DELETE /sdn/acdcn/v3/underlay/ztp/regions/region HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 189


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.2 L3 Multicast Serviceon Logical Router


Description of APIs for ZTP resource pool management:

1. Create and delete resource pools.

2. Obtain resource pools.

1.9.2.2.1 A resource pool needs to be created.

Typical Scenarios
A resource pool needs to be created.

Functions
Create resource pools based on related information.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/respool/region/{regionId}

Table 1-71 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 190


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-72 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-73. creating a
resource pool.

Table 1-73 RespoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

region No string 1 to 36 - Region ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

respool Yes ARRAY For details, see Resource pool. -


_REFER Table 1-74.
ENCE

Table 1-74 PoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pool Yes string ● Vla - Resource pool "Inter"


n type.
● Vte
p
● Mg
mt
● Inte
r
● Bgp
Pee
r

segme No ARRAY For details, see Resource pool -


nts _REFER Table 1-75. segment.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 191


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-75 SegmentDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 1 to 64 - Resource pool "DBB702C3-77


charac ID, which is 19-4FE6-
ters. automatically A5AD-3A9C9E2
generated by 65309"
the controller
and does not
need to be
carried during
creation.

start No string 7 to 15 - Start IP "10.0.0.0"


charac address.
ters.

end No string 7 to 15 - End IP address. "10.0.0.1"


charac
ters.

mask No string [1-128 - IP address "24"


] mask of a
resource pool.

ip- No string ● Ipv4 - IP address type "Ipv4"


version of a resource
pool.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/respool/region/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"region" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"respool" : [
{
"pool" : "Inter",
"segments" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"start" : "10.0.0.0",
"end" : "10.0.0.1",
"mask" : "24",
"ip-version" : "Ipv4"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 192


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

]
}

Response Parameters
Response status code 201: Created

Table 1-76 AddRespoolOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

regionI string 1 to 36 - Region ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

respool ARRAY For details, see Table Resource pool -


_REFER 1-77. list.
ENCE

Table 1-77 Respool parameters

Param Type Value Range Defaul Description Example


eter t Value

respool string ● Vlan - Resource pool "Vlan"


Type type.
● Vtep
● Mgmt
● Inter
● BgpPeer

segme ARRAY For details, see Table Resource pool -


nts _REFER 1-78. data.
ENCE

Table 1-78 Segments parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 1 to 64 - Resource pool "DBB702C3-77


characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

mask string [1-128] - IP address "24"


mask of a
resource pool.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 193


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

ipVersi string ● Ipv4 - IP address type "Ipv4"


on of a resource
pool.

startIp string 7 to 15 - Start IP "10.2.3.4"


characters. address.

endIp string 7 to 15 - End IP address. "10.2.3.5"


characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Created
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"respool" : [
{
"respoolType" : "Vlan",
"segments" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mask" : "24",
"ipVersion" : "Ipv4",
"startIp" : "10.2.3.4",
"endIp" : "10.2.3.5"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 194


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.2.2 Query Resource Pools

Typical Scenarios
Resource pools need to be queried.

Functions
Query resource pools by region ID, IP version, and resource pool type.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/respool/region/{regionId}

Table 1-79 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Table 1-80 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ip- No string ● Ipv4 - IP version. "Ipv4"


version

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 195


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pool- Yes string ● Vla - Resource pool "Vlan"


type n type.
● Vte
p
● Mg
mt
● Inte
r
● Bgp
Pee
r

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/respool/region/DBB702C3-7719-4FE6-A5AD-3A9C9E265309?ip-
version=Ipv4&pool-type=Vlan HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Table 1-81 RespoolDto parameters

Param Type Value Range Defaul Description Example


eter t Value

region string 1 to 36 - Region ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

respool ARRAY For details, see Table Resource pool. -


_REFER 1-82.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 196


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-82 PoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

pool string ● Vlan - Resource pool "Inter"


● Vtep type.
● Mgmt
● Inter
● BgpPeer

segme ARRAY For details, see Table Resource pool -


nts _REFER 1-83. segment.
ENCE

Table 1-83 SegmentDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 1 to 64 - Resource pool "DBB702C3-77


characters. ID, which is 19-4FE6-
automatically A5AD-3A9C9E2
generated by 65309"
the controller
and does not
need to be
carried during
creation.

start string 7 to 15 - Start IP "10.0.0.0"


characters. address.

end string 7 to 15 - End IP address. "10.0.0.1"


characters.

mask string [1-128] - IP address "24"


mask of a
resource pool.

ip- string ● Ipv4 - IP address type "Ipv4"


version of a resource
pool.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 197


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"region" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"respool" : [
{
"pool" : "Inter",
"segments" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"start" : "10.0.0.0",
"end" : "10.0.0.1",
"mask" : "24",
"ip-version" : "Ipv4"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.2.3 Delete Resource Pools

Typical Scenarios
Resource pools need to be deleted.

Functions
Delete resource pools by region ID and IP version.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 198


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
DELETE

URI
/sdn/acdcn/v3/underlay/ztp/respool/region/{regionId}

Table 1-84 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters

Table 1-85 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-86. deleting a
resource pool.

Table 1-86 RespoolDeleteDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ip- No string ● Ipv4 - IP version. "Ipv4"


version

ids No array< - - Resource pool -


string> ID list. Only
one resource
pool ID can be
deleted at a
time.

Sample Request
HTTP
DELETE /sdn/acdcn/v3/underlay/ztp/respool/region/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 199


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"ip-version" : "Ipv4",
"ids" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.3 ZTP Whitelist Management


ZTP whitelist management APIs used to:

1. Create, delete, and query whitelists.

2. Download Chinese and English whitelist templates.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 200


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.2.3.1 Create a Whitelist

Typical Scenarios
A whitelist needs to be created.

Functions
Create a whitelist based on the planned information.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/whitelist

Request Parameters

Table 1-87 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-88. creating a
whitelist.

Table 1-88 WhiteListWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

dtoList Yes ARRAY For details, see Whitelist. -


_REFER Table 1-89.
ENCE

total- Yes int32 [0-214 0 Total number. 100


num 74836
47]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 201


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-89 WhiteListDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

esn No string 20 - Device serial "1234567890Q


charac number. Either WERTYUIOP"
ters. the device MAC
address or
device serial
number can be
selected.

mac No string 14 - Device MAC "0000-1122-33


charac address. Either 44"
ters. the device MAC
address or
device serial
number can be
selected.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/whitelist HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dtoList" : [
{
"esn" : "1234567890QWERTYUIOP",
"mac" : "0000-1122-3344"
}
],
"total-num" : 100
}

Response Parameters
Response status code 201: Created

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 202


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-90 WhiteListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

regionI string 1 to 36 - Region ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

dtoList ARRAY For details, see Table Whitelist. -


_REFER 1-91.
ENCE

total- int32 [0-2147483647 0 Total number. 100


num ]

Table 1-91 WhiteListDto parameters


Param Type Value Range Defaul Description Example
eter t Value

esn string 20 characters. - Device serial "1234567890Q


number. Either WERTYUIOP"
the device MAC
address or
device serial
number can be
selected.

mac string 14 characters. - Device MAC "0000-1122-33


address. Either 44"
the device MAC
address or
device serial
number can be
selected.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Created
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 203


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dtoList" : [
{
"esn" : "1234567890QWERTYUIOP",
"mac" : "0000-1122-3344"
}
],
"total-num" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.3.2 Query Whitelists

Typical Scenarios
Whitelists need to be queried.

Functions
Query whitelist information based on keywords and other information.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/whitelist

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 204


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-92 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

keywor No string 1 to 32 - Keyword. "dhc"


d charac
ters.

limit No int32 [0-655 0 Maximum 6


35] number of
records on a
page.

offset No int32 [0-655 0 Start location. -


35]

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/whitelist?regionId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&keyword=dhc&limit=6 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK
WhiteListWrapper parameters, For details, see Table 1-90.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 205


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dtoList" : [
{
"esn" : "1234567890QWERTYUIOP",
"mac" : "0000-1122-3344"
}
],
"total-num" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.3.3 Delete Whitelists by region ID

Typical Scenarios
Delete Whitelists by region ID.

Functions
Delete whitelists by region ID.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/sdn/acdcn/v3/underlay/ztp/whitelist

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 206


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-93 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-94. deleting
whitelists.

Table 1-94 WhiteListIdsWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI No string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

deviceI No array< - - Device ID list. -


dList string>

Sample Request
HTTP
DELETE /sdn/acdcn/v3/underlay/ztp/whitelist HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIdList" : [
"CE39"
]
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 207


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4 ZTP Open Topology Management


ZTP open topology management APIs used to:

1. Query, verify, and import topology information.

2. Clear topology information.

1.9.2.4.1 Import Devices

Typical Scenarios
Devices need to be imported.

Functions
Import devices based on a data plan.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/topo/device

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 208


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-95 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-96. importing
devices.

Table 1-96 TopologyImportDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device- No int32 [0-214 0 Total number 100


total- 74836 of devices.
num 47]

l2link- No int32 [0-214 0 Total number 100


total- 74836 of Layer 2
num 47] links.

l3link- No int32 [0-214 0 Total number 100


total- 74836 of Layer 3
num 47] links.

operati No string 0 to 16 - Operation -


on- charac mode.
type ters.

device- No ARRAY For details, see Device list. -


list _REFER Table 1-97.
ENCE

l2link- No ARRAY For details, see Layer 2 link -


list _REFER Table 1-99. list.
ENCE

l3link- No ARRAY For details, see Layer 3 link -


list _REFER Table 1-101. list.
ENCE

region- Yes string 1 to 36 - Region ID. "DBB702C3-77


id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

is- No boolea - - Whether to true


overwr n overwrite data.
itten

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 209


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-97 DeviceEntityDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ne- Yes string 1 to 64 - Device index. "CE39"


index charac
ters.

ne-role Yes string 1 to 32 - Device role. "Spine"


charac
ters.

sysna Yes string 0 to - Device name. "CE39"


me 256
charac
ters.

locatio No string 0 to - Location. "Nanjing"


n 256
charac
ters.

mgnt- No string 0 to 64 - Management "10.1.3.4/24"


ipv4 charac IPv4 address.
ters.

mgnt- No string 0 to - Management "fc00::/7"


ipv6 128 IPv6 address.
charac
ters.

vtep- No string 0 to 64 - VTEP IPv4 "10.1.3.4"


ipv4 charac address.
ters.

vtep- No string 0 to - VTEP IPv6 "fc00::/7"


ipv6 128 address.
charac
ters.

ztp- No int32 [0-214 0 ZTP level. 2


level 74836
47]

is- No boolea - - Whether to false


isolate n perform
isolation.

esn No string 0 to 20 - ESN. "1234567890Q


charac WERTYUIOP"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 210


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

stack No string 0 to - Stack. "Stack One"


256
charac
ters.

loopba No string 0 to 64 - IPv4 loopback. "10.1.3.4/24"


ck1- charac
ipv4 ters.

loopba No string 0 to 64 - Ipv6-loopback "fc00::/7"


ckX- charac
ipv6 ters.

status No string 0 to 32 - Status. "NORMAL"


charac
ters.

identifi No int32 [0-214 0 Identifier. 2


er 74836
47]

extend No ARRAY For details, see Extended -


_REFER Table 1-98. device
ENCE information.

Table 1-98 DeviceEntityExtendDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

key- Yes string 0 to - Keyword. "abcd"


name 256
charac
ters.

value Yes string 0 to - Value. "abcd"


256
charac
ters.

Table 1-99 L2LinkEntityDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l2-link- No string 0 to 64 - Layer 2 link ID. "fc00::/7"


id charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 211


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ne- Yes string 0 to 64 - Local device "CEA"


index- charac index.
a ters.

port- Yes string 0 to 64 - Local port "10GE1/0/1"


index- charac index.
a ters.

eth- No string 0 to 64 - Local Eth- "Eth-Trunk0"


trunk- charac Trunk.
no-a ters.

ne- Yes string 0 to 64 - Remote device "CEB"


index- charac index.
b ters.

port- Yes string 0 to 64 - Remote port "10GE1/0/1"


index- charac index.
b ters.

eth- No string 0 to 64 - Remote Eth- "Eth-Trunk0"


trunk- charac Trunk.
no-b ters.

status No string 0 to 32 - Status. "NORMAL"


charac
ters.

extend No ARRAY For details, see Extended Layer -


_REFER Table 1-100. 2 link
ENCE information.

Table 1-100 L2LinkEntityExtendDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

key- Yes string 0 to - Keyword. "abcd"


name 256
charac
ters.

value Yes string 0 to - Value. "abcd"


256
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 212


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-101 L3LinkEntityDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l3-link- No string 0 to 64 - Layer 3 link ID. "DBB702C3-77


id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

ne- Yes string 0 to 64 - Local device "CEA"


index- charac index.
a ters.

if-a Yes string 0 to 64 - Layer 3 "Vlanif1000"


charac interface of the
ters. local device.

ne-a- No string 0 to 64 - Interconnection "10.1.3.4/30"


conn- charac IPv4 address of
ipv4 ters. the local
device.

ne-a- No string 0 to - Interconnection "FE80::/10"


conn- 128 IPv6 address of
ipv6 charac the local
ters. device.

ne- Yes string 0 to 64 - Remote device "CEB"


index- charac index.
b ters.

if-b Yes string 0 to 64 - Layer 3 "Vlanif1000"


charac interface of the
ters. remote device.

ne-b- No string 0 to 64 - Interconnection "10.2.3.4/30"


conn- charac IPv4 address of
ipv4 ters. the remote
device.

ne-b- No string 0 to - Interconnection "FE80::/10"


conn- 128 IPv6 address of
ipv6 charac the remote
ters. device.

extend No ARRAY For details, see Extended Layer -


_REFER Table 1-102. 3 link
ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 213


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-102 L3LinkEntityExtendDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

key- Yes string 0 to - Keyword. "abcd"


name 256
charac
ters.

value Yes string 0 to - Value. "abcd"


256
charac
ters.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/topo/device HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"device-total-num" : 100,
"l2link-total-num" : 100,
"l3link-total-num" : 100,
"device-list" : [
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",
"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l2link-list" : [
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 214


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l3link-list" : [
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",
"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"is-overwritten" : true
}

Response Parameters
Response status code 201: Created

Table 1-103 SaveDeviceInfoOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Created

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 215


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 201 Created


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.2 Query Device Information

Typical Scenarios
Device information needs to be queried.

Functions
Query device information based on keywords and other information.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/topo/device

Table 1-104 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regioni Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 216


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

keywor No string 1 to 32 - Keyword. "region1"


d charac
ters.

limit Yes int32 [0-214 0 Size of a page 1


74836 recording
47] device query
information.

offset Yes int32 [0-214 0 Offset of a 1


74836 page recording
47] device query
information.

status No string ● STA - Device -


RT deployment
● EN status.
D
● AB
NO
RM
AL
● OFF
_LI
NE

onztp No boolea - - Whether ZTP is -


n in progress.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/topo/device?regionid=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&keyword=region1&limit=1&offset=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 217


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-105 TopologyImportDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

device- int32 [0-2147483647 0 Total number 100


total- ] of devices.
num

l2link- int32 [0-2147483647 0 Total number 100


total- ] of Layer 2
num links.

l3link- int32 [0-2147483647 0 Total number 100


total- ] of Layer 3
num links.

operati string 0 to 16 - Operation -


on- characters. mode.
type

device- ARRAY For details, see Table Device list. -


list _REFER 1-106.
ENCE

l2link- ARRAY For details, see Table Layer 2 link -


list _REFER 1-108. list.
ENCE

l3link- ARRAY For details, see Table Layer 3 link -


list _REFER 1-110. list.
ENCE

region- string 1 to 36 - Region ID. "DBB702C3-77


id characters. 19-4FE6-
A5AD-3A9C9E2
65309"

is- boolea - - Whether to true


overwr n overwrite data.
itten

Table 1-106 DeviceEntityDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ne- string 1 to 64 - Device index. "CE39"


index characters.

ne-role string 1 to 32 - Device role. "Spine"


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 218


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

sysna string 0 to 256 - Device name. "CE39"


me characters.

locatio string 0 to 256 - Location. "Nanjing"


n characters.

mgnt- string 0 to 64 - Management "10.1.3.4/24"


ipv4 characters. IPv4 address.

mgnt- string 0 to 128 - Management "fc00::/7"


ipv6 characters. IPv6 address.

vtep- string 0 to 64 - VTEP IPv4 "10.1.3.4"


ipv4 characters. address.

vtep- string 0 to 128 - VTEP IPv6 "fc00::/7"


ipv6 characters. address.

ztp- int32 [0-2147483647 0 ZTP level. 2


level ]

is- boolea - - Whether to false


isolate n perform
isolation.

esn string 0 to 20 - ESN. "1234567890Q


characters. WERTYUIOP"

stack string 0 to 256 - Stack. "Stack One"


characters.

loopba string 0 to 64 - IPv4 loopback. "10.1.3.4/24"


ck1- characters.
ipv4

loopba string 0 to 64 - Ipv6-loopback "fc00::/7"


ckX- characters.
ipv6

status string 0 to 32 - Status. "NORMAL"


characters.

identifi int32 [0-2147483647 0 Identifier. 2


er ]

extend ARRAY For details, see Table Extended -


_REFER 1-107. device
ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 219


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-107 DeviceEntityExtendDto parameters


Param Type Value Range Defaul Description Example
eter t Value

key- string 0 to 256 - Keyword. "abcd"


name characters.

value string 0 to 256 - Value. "abcd"


characters.

Table 1-108 L2LinkEntityDto parameters


Param Type Value Range Defaul Description Example
eter t Value

l2-link- string 0 to 64 - Layer 2 link ID. "fc00::/7"


id characters.

ne- string 0 to 64 - Local device "CEA"


index- characters. index.
a

port- string 0 to 64 - Local port "10GE1/0/1"


index- characters. index.
a

eth- string 0 to 64 - Local Eth- "Eth-Trunk0"


trunk- characters. Trunk.
no-a

ne- string 0 to 64 - Remote device "CEB"


index- characters. index.
b

port- string 0 to 64 - Remote port "10GE1/0/1"


index- characters. index.
b

eth- string 0 to 64 - Remote Eth- "Eth-Trunk0"


trunk- characters. Trunk.
no-b

status string 0 to 32 - Status. "NORMAL"


characters.

extend ARRAY For details, see Table Extended Layer -


_REFER 1-109. 2 link
ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 220


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-109 L2LinkEntityExtendDto parameters


Param Type Value Range Defaul Description Example
eter t Value

key- string 0 to 256 - Keyword. "abcd"


name characters.

value string 0 to 256 - Value. "abcd"


characters.

Table 1-110 L3LinkEntityDto parameters


Param Type Value Range Defaul Description Example
eter t Value

l3-link- string 0 to 64 - Layer 3 link ID. "DBB702C3-77


id characters. 19-4FE6-
A5AD-3A9C9E2
65309"

ne- string 0 to 64 - Local device "CEA"


index- characters. index.
a

if-a string 0 to 64 - Layer 3 "Vlanif1000"


characters. interface of the
local device.

ne-a- string 0 to 64 - Interconnection "10.1.3.4/30"


conn- characters. IPv4 address of
ipv4 the local
device.

ne-a- string 0 to 128 - Interconnection "FE80::/10"


conn- characters. IPv6 address of
ipv6 the local
device.

ne- string 0 to 64 - Remote device "CEB"


index- characters. index.
b

if-b string 0 to 64 - Layer 3 "Vlanif1000"


characters. interface of the
remote device.

ne-b- string 0 to 64 - Interconnection "10.2.3.4/30"


conn- characters. IPv4 address of
ipv4 the remote
device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 221


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

ne-b- string 0 to 128 - Interconnection "FE80::/10"


conn- characters. IPv6 address of
ipv6 the remote
device.

extend ARRAY For details, see Table Extended Layer -


_REFER 1-111. 3 link
ENCE information.

Table 1-111 L3LinkEntityExtendDto parameters


Param Type Value Range Defaul Description Example
eter t Value

key- string 0 to 256 - Keyword. "abcd"


name characters.

value string 0 to 256 - Value. "abcd"


characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"device-total-num" : 100,
"l2link-total-num" : 100,
"l3link-total-num" : 100,
"device-list" : [
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 222


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l2link-list" : [
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",
"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l3link-list" : [
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",
"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"is-overwritten" : true
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 223


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.3 Delete a Device

Typical Scenarios
A device needs to be deleted.

Functions
Delete a device.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/sdn/acdcn/v3/underlay/ztp/topo/device

Request Parameters

Table 1-112 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-113. deleting a
device.

Table 1-113 DeleteDevicesDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

delete- Yes ARRAY For details, see List of devices -


devices _REFER Table 1-114. to be deleted.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 224


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-114 DeleteDeviceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ne- Yes string 1 to 64 - Device index. "CE39"


index charac
ters.

Sample Request
HTTP
DELETE /sdn/acdcn/v3/underlay/ztp/topo/device HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"delete-devices" : [
{
"ne-index" : "CE39"
}
]
}

Response Parameters
Response status code 201: OK

Table 1-115 DeleteDevicesOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 225


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 201 Created


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.4 Import Layer 2 Links

Typical Scenarios
Layer 2 links need to be imported.

Functions
Import Layer 2 links based on a data plan.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/topo/l2link

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 226


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-116 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parametes for -


ENCE Table 1-96. importing
Layer 2 links.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/topo/l2link HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"device-total-num" : 100,
"l2link-total-num" : 100,
"l3link-total-num" : 100,
"device-list" : [
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",
"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l2link-list" : [
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",
"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 227


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l3link-list" : [
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",
"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"is-overwritten" : true
}

Response Parameters
Response status code 201: Created

Table 1-117 SaveL2LinkInfoOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Created
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 228


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.5 Query Layer 2 Link Information

Typical Scenarios
Layer 2 links need to be queried.

Functions
Query Layer 2 link information based on a keyword.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/topo/l2link

Table 1-118 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regioni Yes string 1 to 36 - Region ID. "region1"


d charac
ters.

keywor No string 1 to 32 - Keyword. -


d charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 229


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

limit Yes int32 [0-214 0 Size of a page 1


74836 recording
47] device query
information.

offset Yes int32 [0-214 0 Offset of a 1


74836 page recording
47] device query
information.

status No string ● INIT - Layer 2 link -


IAL deployment
● NO status.
RM
AL
● AB
NO
RM
AL

onztp No boolea - - Whether ZTP is -


n in progress.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/topo/l2link?regionid=region1&limit=1&offset=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK
TopologyImportDtoWrapper parameters, For details, see Table 1-105.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 230


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"device-total-num" : 100,
"l2link-total-num" : 100,
"l3link-total-num" : 100,
"device-list" : [
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",
"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l2link-list" : [
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",
"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l3link-list" : [
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 231


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"is-overwritten" : true
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.6 Import Layer 3 Links

Typical Scenarios
Layer 3 links need to be imported.

Functions
Import Layer 3 links based on a data plan.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/topo/l3link

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 232


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-119 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-96. importing
Layer 3 links.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/topo/l3link HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"device-total-num" : 100,
"l2link-total-num" : 100,
"l3link-total-num" : 100,
"device-list" : [
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",
"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l2link-list" : [
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",
"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 233


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l3link-list" : [
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",
"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"is-overwritten" : true
}

Response Parameters
Response status code 201: Created

Table 1-120 SaveL3LinkInfoOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Created
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 234


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.7 Query Layer 3 Links

Typical Scenarios
Layer 3 links need to be queried.

Functions
Query Layer 3 links based on a keyword.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/topo/l3link

Table 1-121 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regioni Yes string 1 to 36 - Region ID. "region1"


d charac
ters.

keywor No string 1 to 32 - Keyword. "region1"


d charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 235


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

limit Yes int32 [1-214 0 Size of a page 1


74836 recording
47] device query
information.

offset Yes int32 [1-214 0 Offset of a 1


74836 page recording
47] device query
information.

onztp No boolea - - Whether ZTP is -


n in progress.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/topo/l3link?regionid=region1&keyword=region1&limit=1&offset=1 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK
TopologyImportDtoWrapper parameters, For details, see Table 1-105.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 236


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive
{
"device-total-num" : 100,
"l2link-total-num" : 100,
"l3link-total-num" : 100,
"device-list" : [
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",
"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l2link-list" : [
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",
"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],
"l3link-list" : [
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",
"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}
],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 237


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"is-overwritten" : true
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.8 Query Extended Device Information

Typical Scenarios
Device information needs to be queried.

Functions
Query device information by device index.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/topo/deviceext/{neIndex}

Table 1-122 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

neInde Yes string 0 to - Device index. "519491659"


x 256
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 238


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/topo/deviceext/519491659 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK
DeviceEntityDto parameters, For details, see Table 1-106.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ne-index" : "CE39",
"ne-role" : "Spine",
"sysname" : "CE39",
"location" : "Nanjing",
"mgnt-ipv4" : "10.1.3.4/24",
"mgnt-ipv6" : "fc00::/7",
"vtep-ipv4" : "10.1.3.4",
"vtep-ipv6" : "fc00::/7",
"ztp-level" : 2,
"is-isolate" : false,
"esn" : "1234567890QWERTYUIOP",
"stack" : "Stack One",
"loopback1-ipv4" : "10.1.3.4/24",
"loopbackX-ipv6" : "fc00::/7",
"status" : "NORMAL",
"identifier" : 2,
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 239


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.9 Query Extended Layer 2 Link Information

Typical Scenarios
Layer 2 links need to be queried.

Functions
Query Layer 2 link information by link ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/topo/l2linkext/{l2LinkId}

Table 1-123 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l2LinkI Yes string 0 to - Layer 2 link ID. "132165"


d 256
charac
ters.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 240


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/topo/l2linkext/132165 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK
L2LinkEntityDto parameters, For details, see Table 1-108.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"l2-link-id" : "fc00::/7",
"ne-index-a" : "CEA",
"port-index-a" : "10GE1/0/1",
"eth-trunk-no-a" : "Eth-Trunk0",
"ne-index-b" : "CEB",
"port-index-b" : "10GE1/0/1",
"eth-trunk-no-b" : "Eth-Trunk0",
"status" : "NORMAL",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 241


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.4.10 Query Extended Layer 3 Link Information

Typical Scenarios
Layer 3 links need to be queried.

Functions
Query Layer 3 link information by link ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/topo/l3linkext/{l3LinkId}

Table 1-124 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l3LinkI Yes string 0 to - Layer 3 link ID. "43129859"


d 256
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/topo/l3linkext/43129859 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 242


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: OK
L3LinkEntityDto parameters, For details, see Table 1-110.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"l3-link-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ne-index-a" : "CEA",
"if-a" : "Vlanif1000",
"ne-a-conn-ipv4" : "10.1.3.4/30",
"ne-a-conn-ipv6" : "FE80::/10",
"ne-index-b" : "CEB",
"if-b" : "Vlanif1000",
"ne-b-conn-ipv4" : "10.2.3.4/30",
"ne-b-conn-ipv6" : "FE80::/10",
"extend" : [
{
"key-name" : "abcd",
"value" : "abcd"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 243


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.2.4.11 Clear Topology Information by Region ID

Typical Scenarios
Topology information needs to be cleared by region ID.

Functions
Clear topology information by region ID.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/sdn/acdcn/v3/underlay/ztp/topo/topoinfo

Table 1-125 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regioni Yes string 1 to 36 - Region ID. "321553"


d charac
ters.

type Yes string 1 to 16 - Type. "INBAND"


charac
ters.

Request Parameters
N/A

Sample Request
HTTP
DELETE /sdn/acdcn/v3/underlay/ztp/topo/topoinfo?regionid=321553&type=INBAND HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 244


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.5 Task

1.9.2.5.1 Start ZTP Tasks

Typical Scenarios
Start ZTP Tasks.

Functions
Start ZTP tasks based on the region ID and device ID list.

Constraints
User role: northbound operator.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 245


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/sdn/acdcn/v3/underlay/ztp/ztpmgnt/operation

Request Parameters

Table 1-126 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-127. starting ZTP
tasks.

Table 1-127 StartZtpTaskDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI No string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

deviceI No array< - - Device ID list. -


dList string>

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/ztpmgnt/operation HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIdList" : [
"CE39"
]
}

Response Parameters
Response status code 200: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 246


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-128 StartZtpOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.5.2 Stop ZTP Tasks by Region ID

Typical Scenarios
ZTP tasks need to be stopped by region ID.

Functions
Stop ZTP tasks by region ID.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/sdn/acdcn/v3/underlay/ztp/ztpmgnt/operation

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 247


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-129 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-130. stopping ZTP
tasks.

Table 1-130 StopZtpTaskDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Sample Request
HTTP
DELETE /sdn/acdcn/v3/underlay/ztp/ztpmgnt/operation HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}

Response Parameters
Response status code 200: OK

Table 1-131 StopTaskDto parameters


Param Type Value Range Defaul Description Example
eter t Value

regionI string 1 to 36 - Region ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 248


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

taskId string 1 to 64 - Task ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"taskId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}

1.9.2.5.3 Update Device Ports

Typical Scenarios
The port of a managed device needs to be changed.

Functions
Update the device port based on the device ID and re-collect the port information.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/hostexpan/refreshport

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 249


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-132 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Device ID. -


ENCE Table 1-133.

Table 1-133 RefreshDevicePortDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 1 to 38 - Device ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/hostexpan/refreshport HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}

Response Parameters
Response status code 200: OK

Table 1-134 RefreshPortOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 250


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.5.4 Query ZTP Tasks

Typical Scenarios
ZTP tasks need to be queried.

Functions
Query ZTP tasks based on the pagination information, device information, and
region ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/taskManagement/query

Table 1-135 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

limit Yes int32 [0-214 0 Maximum 10


74836 number of
47] records on a
page.

offset Yes int32 [0-214 0 Start location. 100


74836
47]

deviceI Yes string 0 to 64 - Device "dhc"


nfo charac information.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 251


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regionI Yes string 0 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/taskManagement/query?
limit=10&offset=100&deviceInfo=dhc&regionId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Table 1-136 DeviceTaskListDto parameters


Param Type Value Range Defaul Description Example
eter t Value

pageIn int32 [0-2147483647 0 Page index. 1


dex ]

pageSi int32 [0-2147483647 0 Page size. 10


ze ]

totalRe int32 [0-2147483647 0 Total number 100


cords ] of records.

data ARRAY For details, see Table List of online -


_REFER 1-137. devices.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 252


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-137 DeviceTaskDto parameters


Param Type Value Range Defaul Description Example
eter t Value

taskId string 0 to 64 - Task ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

regionI string 0 to 36 - Region ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

region string 0 to 32 - Region name. "Region One"


Name characters.

deviceI string 0 to 64 - Device index. "CE39"


ndex characters.

device string 0 to 255 - Device name. "CE39"


Name characters.

manag string 0 to 18 - Management "10.0.0.0/24"


ementI characters. IP address.
p

status string 0 to 64 - Device status "PROCESS"


characters.

progre int32 [0-2147483647 0 Task progress 100


ss ]

inform string 0 to 256 - Task "START:


ation characters. information 2018/04/23
15:42:42"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 253


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"pageIndex" : 1,
"pageSize" : 10,
"totalRecords" : 100,
"data" : [
{
"taskId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionName" : "Region One",
"deviceIndex" : "CE39",
"deviceName" : "CE39",
"managementIp" : "10.0.0.0/24",
"status" : "PROCESS",
"progress" : 100,
"information" : "START:2018/04/23 15:42:42"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.5.5 Query the Information About ZTP Tasks in All Regions

Typical Scenarios
ZTP tasks need to be queried on Day 0.

Functions
Query ZTP tasks based on the pagination information, device information, and
region ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/taskManagement/queryall

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 254


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-138 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

limit Yes int32 [0-214 0 Start location. 10


74836
47]

offset Yes int32 [0-214 0 Maximum 100


74836 number of
47] records on a
page.

taskInf Yes string 0 to 64 - Task "dhc"


o charac information
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/taskManagement/queryall?limit=10&offset=100&taskInfo=dhc HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Table 1-139 regionTaskListDto parameters


Param Type Value Range Defaul Description Example
eter t Value

pageIn int32 [0-2147483647 0 Page index. 1


dex ]

pageSi int32 [0-2147483647 0 Page size. 10


ze ]

totalRe int32 [0-2147483647 0 Total number 100


cords ] of records.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 255


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

data ARRAY For details, see Table Data list. -


_REFER 1-140.
ENCE

Table 1-140 regionTaskDto parameters


Param Type Value Range Defaul Description Example
eter t Value

taskId string 0 to 64 - Task ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

taskNa string 0 to 128 - Task name. "snapShot1"


me characters.

regionI string 0 to 36 - Region ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

region string 0 to 32 - Region name. "Region One"


Name characters.

operati string - - Operation "OPENING"


onType mode.

operati string - - Operation -


onTim time.
e

taskSt string 0 to 64 - Task status. "PROCESS"


atus characters.

progre int32 [0-2147483647 0 Task progress 100


ss ]

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"pageIndex" : 1,
"pageSize" : 10,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 256


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"totalRecords" : 100,
"data" : [
{
"taskId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"taskName" : "snapShot1",
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"regionName" : "Region One",
"operationType" : "OPENING",
"taskStatus" : "PROCESS",
"progress" : 100
}
]
}

1.9.2.5.6 Query Syslog Information About ZTP Devices

Typical Scenarios
Syslog information needs to be queried when a device goes online on Day 0.

Functions
Query device syslog information based on the page information, device
information, log level, and task ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/sdn/acdcn/v3/underlay/ztp/taskManagement/syslog

Table 1-141 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi Yes int32 [0-214 0 Page size. 20


ze 74836
47]

pageIn Yes int32 [1-214 0 Page index. 1


dex 74836
47]

taskId Yes string 0 to 64 - Task ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000000"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 257


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device Yes string 0 to Device name. "DTS"


Name 255 Either this
charac parameter or
ters. the device IP
address must
be set.

deviceI Yes string - Device IP "192.168.0.0"


p address. Either
this parameter
or the device
name must be
set.

logLev Yes string ● Info Inform Log level. "Informational"


el rma ational
tion
al
● War
nin
g
● Erro
r

precise Yes boolea - false Whether to true


n perform exact
match.

Request Parameters
N/A

Sample Request
HTTP
GET /sdn/acdcn/v3/underlay/ztp/taskManagement/syslog?
pageSize=20&pageIndex=1&taskId=00000000-0000-0000-0000-000000000000&deviceName=DTS&deviceIp=
192.168.0.0&logLevel=Informational&precise=true HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 258


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-142 DeviceSyslogDto parameters


Param Type Value Range Defaul Description Example
eter t Value

sysNa string 0 to 64 - Device name. "Spine"


me characters.

esn string 0 to 128 - Device ESN. ""


characters.

mac string 0 to 36 - Device MAC "DBB702C3-77


characters. address. 19-4FE6-
A5AD-3A9C9E2
65309"

manag string 0 to 32 - Device ""


eIp characters. management
IP address.

logLev string ● Informationa - Log level. "Informational"


el l
● Warning
● Error

logInfo string - - Log -


information.

current string 0 to 64 - Time. "PROCESS"


Timest characters.
amp

taskId string - 0 Task ID. "100"

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"sysName" : "Spine",
"esn" : "",
"mac" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"manageIp" : "",
"logLevel" : "Informational",
"currentTimestamp" : "PROCESS",
"taskId" : "100"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 259


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.2.5.7 Isolate Devices

Typical Scenarios
Devices need to be isolated.

Functions
Isolate devices based on device indexes, task IDs, and region IDs.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/sdn/acdcn/v3/underlay/ztp/devicemgnt/isolation

Request Parameters

Table 1-143 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Device -


ENCE Table 1-144. isolation
parameters.

Table 1-144 DeviceIsolateDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ne- Yes string 1 to 64 - Device index. "CE39"


index charac
ters.

region- Yes string 1 to 36 - Region ID. "DBB702C3-77


id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

isIsolat Yes boolea - - Whether to true


e n perform
isolation.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 260


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /sdn/acdcn/v3/underlay/ztp/devicemgnt/isolation HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"ne-index" : "CE39",
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"isIsolate" : true
}

Response Parameters
Response status code 200: OK

Table 1-145 DeviceIsolateOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 261


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.5.8 Replace Devices

Typical Scenarios
Devices need to be replaced.

Functions
Replace devices based on device indexes, task IDs, and region IDs.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/sdn/acdcn/v3/underlay/ztp/devicemgnt/replace

Request Parameters

Table 1-146 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Device -


ENCE Table 1-147. replacement
parameters.

Table 1-147 DeviceReplaceDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ne- Yes string 1 to 64 - Device index. "CE39"


index charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 262


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

region- Yes string 1 to 36 - Region ID. "DBB702C3-77


id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

esn No string 20 - ESN. "1234567890Q


charac WERTYUIOP"
ters.

Sample Request
HTTP
PUT /sdn/acdcn/v3/underlay/ztp/devicemgnt/replace HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"ne-index" : "CE39",
"region-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"esn" : "1234567890QWERTYUIOP"
}

Response Parameters
Response status code 200: OK

Table 1-148 DeviceReplaceOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 263


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.5.9 Reset Devices

Typical Scenarios
Devices need to be reset.

Functions
Reset devices by device index.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/sdn/acdcn/v3/underlay/ztp/devicemgnt/reset

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 264


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-149 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Device reset -


ENCE Table 1-150. parameters.

Table 1-150 DeviceResetDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

neInde No array< - - Device ID list. -


xList string>

Sample Request
HTTP
PUT /sdn/acdcn/v3/underlay/ztp/devicemgnt/reset HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"neIndexList" : [
"CE39"
]
}

Response Parameters
Response status code 200: OK

Table 1-151 DeviceResetOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

errMes string - - Error message. -


sage

errCod string - - Error message. -


e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 265


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.6 ZTP Underlay Topology Management


ZTP underlay topology management APIs used to:

1. Export topology comparison information.

2. Query topology comparison information in pagination mode.

1.9.2.6.1 Export Topology Comparison Information

Typical Scenarios
Topology comparison information needs to be exported.

Functions
Export topology comparison information based on the status.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 266


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/underlayTopo/exportTopoInfo

Request Parameters

Table 1-152 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-153. exporting
topology
comparison
information.

Table 1-153 ExportTopoInfoDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

regionI Yes string 1 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

status No string ● All - Status. "All"


● INIT
IAL
● NO
RM
AL
● AB
NO
RM
AL

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/underlayTopo/exportTopoInfo HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 267


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"status" : "All"
}

Response Parameters
Response status code 200: OK

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.2.6.2 Query Topology Comparison Information

Typical Scenarios
Topology comparison information needs to be queried.

Functions
Query topology comparison information based on certain conditions.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 268


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/sdn/acdcn/v3/underlay/ztp/underlayTopo/queryTopoByPage

Request Parameters

Table 1-154 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-155. querying
topology
comparison
information.

Table 1-155 QueryCompareTopoDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

regionI Yes string 0 to 36 - Region ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

taskId No string 0 to 64 - Task ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

status No string ● All - Status. "All"


● INIT
IAL
● NO
RM
AL
● AB
NO
RM
AL

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 269


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn Yes int32 [0-214 0 Page index. 1


dex 74836
47]

pageSi Yes int32 [0-214 0 Page size. 10


ze 74836
47]

keywor No string 0 to - Keyword. "CE"


d 256
charac
ters.

Sample Request
HTTP
POST /sdn/acdcn/v3/underlay/ztp/underlayTopo/queryTopoByPage HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"regionId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"taskId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"status" : "All",
"pageIndex" : 1,
"pageSize" : 10,
"keyword" : "CE"
}

Response Parameters
Response status code 200: OK

Table 1-156 CompareTopoInfoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

compa ARRAY For details, see Table Topology -


reTopo _REFER 1-157. comparison
Info ENCE information.

countIt int32 [0-2147483647 0 Quantity. 10


eam ]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 270


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-157 CompareTopoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

linkId string 0 to 64 - Link ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

localD string 0 to 64 - Local device. "CE39"


evice characters.

localD string 0 to 64 - Local device "CE39"


eviceIn characters. index.
dex

localM string 0 to 18 - Management "10.0.0.0/24"


gntIpv characters. IPv4 address of
4 the local
device.

localPo string 0 to 64 - Local port. "10GE1/0/1"


rt characters.

desPla string 0 to 64 - Planned "CE39"


nDevic characters. remote device.
e

desPla string 0 to 64 - Planned "CE39"


nDevic characters. remote device
eIndex index.

desPla string 0 to 64 - Planned "10GE1/0/1"


nPort characters. remote port.

desAct string 0 to 64 - Actual remote "CE39"


ualDev characters. device.
ice

desAct string 0 to 64 - Actual remote "CE39"


ualDev characters. device index.
iceInde
x

desAct string 0 to 64 - Actual remote "10GE1/0/1"


ualPort characters. port.

status string ● INITIAL - Link "INITIAL"


● NORMAL comparison
result: INITIAL,
● ABNORMAL NORMAL, and
ABNORMAL.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 271


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: OK
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"compareTopoInfo" : [
{
"linkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"localDevice" : "CE39",
"localDeviceIndex" : "CE39",
"localMgntIpv4" : "10.0.0.0/24",
"localPort" : "10GE1/0/1",
"desPlanDevice" : "CE39",
"desPlanDeviceIndex" : "CE39",
"desPlanPort" : "10GE1/0/1",
"desActualDevice" : "CE39",
"desActualDeviceIndex" : "CE39",
"desActualPort" : "10GE1/0/1",
"status" : "INITIAL"
}
],
"countIteam" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3 Physical Network

1.9.3.1 Physical Topology


# Description of the northbound API implementation of the physical topology:
1. Query the DCN physical topology.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 272


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

2. Query various resource pools and resource pool topologies of the DC network.

1.9.3.1.1 Query Device Groups

Typical Scenarios
Device groups need to be queried.

Functions
Query device groups by pool ID or device group ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/acdcn/v3/topoapi/dcntopo/devicegroup

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 273


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-158 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

poolId No string 36 - ID of the "DBB702C3-77


charac connection 19-4FE6-
ters. pool. Either A5AD-3A9C9E2
The this parameter 65309"
value or device group
must ID can be set.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 274


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 36 - Device group "DBB702C3-77


charac ID. Either this 19-4FE6-
ters. parameter or A5AD-3A9C9E2
The poolId can be 65309"
value set.
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

pageSi No string 1 to - Page size. "1"


ze 255
charac
ters.

pageIn No string 1 to - Page index. "1"


dex 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /acdcn/v3/topoapi/dcntopo/devicegroup?poolId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&id=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&pageSize=1&pageIndex=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 275


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-159 DeviceGroupsWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

device ARRAY For details, see Table Device group -


Groups _REFER 1-160. information.
ENCE

pageIn int64 [1-2147483647 - Page index. 1


dex ]

pageSi int64 [1-2147483647 - Page size. 1


ze ]

totalN int64 [1-2147483647 - Number of 1


um ] returned data
records.

Table 1-160 DeviceGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

poolId string 36 characters. - Resource pool "DBB702C3-77


The value must to which a 19-4FE6-
meet the device group A5AD-3A9C9E2
following belongs. 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 276


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

id string 36 characters. - Device group "DBB702C3-77


The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Device group "10"


characters. name.

type string 1 to 255 - Device group "10"


characters. type. The
options are as
follows: 0:
Single 1: Active
2: StandBy 3:
Mirror

descrip string 0 to 255 - Device group "10"


tion characters. description.

device array< Each item has 1 - Device IDs in a -


string> to 36 device group.
characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"deviceGroups" : [
{
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 277


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"type" : "10",
"description" : "10"
}
],
"pageIndex" : 1,
"pageSize" : 1,
"totalNum" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.2 Query Devices

Typical Scenarios
Devices need to be queried.

Functions
Query devices by pool ID or device ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/acdcn/v3/topoapi/dcntopo/device

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 278


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-161 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

poolId No string 36 - ID of the "DBB702C3-77


charac connection 19-4FE6-
ters. pool. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 279


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 36 - Device ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

pageSi No string 1 to - Page size. "1"


ze 255
charac
ters.

pageIn No string 1 to - Page index. "1"


dex 255
charac
ters.

mac No string 1 to - MAC address "H-H-H-H-H-


255 of a device. H"
charac
ters.

ip No string 1 to - Management "172.16.1.1"


255 IP address of a
charac device.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 280


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No string 1 to - Device type. "VSWITCH"


Type 128 The value can
charac be VSWITCH,
ters. VDHCP,
SWITCH, EDGE,
or HOST.

Request Parameters
N/A

Sample Request
HTTP
GET /acdcn/v3/topoapi/dcntopo/device?poolId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&id=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&pageSize=1&pageIndex=1&mac=H-
H-H-H-H-H&ip=172.16.1.1&deviceType=VSWITCH HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-162 DevicesWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

devices ARRAY For details, see Table Device list -


_REFER 1-163. return result.
ENCE

pageIn int64 [1-2147483647 - Page index. 1


dex ]

pageSi int64 [1-2147483647 - Page size. 1


ze ]

totalN int64 [1-2147483647 - Number of 1


um ] returned data
records.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 281


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-163 DeviceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Device ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Device name. "device1"


characters.

locatio string 0 to 255 - Device "nanjing"


n characters. location.

ip string 1 to 255 - Management "10.0.0.0"


characters. IP address of a
device.

status int32 [0-1] 1 Online/offline 1


status of a
device, which
can be 0
Online, 1
Offline, or 2
Subhealthy.

type string 1 to 255 - Device type, for "10"


characters. example,
switch, firewall,
or LB.

mac string 1 to 255 - MAC address "H-H-H-H-H-


characters. of a device. H"

mode string 1 to 255 - Device model. "CE6850"


characters.

vtepIp string 1 to 255 - NVE IP address. "192.168.1.2"


characters.

stack boolea - false Whether a -


n device is a
stack device or
not.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 282


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

memb REFER For details, see Table Device -


ers ENCE 1-164. member.

poolId string 36 characters. - Resource pool "DBB702C3-77


The value must to which a 19-4FE6-
meet the device belongs. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

softWa string 1 to 36 - Software "V100R020C10


re characters. version. "

cpuRat int32 [0-256] - CPU rate. 1


e

Table 1-164 DeviceMemDto parameters


Param Type Value Range Defaul Description Example
eter t Value

type string 1 to 255 - Stack type. The "CSS"


characters. options are as
follows: 1: SVF
2: CSS 3: iStack
4: NONE

mastse string 1 to 255 - MAC address "H-H-H-H-H-


r characters. of a master H"
device.

standb string 1 to 255 - MAC address "H-H-H-H-H-


y characters. of a standby H"
device.

leaf array< 1-255 items. - MAC address -


string> of a leaf
device.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 283


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Content-Type: application/json
{
"devices": [
{
"id": "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name": "device1",
"location": "nanjing",
"ip": "10.0.0.0",
"status": 0,
"type": "10",
"mac": "H-H-H-H-H-H",
"mode": "CE6850",
"vtepIp": "192.168.1.2",
"stack": false,
"members": {
"type": "CSS",
"mastser": "H-H-H-H-H-H",
"standby": "H-H-H-H-H-H",
"leaf": [
"leaf"
]
},
"poolId": "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"softWare": "string"
}
],
"pageIndex": 1,
"pageSize": 1,
"totalNum": 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.3 Query Host Links

Typical Scenarios
Host links need to be queried.

Functions
Query host links by link ID, switch ID, or vSwitch ID.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 284


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/acdcn/v3/topoapi/dcntopo/getHostlinks

Request Parameters

Table 1-165 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

torHos No REFER For details, see Input -


tDto ENCE Table 1-166. parameter
model class.

Table 1-166 TorHostDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

linkIdLi No array< 1-36 - Link ID list. -


st string> items.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 285


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

switchI No string 36 - ID of the TOR "DBB702C3-77


d charac switch at the 19-4FE6-
ters. peer end of the A5AD-3A9C9E2
The host. 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 286


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vSwitc No string 36 - ID of the TOR "DBB702C3-77


hId charac switch 19-4FE6-
ters. connected to A5AD-3A9C9E2
The the host. 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

device No string 1 to 36 - Device type. "VSWITCH"


Type charac
ters.

pageSi No string 1 to - Page size. "1"


ze 255
charac
ters.

pageIn No string [1-255 - Page index. "1"


dex ]

Sample Request
HTTP
POST /acdcn/v3/topoapi/dcntopo/getHostlinks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 287


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"switchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceType" : "VSWITCH",
"pageSize" : "1",
"pageIndex" : "1"
}

Response Parameters
Response status code 200: successfully

Table 1-167 TorHostLinkWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

linkList ARRAY For details, see Table Link -


_REFER 1-168. information.
ENCE

pageIn int64 [1-2147483647 - Page index. 1


dex ]

pageSi int64 [1-2147483647 - Page size. 1


ze ]

totalN int64 [1-2147483647 - Number of 1


um ] returned data
records.

Table 1-168 LinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

linkId string 36 characters. - Host link ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 288


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

hostId string 36 characters. - Host ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

hostNa string 1 to 255 - Host name. "10"


me characters.

hostM string 1 to 255 - MAC address "10"


ac characters. of the host
port.

switchI string 36 characters. - Switch ID. "DBB702C3-77


d The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

switch string 36 characters. - Switch port ID. "DBB702C3-77


PortId The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

switch string 1 to 255 - Switch port "10"


PortNa characters. name.
me

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 289


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

trunkN string 1 to 36 - Eth-Trunk "10"


ame characters. attributes of
links on a
switch.

switchI string 1 to 36 - Switch IP "10.0.0.0"


p characters. address.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Content-Type: application/json
{
"linkList": [
{
"linkId": "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"hostId": "DBB702C3-7719-4FE6-A5AD-1A9C9E265309",
"hostName": "server1",
"hostMac": "10",
"switchId": "DBB702C3-7719-4FE6-A5AD-3A9C9E265319",
"switchPortId": "DBB702C3-7719-1FE6-A5AD-3A9C9E265309",
"switchPortName": "10",
"trunkName": "trunkName",
"switchIp": "10.0.0.0"
}
],
"pageIndex": 1,
"pageSize": 1,
"totalNum": 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.4 Query Hosts

Typical Scenarios
Hosts need to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 290


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query hosts by host ID list.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/topoapi/dcntopo/getHosts

Request Parameters

Table 1-169 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

hostIds No REFER For details, see Input -


Dto ENCE Table 1-170. parameter
model class.

Table 1-170 HostIdsDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

hostId No array< 1-36 - Host ID list. -


List string> items.

pageSi No string 1 to - Page size. "1"


ze 255
charac
ters.

pageIn No string [1-255 - Page index. "1"


dex ]

Sample Request
HTTP
POST /acdcn/v3/topoapi/dcntopo/getHosts HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 291


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"pageSize" : "1",
"pageIndex" : "1"
}

Response Parameters
Response status code 200: successfully

Table 1-171 HostWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

hostLis ARRAY For details, see Table Host list. -


t _REFER 1-172.
ENCE

pageIn int64 [1-2147483647 - Page index. 1


dex ]

pageSi int64 [1-2147483647 - Page size. 1


ze ]

totalN int64 [1-2147483647 - Number of 1


um ] returned data
records.

Table 1-172 HostDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 36 characters. - Host name. "DBB702C3-77


d The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

hostNa string 1 to 255 - Host ID. "server1"


me characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 292


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"hostList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"hostName" : "server1"
}
],
"pageIndex" : 1,
"pageSize" : 1,
"totalNum" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.5 Query Device Links

Typical Scenarios
Device links need to be queried.

Functions
Query device links based on localDeviceId and peerDeviceId.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/topoapi/dcntopo/getLinks

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 293


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-173 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

linksDt No REFER For details, see Input -


o ENCE Table 1-174. parameter
model class.

Table 1-174 LinksDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

localD No string 36 - Source device "DBB702C3-77


eviceId charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 294


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peerDe No string 36 - Destination "DBB702C3-77


viceId charac device. 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

pageSi No string 1 to - Page size. "1"


ze 255
charac
ters.

pageIn No string [1-255 - Page index. "1"


dex ]

Sample Request
HTTP
POST /acdcn/v3/topoapi/dcntopo/getLinks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"localDeviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"peerDeviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"pageSize" : "1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 295


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"pageIndex" : "1"
}

Response Parameters
Response status code 200: successfully

Table 1-175 LinksWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

links ARRAY For details, see Table Link -


_REFER 1-176. information.
ENCE

pageIn int64 [1-2147483647 - Page index. 1


dex ]

pageSi int64 [1-2147483647 - Page size. 1


ze ]

totalN int64 [1-2147483647 - Number of 1


um ] returned data
records.

Table 1-176 LinkInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

trunk boolea - - Whether a link true


n is a trunk link.

status int32 [0-1] - Link status, 1


which can be 0
(DOWN) or 1
(UP).

mode int32 [1-4] - Link type. The 1


options are as
follows: 1:
Internal link 2:
External link 3:
Internal and
external link 4:
Common link

localN REFER For details, see Table Link node -


ode ENCE 1-177. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 296


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peerN REFER For details, see Table Link node -


ode ENCE 1-177. information.

trunk ARRAY For details, see Table Trunk member. -


Mems _REFER 1-178.
ENCE

Table 1-177 LinkNode parameters


Param Type Value Range Defaul Description Example
eter t Value

poolId string 36 characters. - ID of the "DBB702C3-77


The value must resource pool 19-4FE6-
meet the to which the A5AD-3A9C9E2
following device belongs. 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

deviceI string 1 to 255 - Management "192.168.1.1"


p characters. IP address of a
device.

deviceI string 36 characters. - ID of a device. "DBB702C3-77


d The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

device string 1 to 255 - Device name. "CE6883_125.6.


Name characters. 123.37"

port string 1 to 255 - Port name. "gig3/0/1"


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 297


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-178 TrunkMemDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Trunk link ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

localPo string 1 to 255 - Name of the "gig3/0/0"


rt characters. local port, that
is, the port on
the local node.

peerPo string 1 to 255 - Name of the "gig3/0/1"


rt characters. peer port, that
is, the port on
the peer node.

linkMo int32 [1-255] - Sub-link type. 10


de The options are
as follows: 1:
Internal link 2:
External link 3:
Internal and
external links
4: Common
link

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 298


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"links" : [
{
"trunk" : true,
"status" : 1,
"mode" : 1,
"localNode" : {
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE6883_125.6.123.37",
"port" : "gig3/0/1"
},
"peerNode" : {
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE6883_125.6.123.37",
"port" : "gig3/0/1"
},
"trunkMems" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"localPort" : "gig3/0/0",
"peerPort" : "gig3/0/1",
"linkMode" : 10
}
]
}
],
"pageIndex" : 1,
"pageSize" : 1,
"totalNum" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.6 Query All Ports

Typical Scenarios
Ports need to be queried.

Functions
Query the port list based on deviceIdList.

Constraints
User role: northbound operator.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 299


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/acdcn/v3/topoapi/dcntopo/getPorts

Request Parameters

Table 1-179 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI Yes REFER For details, see Input -


dDto ENCE Table 1-180. parameter
model class.

Table 1-180 DeviceIdsDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No array< 1-36 - Device ID. -


dList string> items.

portLis No ARRAY For details, see Port -


t _REFER Table 1-181. information
ENCE list.

pageSi No string 1 to - Page size. "1"


ze 255
charac
ters.

pageIn No string [1-255 - Page index. "1"


dex ]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 300


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-181 portListDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 36 - Device ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

ifNam No string 1 to - Port name of a "Eth-trunk1"


e 255 device.
charac
ters.

Sample Request
HTTP
POST /acdcn/v3/topoapi/dcntopo/getPorts HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"deviceIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"portList" : [
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 301


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ifName" : "Eth-trunk1"
}
],
"pageSize" : "1",
"pageIndex" : "1"
}

Response Parameters
Response status code 200: successfully

Table 1-182 DevicePortWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

device ARRAY For details, see Table Port -


PortLis _REFER 1-183. information
t ENCE list.

pageIn int64 [1-2147483647 - Page index. 1


dex ]

pageSi int64 [1-2147483647 - Page size. 1


ze ]

totalN int64 [1-2147483647 - Total number 1


um ] of records.

Table 1-183 DevicePortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 36 characters. - Physical device "DBB702C3-77


d The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 302


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

portLis ARRAY For details, see Table Port list, which -


t _REFER 1-184. supports
ENCE physical ports,
trunk
interfaces, and
Layer 2 sub-
interfaces.

Table 1-184 PortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

portId string 36 characters. - Port ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

portNa string 1 to 255 - Port name. "10GE1/0/2"


me characters.

portSt string 1 to 255 - Port status, "UP"


atus characters. which can be
UP or DOWN.

ethTru string 1 to 255 - Name of the "Eth-Trunk11"


nkNa characters. Eth-Trunk
me interface to
which the port
belongs.

portM string 1 to 255 - MAC address "H-H-H-H-H-


ac characters. of a port. H"

portSp string 1 to 255 - Port speed. "1"


eed characters.

portIp string 1 to 255 - Port IP address. "192.168.0.0"


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 303


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

portTy string 1 to 255 - Port type. "IFMIPHYTYPE


pe characters. ETHTRUNK"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"devicePortList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portList" : [
{
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/2",
"portStatus" : "UP",
"ethTrunkName" : "Eth-Trunk11",
"portMac" : "H-H-H-H-H-H",
"portSpeed" : "1",
"portIp" : "192.168.0.0",
"portType" : "IFMIPHYTYPEETHTRUNK"
}
]
}
],
"pageIndex" : 1,
"pageSize" : 1,
"totalNum" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.7 Query Topologies in a Resource Pool

Typical Scenarios
Topologies in a resource pool need to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 304


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query the topologies in a resource pool by pool ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/acdcn/v3/topoapi/dcntopo/pool/{poolId}

Table 1-185 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

poolId Yes string 36 - ID of the "DBB702C3-77


charac resource pool 19-4FE6-
ters. to which a A5AD-3A9C9E2
The device group 65309"
value belongs.
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 305


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /acdcn/v3/topoapi/dcntopo/pool/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-186 PoolViewWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Device group -


Groups _REFER 1-160. list.
ENCE

devices ARRAY For details, see Table Device -


_REFER 1-163. information
ENCE list.

links ARRAY For details, see Table Information -


_REFER 1-176. about links
ENCE between
devices.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"deviceGroups" : [
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 306


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"type" : "10",
"description" : "10"
}
],
"devices" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "device1",
"location" : "nanjing",
"ip" : "10.0.0.0",
"status" : 1,
"type" : "10",
"mac" : "H-H-H-H-H-H",
"mode" : "CE6850",
"vtepIp" : "192.168.1.2",
"members" : {
"type" : "CSS",
"mastser" : "H-H-H-H-H-H",
"standby" : "H-H-H-H-H-H"
},
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"softWare" : "V100R020C10",
"cpuRate" : 1
}
],
"links" : [
{
"trunk" : true,
"status" : 1,
"mode" : 1,
"localNode" : {
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE6883_125.6.123.37",
"port" : "gig3/0/1"
},
"peerNode" : {
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE6883_125.6.123.37",
"port" : "gig3/0/1"
},
"trunkMems" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"localPort" : "gig3/0/0",
"peerPort" : "gig3/0/1",
"linkMode" : 10
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 307


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.3.1.8 Query the DCN Network Topology

Typical Scenarios
The DCN topology needs to be queried.

Functions
Query the DCN network topology, including the fabric resource pools and VAS
resource pools.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/acdcn/v3/topoapi/dcntopo/resourcepool

Request Parameters
N/A

Sample Request
HTTP
GET /acdcn/v3/topoapi/dcntopo/resourcepool HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-187 DomainViewWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

pools ARRAY For details, see Table Resource pool -


_REFER 1-188. information
ENCE list.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 308


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

links ARRAY For details, see Table Connection -


_REFER 1-189. relationships
ENCE between
resource pools.

Table 1-188 PoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Resource pool "DBB702C3-77


The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Resource pool "fabric1"


characters. name.

type int32 [0-1] - Resource pool 1


type. The
options are as
follows: 1:
Fabric resource
pool 2: VAS
resource pool

vastyp string 0 to 255 - VAS resource "Firewall"


e characters. pool type.

descrip string 1 to 255 - Resource pool "this is fabric in


tion characters. description. beijing"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 309


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-189 PoolLinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

localPo string 36 characters. - ID of the local "DBB702C3-77


olId The value must resource pool. 19-4FE6-
meet the Generally, it is A5AD-3A9C9E2
following the ID of the 65309"
regular fabric resource
expression: pool.
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

peerPo string 36 characters. - ID of the peer "DBB702C3-77


olId The value must resource pool. 19-4FE6-
meet the Generally, it is A5AD-3A9C9E2
following the ID of the 65309"
regular VAS resource
expression: pool.
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"pools" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "fabric1",
"type" : 1,
"vastype" : "Firewall",
"description" : "this is fabric in beijing"
}
],
"links" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 310


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"localPoolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"peerPoolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.9 Bypass Link Compatibility Configuration for Upgrade

Typical Scenarios
The number of services referenced by the bypass link need to be counted during
the upgrade from Agile Controller-DCN C00 to a later version.

Functions
Configure the bypass link to make it compatible with the version after the
upgrade.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/topoapi/dcntopo/upgrade/escape/links

Request Parameters
N/A

Sample Request
HTTP
POST /acdcn/v3/topoapi/dcntopo/upgrade/escape/links HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 311


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

Table 1-190 ErrorInfo parameters

Param Type Value Range Defaul Description Example


eter t Value

errCod string 1 to 128 - error code "13107201"


e characters.

errPara array< Each item has 1 - error paras -


s string> to 128
characters.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"errCode" : "13107201",
"errParas" : [
"13af679b-b8f4-3744-9aaa-d588b957c999"
]
}

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.1.10 Query the Bypass Link

Typical Scenarios
This API needs to be invoked to query the bypass link of a device.

Functions
Query the bypass link of a device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 312


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/acdcn/v3/topoapi/dcntopo/deviceEscapeLinks

Table 1-191 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device No string - - Device group -


GroupI ID.
d

Request Parameters
N/A

Sample Request
HTTP
GET /acdcn/v3/topoapi/dcntopo/deviceEscapeLinks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-192 EscapeLinksResponse parameters


Param Type Value Range Defaul Description Example
eter t Value

result ARRAY For details, see Table Bypass link -


_REFER 1-193. information.
ENCE

device string - - deviceGroupId. -


GroupI
d

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 313


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-193 EscapeLinksInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

leftPor string - - leftPortName. -


tName

leftDev string - - leftDeviceId. -


iceId

leftDev string - - leftDeviceNam -


iceNa e.
me

leftPor string - - leftPortId. -


tId

leftEth string - - leftEthTrunkNa -


Trunk me.
Name

rightD string - - rightDeviceId. -


eviceId

rightD string - - rightDeviceNa -


eviceN me.
ame

rightPo string - - rightPortId. -


rtId

rightPo string - - rightPortName. -


rtNam
e

rightEt string - - rightEthTrunkN -


hTrunk ame.
Name

refFlag boolea - - refFlag. -


n

linkTyp int32 - - linkType. -


e

Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 314


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2 Fabric
API description:
1. Query the fabric pool list.

1.9.3.2.1 Create a Fabric

Typical Scenarios
A fabric needs to be created.

Functions
Create a fabric.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics

Request Parameters

Table 1-194 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Fabric -


NCE 1-195. pool
configurat
ion.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 315


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-195 FabricListRestfulDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

fabric Yes ARRAY 0-1000 items. Fabric -


_REFER For details, see information.
ENCE Table 1-196.

totalN No string - - Number of "1"


um queried fabrics.

Table 1-196 FabricDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Fabric ID. "dbb702c3-771


256 9-4fe6-
charac a5ad-3a9c9e26
ters. 5309"

name Yes string 1 to - Fabric name. "Fabric"


128
charac
ters.

descrip No string 0 to - Fabric "description"


tion 255 description.
charac
ters.

networ Yes string 1 to - Fabric VXLAN "Distributed"


kType 128 type. The value
charac is Distributed
ters. or Centralized.

physic Yes string 1 to Vxlan Fabric "Vxlan"


alNetw 128 networking
orkMo charac type. Only
de ters. VXLAN is
supported.

bgpEv No boolea - true Whether BGP true


pnEna n EVPN is
ble enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 316


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extInte No string 1 to Vbdif Outbound "Vbdif"


rfaceTy 128 interface type.
pe charac The interface
ters. can be VBDIF
or VLANIF
interface.

arpBro No boolea - false Whether to false


adcast n enable ARP
Suppre broadcast
ssion suppression.

dciSplit No string 0 to 32 - DCI split "1"


Group charac horizon group
ters. ID. The value
range is from 1
to 32.

microS Yes boolea - false Whether to false


egmen n enable
tCapab microsegmenta
ility tion.

multic No boolea - false Whether the false


astCap n multicast
ability capability is
supported.

segme No array< 0-2147 - Mask -


ntMas string> 48364 parameter.
ks 7
items.

aclMo No string 1 to 32 - Whether ACL6 "loose"


del charac is supported.
ters.

sfcCap No string 1 to 32 - SFC capability. "Pbr"


ability charac
ters.

faultSe No boolea - - faultService false


rvice n

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 317


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

underL No string - - Underlay "BGP"


ay routing
protocol.
Currently, BGP,
OSPF, and
other are
supported.

manag No string - - Management "INBAND"


ement mode.
Currently,
INBAND and
OUTBAND are
supported.

localCr No string - - ERT for local "2:100"


ossErt route leaking
on a fabric.

sdnMo No boolea - - Whether the true


de n SDN mode is
supported.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/fabricresource/fabrics HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"fabric" : [
{
"id" : "dbb702c3-7719-4fe6-a5ad-3a9c9e265309",
"name" : "Fabric",
"description" : "description",
"networkType" : "Distributed",
"physicalNetworkMode" : "Vxlan",
"bgpEvpnEnable" : true,
"extInterfaceType" : "Vbdif",
"arpBroadcastSuppression" : false,
"dciSplitGroup" : "1",
"microSegmentCapability" : false,
"multicastCapability" : false,
"aclModel" : "loose",
"sfcCapability" : "Pbr",
"faultService" : false,
"underLay" : "BGP",
"management" : "INBAND",
"localCrossErt" : "2:100",
"sdnMode" : true

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 318


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
],
"totalNum" : "1"
}

Response Parameters
Response status code 200: successfully

Table 1-197 FabricListRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

fabric ARRAY 0-1000 items. For details, Fabric -


_REFER see Table 1-198. information.
ENCE

totalN string - - Number of "1"


um queried fabrics.

Table 1-198 FabricDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Fabric ID. "dbb702c3-771


characters. 9-4fe6-
a5ad-3a9c9e26
5309"

name string 1 to 128 - Fabric name. "Fabric"


characters.

descrip string 0 to 255 - Fabric "description"


tion characters. description.

networ string 1 to 128 - Fabric VXLAN "Distributed"


kType characters. type. The value
is Distributed
or Centralized.

physic string 1 to 128 Vxlan Fabric "Vxlan"


alNetw characters. networking
orkMo type. Only
de VXLAN is
supported.

bgpEv boolea - true Whether BGP true


pnEna n EVPN is
ble enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 319


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extInte string 1 to 128 Vbdif Outbound "Vbdif"


rfaceTy characters. interface type.
pe The interface
can be VBDIF
or VLANIF
interface.

arpBro boolea - false Whether to false


adcast n enable ARP
Suppre broadcast
ssion suppression.

dciSplit string 0 to 32 - DCI split "1"


Group characters. horizon group
ID. The value
range is from 1
to 32.

microS boolea - false Whether to false


egmen n enable
tCapab microsegmenta
ility tion.

multic boolea - false Whether the false


astCap n multicast
ability capability is
supported.

segme array< 0-2147483647 - Mask -


ntMas string> items. parameter.
ks

aclMo string 1 to 32 - Whether ACL6 "loose"


del characters. is supported.

sfcCap string 1 to 32 - SFC capability. "Pbr"


ability characters.

faultSe boolea - - faultService false


rvice n

underL string - - Underlay "BGP"


ay routing
protocol.
Currently, BGP,
OSPF, and
other are
supported.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 320


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

manag string - - Management "INBAND"


ement mode.
Currently,
INBAND and
OUTBAND are
supported.

localCr string - - ERT for local "2:100"


ossErt route leaking
on a fabric.

sdnMo boolea - - Whether the true


de n SDN mode is
supported.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabric" : [
{
"id" : "dbb702c3-7719-4fe6-a5ad-3a9c9e265309",
"name" : "Fabric",
"description" : "description",
"networkType" : "Distributed",
"physicalNetworkMode" : "Vxlan",
"bgpEvpnEnable" : true,
"extInterfaceType" : "Vbdif",
"arpBroadcastSuppression" : false,
"dciSplitGroup" : "1",
"microSegmentCapability" : false,
"multicastCapability" : false,
"aclModel" : "loose",
"sfcCapability" : "Pbr",
"faultService" : false,
"underLay" : "BGP",
"management" : "INBAND",
"localCrossErt" : "2:100",
"sdnMode" : true
}
],
"totalNum" : "1"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 321


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.2 Query All Fabric Pools

Typical Scenarios
All fabric pools need to be queried.

Functions
Query all fabric pools.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics

Table 1-199 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 1 to - Page index. "1"


dex 4000
charac
ters.

pageSi No string 1 to - Page size. "1"


ze 4000
charac
ters.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 322


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/fabrics?pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully
FabricListRestfulDtoWrapper parameters, For details, see Table 1-197.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabric" : [
{
"id" : "dbb702c3-7719-4fe6-a5ad-3a9c9e265309",
"name" : "Fabric",
"description" : "description",
"networkType" : "Distributed",
"physicalNetworkMode" : "Vxlan",
"bgpEvpnEnable" : true,
"extInterfaceType" : "Vbdif",
"arpBroadcastSuppression" : false,
"dciSplitGroup" : "1",
"microSegmentCapability" : false,
"multicastCapability" : false,
"aclModel" : "loose",
"sfcCapability" : "Pbr",
"faultService" : false,
"underLay" : "BGP",
"management" : "INBAND",
"localCrossErt" : "2:100",
"sdnMode" : true
}
],
"totalNum" : "1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 323


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.3.2.3 Query a Fabric by ID

Typical Scenarios
Query a Fabric by ID.

Functions
Query a fabric by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics/fabric/{id}

Table 1-200 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a fabric. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/fabrics/fabric/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 324


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

FabricListRestfulDtoWrapper parameters, For details, see Table 1-197.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabric" : [
{
"id" : "dbb702c3-7719-4fe6-a5ad-3a9c9e265309",
"name" : "Fabric",
"description" : "description",
"networkType" : "Distributed",
"physicalNetworkMode" : "Vxlan",
"bgpEvpnEnable" : true,
"extInterfaceType" : "Vbdif",
"arpBroadcastSuppression" : false,
"dciSplitGroup" : "1",
"microSegmentCapability" : false,
"multicastCapability" : false,
"aclModel" : "loose",
"sfcCapability" : "Pbr",
"faultService" : false,
"underLay" : "BGP",
"management" : "INBAND",
"localCrossErt" : "2:100",
"sdnMode" : true
}
],
"totalNum" : "1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.4 Update a Fabric by ID

Typical Scenarios
A fabric needs to be updated by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 325


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Update a fabric by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics/fabric/{id}

Table 1-201 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 a fabric. This 19-4FE6-
charac field cannot be A5AD-3A9C9E2
ters. updated. 65309"

Request Parameters

Table 1-202 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Fabric -


NCE 1-195. configurat
ion.

Sample Request
HTTP
PUT /controller/dc/v3/physicalnetwork/fabricresource/fabrics/fabric/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 326


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"fabric" : [
{
"id" : "dbb702c3-7719-4fe6-a5ad-3a9c9e265309",
"name" : "Fabric",
"description" : "description",
"networkType" : "Distributed",
"physicalNetworkMode" : "Vxlan",
"bgpEvpnEnable" : true,
"extInterfaceType" : "Vbdif",
"arpBroadcastSuppression" : false,
"dciSplitGroup" : "1",
"microSegmentCapability" : false,
"multicastCapability" : false,
"aclModel" : "loose",
"sfcCapability" : "Pbr",
"faultService" : false,
"underLay" : "BGP",
"management" : "INBAND",
"localCrossErt" : "2:100",
"sdnMode" : true
}
],
"totalNum" : "1"
}

Response Parameters
Response status code 200: successfully
FabricListRestfulDtoWrapper parameters, For details, see Table 1-197.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabric" : [
{
"id" : "dbb702c3-7719-4fe6-a5ad-3a9c9e265309",
"name" : "Fabric",
"description" : "description",
"networkType" : "Distributed",
"physicalNetworkMode" : "Vxlan",
"bgpEvpnEnable" : true,
"extInterfaceType" : "Vbdif",
"arpBroadcastSuppression" : false,
"dciSplitGroup" : "1",
"microSegmentCapability" : false,
"multicastCapability" : false,
"aclModel" : "loose",
"sfcCapability" : "Pbr",
"faultService" : false,
"underLay" : "BGP",
"management" : "INBAND",
"localCrossErt" : "2:100",
"sdnMode" : true

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 327


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
],
"totalNum" : "1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.5 Delete a Fabric by ID

Typical Scenarios
A fabric needs to be deleted by ID.

Functions
Delete a fabric by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics/fabric/{id}

Table 1-203 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a fabric. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 328


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
DELETE /controller/dc/v3/physicalnetwork/fabricresource/fabrics/fabric/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.6 Query a Device Group with a Specified Role in a Specified Fabric

Typical Scenarios
A device group with a specified role in a specified fabric needs to be queried.

Functions
Query a device group with a specified role in a specified or all fabrics.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 329


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabric-nodes

Table 1-204 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI No string 0 to - fabricID "aecd1cb4-


d 256 b76a-405e-
charac a5ed-
ters. cb44744a2f3c"

nodeR No string 0 to - Role type of a "DCI"


ole 255 device group,
charac for example,
ters. DCI.

pageIn No string 1 to - Page index. "1"


dex 4000
charac
ters.

pageSi No string 1 to - Page size. "1"


ze 4000
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/fabric-nodes?fabricId=aecd1cb4-b76a-405e-a5ed-
cb44744a2f3c&nodeRole=DCI&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 330


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-205 FabricNodesListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

fabric ARRAY For details, see Table fabric node list -


Nodes _REFER 1-206.
List ENCE

totalN string - - Number of "1"


um queried fabric
device groups.

Table 1-206 FabricNodesDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Device ID. "c45b0dd9-


characters. fb41-3cf4-925a
-103ad846df9e
"

fabricI string 0 to 256 - Fabric ID. "c45b0dd9-


d characters. fb41-3cf4-925a
-103ad846df9e
"

fabric string 1 to 128 - Fabric name. -


Name characters.

name string 1 to 128 - Device name. "c45b0dd9-


characters. fb41-3cf4-925a
-103ad846df9e
"

nodeR string 0 to 255 - Role type of a "DCI"


ole characters. device group,
for example,
DCI.

vtepIp string 0 to 255 - VTEP IP "10.1.1.1"


characters. address of a
device group.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 331


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabricNodesList" : [
{
"id" : "c45b0dd9-fb41-3cf4-925a-103ad846df9e",
"fabricId" : "c45b0dd9-fb41-3cf4-925a-103ad846df9e",
"name" : "c45b0dd9-fb41-3cf4-925a-103ad846df9e",
"nodeRole" : "DCI",
"vtepIp" : "10.1.1.1"
}
],
"totalNum" : "1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.7 Query the Name and Usage of a Sub-resource

Typical Scenarios
The name and usage of a logical resource need to be queried.

Functions
Query the name and usage of child resources based on the parent resource ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics/logicresusage

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 332


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-207 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-208. paramete
r for
querying
the sub-
resource.

Table 1-208 queryResDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to 72 - Parent resource "c45b0dd9-


charac ID. The value fb41-3cf4-925a
ters. DCNService:FA -103ad846df9e
BRIC:MAX_FAB "
RIC_EGRESS_G
ATEWAY
indicates that
all parent
resources are
queried.

pageIn No int32 0 to - Page index. 5


dex 255
charac
ters.

pageSi No int32 0 to - Page size. 5


ze 255
charac
ters.

order No string 0 to - Order. "desc"


255
charac
ters.

orderV No string 0 to - Order. "logicResource


alue 255 Name"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 333


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/fabricresource/fabrics/logicresusage HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "c45b0dd9-fb41-3cf4-925a-103ad846df9e",
"pageIndex" : 5,
"pageSize" : 5,
"order" : "desc",
"orderValue" : "logicResourceName"
}

Response Parameters
Response status code 200: successfully

Table 1-209 LogicResourceUsageDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

resInfo ARRAY For details, see Table Related -


es _REFER 1-210. information.
ENCE

totalN int32 - - ResourceTotalN -


um um

Table 1-210 LogicResourceUsageDto parameters


Param Type Value Range Defaul Description Example
eter t Value

service string - - LogicResource -


Parent name
Name

service string - - ResourceId -


ParentI
d

usedN int32 - - ResourceUsage -


um Num

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 334


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.8 Query the Total Number and Usage of Resources

Typical Scenarios
The total number and usage of static resources needs to be queried.

Functions
Query the total amount and usage of static resources based on neId.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabrics/resourceusage/{neId}

Table 1-211 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

neId Yes string 0 to - Device ID. "cd76c5db-


256 bc96-36b4-988
charac 8-
ters. d76495ff333c"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 335


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-212 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dtid No string 0 to - Transaction ID. "G2019061209


256 4934616_25e4
charac 586-
ters. eb8a-4ee1-902
b-
ad5205e617c7
d"

N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/fabrics/resourceusage/cd76c5db-bc96-36b4-9888-
d76495ff333c HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtid: "G20190612094934616_25e4586-eb8a-4ee1-902b-ad5205e617c7d"

Response Parameters
Response status code 200: successfully

Table 1-213 StaticResourceUsageDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

Resour ARRAY For details, see Table Resource -


ceUsag _REFER 1-214. Usage
eList ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 336


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-214 StaticResourceUsageDto parameters

Param Type Value Range Defaul Description Example


eter t Value

name string - - StaticResource -


name

resourc int32 - - ResourceNum -


eSum

resourc int32 - - ResourceUsage -


eUsag Num
e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.9 Query Node Relations

Typical Scenarios
Query Node Relations.

Functions
Query node relations.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 337


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/node-relations

Table 1-215 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

descrip Yes string 1 to - Device group "mdc"


tion 255 service
charac description.
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/node-relations?description=mdc HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-216 NodeRelationListWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

inUse boolea - false Whether the false


n node is in the
inUse state.

nodeR ARRAY For details, see Table Node -


elation _REFER 1-217. association
List ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 338


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-217 NodeRelationDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 1 to 128 - nodeRelation "DBB702C3-77


characters. ID 19-4FE6-
A5AD-3A9C9E2
65309-
DBB702C3-771
9-4FE6-
A5AD-3A9C9E2
65309"

nodeId string 0 to 256 - node ID "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabricI string 0 to 256 - Fabric ID "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

descrip string 0 to 255 - Node relation "10"


tion characters. description.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"inUse" : false,
"nodeRelationList" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309-DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"nodeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "10"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 339


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.10 Update Node Relations

Typical Scenarios
The inUse state of node relations needs to be updated.

Functions
Update node relations.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/physicalnetwork/fabricresource/node-relations

Request Parameters

Table 1-218 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Device -


NCE 1-219. group to
be set to
the inUse
state.

Table 1-219 NodeRelationListWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

inUse Yes boolea - false Whether the false


n node is in the
inUse state.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 340


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

nodeR Yes ARRAY For details, see Node -


elation _REFER Table 1-220. association
List ENCE information.

Table 1-220 NodeRelationDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - nodeRelation "DBB702C3-77


128 ID 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309-
DBB702C3-771
9-4FE6-
A5AD-3A9C9E2
65309"

nodeId No string 0 to - node ID "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

fabricI No string 0 to - Fabric ID "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

descrip No string 0 to - Node relation "10"


tion 255 description.
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/physicalnetwork/fabricresource/node-relations HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"inUse" : false,
"nodeRelationList" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309-DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"nodeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 341


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"description" : "10"
}
]
}

Response Parameters
Response status code 200: successfully
NodeRelationListWrapper parameters, For details, see Table 1-216.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"inUse" : false,
"nodeRelationList" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309-DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"nodeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "10"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.11 Add a Device Group to a Fabric

Typical Scenarios
A device group needs to be added to a fabric.

Functions
Add a device group to the fabric.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 342


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabricnode

Request Parameters

Table 1-221 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Model of -


NCE 1-222. input
paramete
rs for
fabric
device
group
informati
on.

Table 1-222 NodesRestfulDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

node Yes REFER For details, see Fabric node -


ENCE Table 1-223. information.

Table 1-223 NodeDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

fabricI Yes string 0 to - Fabric ID "00278832-000


d 256 0-0000-0000-1
charac 00000000001"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 343


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

nodeId Yes array< Each - Node ID ["56A4E7F5-


s string> item information. F912-4657-8ED
has 0 3-
to 255 D397144A89D
charac 9","9AC3A545-
ters. B4DB-4879-84
7F-3645B809E2
65"]

nodeR Yes ARRAY For details, see Node Roles -


oles _REFER Table 1-224.
ENCE

Table 1-224 NodeRole parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

nodeId Yes string 0 to - Node ID "00278832-000


256 0-0000-0000-2
charac 00000000001"
ters.

nodeR Yes string 1 to - Node Rule "Egress


ole 255 Gateway"
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/fabricresource/fabricnode HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"node" : {
"fabricId" : "00278832-0000-0000-0000-100000000001",
"nodeIds" : ["56A4E7F5-F912-4657-8ED3-D397144A89D9","9AC3A545-
B4DB-4879-847F-3645B809E265"],
"nodeRoles" : [
{
"nodeId" : "00278832-0000-0000-0000-200000000001",
"nodeRole" : "Egress Gateway"
}
]
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 344


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 201: successfully

Table 1-225 NodesResultDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

nodeR ARRAY For details, see Table Node Result -


esult _REFER 1-226.
ENCE

Table 1-226 NodeResultDto parameters

Param Type Value Range Defaul Description Example


eter t Value

nodeId string 0 to 256 - Node ID "00278832-000


characters. 0-0000-0000-2
00000000001"

errorC string 0 to 255 - Error Code -


ode characters.

errorM array< Each item has 0 - Error Message -


essage string> to 255
characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"nodeResult" : [
{
"nodeId" : "00278832-0000-0000-0000-200000000001"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 345


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.12 Remove a Device Group from a Fabric

Typical Scenarios
A device group needs to be removed from a fabric.

Functions
Remove a device group from a fabric.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabricnode

Request Parameters

Table 1-227 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Model of -


NCE 1-222. input
paramete
rs for
fabric
device
group
informati
on.

Sample Request
HTTP
DELETE /controller/dc/v3/physicalnetwork/fabricresource/fabricnode HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 346


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"node" : {
"fabricId" : "00278832-0000-0000-0000-100000000001",
"nodeIds" : ["56A4E7F5-F912-4657-8ED3-D397144A89D9","9AC3A545-
B4DB-4879-847F-3645B809E265"],
"nodeRoles" : [
{
"nodeId" : "00278832-0000-0000-0000-200000000001",
"nodeRole" : "Egress Gateway"
}
]
}
}

Response Parameters
Response status code 200: successfully
NodesResultDtoWrapper parameters, For details, see Table 1-225.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"nodeResult" : [
{
"nodeId" : "00278832-0000-0000-0000-200000000001"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.2.13 Query Fabric Node Information

Typical Scenarios
Fabric node information needs to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 347


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query fabric node information.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/fabricnode/{id}

Table 1-228 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a logical port. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Table 1-229 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No string 0 to - Page size. "10"


ze 255
charac
ters.

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

flag No string 0 to - Flag platform. "1"


255
charac
ters.

keywor No string 0 to - Keyword. "acl1"


d 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 348


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

nodety No string 0 to - Node type. "5"


pe 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/fabricnode/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309?pageSize=10&pageIndex=1&flag=1&keyword=acl1&nodetype=5 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-230 NodesByFabricIdListRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

fabricn ARRAY For details, see Table Fabric Node -


ode _REFER 1-231.
ENCE

total int64 [0-4000] - Number of 50


nodes on one
fabric.

totalEr int64 [0-4000] - Number of 30


ror nodes on one
fabric.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 349


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-231 FabricNodeDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Device group "DBB702C3-77


characters. ID. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

nodeTy string 1 to 128 - Whether the "L2enableandl3


pe characters. device is the ewenable"
egress
gateway.

vtepIp string 0 to 255 - VTEP IP "192.168.1.1"


characters. address.

virtual string 1 to 128 - Virtual MAC "00:00:5E:


Mac characters. address. 00:01:01"

fabricI string 0 to 256 - Fabric ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

vtepM string 1 to 36 - VTEP MAC "00:00:5E:


ac characters. address. 00:01:01"

enable string 1 to 128 1 Whether the "1"


nve characters. NVE capability
is available.

dciEna boolea - false Whether the -


ble n DCI gateway is
enabled. The
value is true or
false.

isSplit boolea - false Whether the -


n split horizon
capability is
supported. The
value is true
for the AL and
false for the
ML.

negrou string 0 to 256 - Device group "DBB702C3-77


pId characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 350


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

group string 1 to 128 - Device group "Single"


Mode characters. type.

status string 0 to 255 - Status. "Active"


characters.

isHard string 1 to 128 - Device type. "6"


ware characters.

bgpEv string 1 to 36 - BGP EVPN "enable"


pnMod characters. mode.
e

total int32 [1-4094] - Total number 10


of records.

name string 1 to 128 CE6880 Device group "CE6880_39"


characters. _39 name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabricnode" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"nodeType" : "L2enableandl3ewenable",
"vtepIp" : "192.168.1.1",
"virtualMac" : "00:00:5E:00:01:01",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vtepMac" : "00:00:5E:00:01:01",
"enablenve" : "1",
"negroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"groupMode" : "Single",
"status" : "Active",
"isHardware" : "6",
"bgpEvpnMode" : "enable",
"total" : 10,
"name" : "CE6880_39"
}
],
"total" : 50,
"totalError" : 30
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 351


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3 Manage VAS Resource Pools


VAS resource pool interface description:

1. Create a VAS resource pool.

2. Query the VAS resource pool list.

3. Delete a specified VAS resource pool.

4. Modify a specified VAS resource pool.

5. Query details about a specified VAS resource pool.

6. Add a device group to a VAS resource pool.

7. Delete a device group from a VAS resource pool.

8. Query information about a device group in a specified VAS resource pool

1.9.3.3.1 Create a VAS Resource Pool

Typical Scenarios
A VAS resource pool needs to be created.

Functions
A VAS resource pool needs to be created.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/vaspool/

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 352


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-232 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-233. paramete
r for
creating a
VAS
resource
pool.

Table 1-233 VasPoolDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vasPoo Yes ARRAY For details, see Parameter of -


lDto _REFER Table 1-234. the VAS
ENCE resource pool.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 353


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-234 VasPoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID of a VAS "DBB702C3-77


charac resource pool. 19-4FE6-
ters. This parameter A5AD-3A9C9E2
The is mandatory 65309"
value for updating a
must VAS resource
meet pool. The value
the cannot be
followi changed.
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to - VAS resource "vaspool0"


255 pool name.
charac
ters.

descrip No string 0 to - Description of "This is a VAS


tion 255 the VAS resource pool."
charac resource pool.
ters. The value can
be changed.

interna No string ● vlan - Internal -


lInterfa if interface type,
ceMod which can be a
e ● subi
f VLAN interface
or sub-
interface.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 354


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extern No string ● vlan - Type of an -


alInter if external
faceM interface,
ode ● subi
f which can be a
VLAN interface,
● mai sub-interface,
n or main
interface.

vasTyp Yes string ● un - Resource pool "unmanaged-


e ma type. The value firewall"
nag can be
ed- unmanaged
fire firewall, F5 LB,
wall Check Point
● f5- firewall, Palo
loa Alto firewall,
dba Fortinet
lanc firewall, or
e unmanaged
WAF.
● cp-
fire
wall
● pa-
fire
wall
● ft-
fire
wall
● un
ma
nag
ed-
waf

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 355


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

networ No string ● in- - Network mode -


kingM line (inline or
ode - bypass).
depl
oy
me
nt
● off-
line
-
depl
oy
me
nt

resAllo No string ● leas - Resource -


catedP t- allocation
olicy nod policy, which
e can be
● aver Random or
- Load
nod Balancing.
e
● ran
do
m

southN No string ● den - Default policy -


orthDe y for north-south
faultAc traffic, which
tion ● per
mit can be permit
or deny.

device No ARRAY For details, see Device quota. -


Quota _REFER Table 1-235.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 356


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-235 DeviceResourceQuota parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

type No string ● vsys - Resource type. -


● ban
dwi
dth
● sess
ion
● poli
cy
● floa
ting
ip
● ipse
c-
con
nect
ion
● slb
● sslv
pn
● dhc
p
● rd
● vd
● sg

quota No int32 [0-214 - Percentage of 0


74836 total resources.
47]

recover No int32 [0-214 - Recovery 0


yThres 74836 threshold.
hold 47]

alarmT No int32 [0-214 - Alarm 10


hresho 74836 threshold.
ld 47]

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/vaspool HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 357


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vasPoolDto" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vaspool0",
"description" : "This is a VAS resource pool.",
"vasType" : "unmanaged-firewall",
"deviceQuota" : [
{
"quota" : 0,
"recoveryThreshold" : 0,
"alarmThreshold" : 10
}
]
}
]
}

Response Parameters
Response status code 200: successfully

Table 1-236 VasPoolDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

vasPoo ARRAY For details, see Table Parameter of -


lDto _REFER 1-237. the VAS
ENCE resource pool.

Table 1-237 VasPoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - ID of a VAS "DBB702C3-77


The value must resource pool. 19-4FE6-
meet the This parameter A5AD-3A9C9E2
following is mandatory 65309"
regular for updating a
expression: VAS resource
[0-9a-fA-F]{8}- pool. The value
[0-9a-fA-F]{4}- cannot be
[0-9a-fA-F]{4}- changed.
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - VAS resource "vaspool0"


characters. pool name.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 358


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

descrip string 0 to 255 - Description of "This is a VAS


tion characters. the VAS resource pool."
resource pool.
The value can
be changed.

interna string ● vlanif - Internal -


lInterfa interface type,
ceMod ● subif
which can be a
e VLAN interface
or sub-
interface.

extern string ● vlanif - Type of an -


alInter external
faceM ● subif
interface,
ode ● main which can be a
VLAN interface,
sub-interface,
or main
interface.

vasTyp string ● unmanaged- - Resource pool "unmanaged-


e firewall type. The value firewall"
● f5- can be
loadbalance unmanaged
firewall, F5 LB,
● cp-firewall Check Point
● pa-firewall firewall, Palo
● ft-firewall Alto firewall,
Fortinet
● unmanaged- firewall, or
waf unmanaged
WAF.

networ string ● in-line- - Network mode -


kingM deployment (inline or
ode bypass).
● off-line-
deployment

resAllo string ● least-node - Resource -


catedP allocation
olicy ● aver-node
policy, which
● random can be
Random or
Load
Balancing.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 359


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

southN string ● deny - Default policy -


orthDe for north-south
faultAc ● permit
traffic, which
tion can be permit
or deny.

device ARRAY For details, see Table Device quota. -


Quota _REFER 1-238.
ENCE

Table 1-238 DeviceResourceQuota parameters


Param Type Value Range Defaul Description Example
eter t Value

type string ● vsys - Resource type. -


● bandwidth
● session
● policy
● floatingip
● ipsec-
connection
● slb
● sslvpn
● dhcp
● rd
● vd
● sg

quota int32 [0-2147483647 - Percentage of 0


] total resources.

recover int32 [0-2147483647 - Recovery 0


yThres ] threshold.
hold

alarmT int32 [0-2147483647 - Alarm 10


hresho ] threshold.
ld

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 360


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vasPoolDto" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vaspool0",
"description" : "This is a VAS resource pool.",
"vasType" : "unmanaged-firewall",
"deviceQuota" : [
{
"quota" : 0,
"recoveryThreshold" : 0,
"alarmThreshold" : 10
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.2 Query the VAS Resource Pool List

Typical Scenarios
The list of VAS resource pools needs to be queried.

Functions
The VAS resource pool list needs to be queried.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/vaspool/

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 361


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-239 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string 1 to - Page index. "1"


dex 21474
83647
charac
ters.

pageSi No string 1 to - Page size. "1"


ze 4000
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/vaspool?pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-240 VasPoolPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

vasPoo ARRAY For details, see Table Resource pool -


lDtos _REFER 1-237. list.
ENCE

totalN int32 [1-2147483647 - Total number 200


um ] of queried VAS
resource pools.

pageIn int32 [1-4000] - Page index. 10


dex

pageSi int32 [1-4000] - Page size. 10


ze

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 362


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vasPoolDtos" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vaspool0",
"description" : "This is a VAS resource pool.",
"vasType" : "unmanaged-firewall",
"deviceQuota" : [
{
"quota" : 0,
"recoveryThreshold" : 0,
"alarmThreshold" : 10
}
]
}
],
"totalNum" : 200,
"pageIndex" : 10,
"pageSize" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.3 Query Details About a Specified VAS Resource Pool

Typical Scenarios
Details about a specified VAS resource pool need to be queried.

Functions
Details about a specified VAS resource pool need to be queried.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 363


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/vaspool/{id}

Table 1-241 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID used for the "DBB702C3-77


charac query. 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/vaspool/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 364


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully
VasPoolDtoWrapper parameters, For details, see Table 1-236.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vasPoolDto" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vaspool0",
"description" : "This is a VAS resource pool.",
"vasType" : "unmanaged-firewall",
"deviceQuota" : [
{
"quota" : 0,
"recoveryThreshold" : 0,
"alarmThreshold" : 10
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.4 Modify a Specified VAS Resource Pool

Typical Scenarios
A specified VAS resource pool needs to be updated.

Functions
A specified VAS resource pool needs to be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 365


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/controller/dc/v3/physicalnetwork/vaspool/{id}

Table 1-242 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Update a VAS "DBB702C3-77


charac resource pool 19-4FE6-
ters. by ID. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 366


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-243 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Model of -


NCE 1-233. input
paramete
rs for
updating
a VAS
resource
pool.

Sample Request
HTTP
PUT /controller/dc/v3/physicalnetwork/vaspool/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vasPoolDto" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vaspool0",
"description" : "This is a VAS resource pool.",
"vasType" : "unmanaged-firewall",
"deviceQuota" : [
{
"quota" : 0,
"recoveryThreshold" : 0,
"alarmThreshold" : 10
}
]
}
]
}

Response Parameters
Response status code 200: successfully
VasPoolDtoWrapper parameters, For details, see Table 1-236.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 367


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vasPoolDto" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vaspool0",
"description" : "This is a VAS resource pool.",
"vasType" : "unmanaged-firewall",
"deviceQuota" : [
{
"quota" : 0,
"recoveryThreshold" : 0,
"alarmThreshold" : 10
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.5 Delete a Specified VAS Resource Pool

Typical Scenarios
A specified VAS resource pool needs to be deleted.

Functions
A specified VAS resource pool needs to be deleted.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/controller/dc/v3/physicalnetwork/vaspool/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 368


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-244 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID of the VAS "DBB702C3-77


charac resource pool 19-4FE6-
ters. to be deleted. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/physicalnetwork/vaspool/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 369


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.6 Add Device Groups to a VAS Resource Pool

Typical Scenarios
Device groups need to be added to a VAS resource pool.

Functions
Device groups need to be added to the VAS resource pool.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/vaspool/add-node

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 370


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-245 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-246. paramete
r for
adding a
device
group to
the VAS
resource
pool.

Table 1-246 AddNodeToVasPoolDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

neGro No array< - - Device group -


upIds string> ID.

id No string - - ID of the VAS -


resource pool.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/vaspool/add-node HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 371


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.7 Delete a Device Group from a VAS Resource Pool

Typical Scenarios
A device group needs to be deleted from the VAS resource pool.

Functions
Device groups need to be deleted from the VAS resource pool.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/vaspool/delete-node

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 372


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-247 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-248. paramete
r for
deleting a
device
group
from a
VAS
resource
pool.

Table 1-248 DeleteNodeFromVasPoolDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

neGro No array< - - Device group -


upIds string> ID.

id No string - - ID of the VAS -


resource pool.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/vaspool/delete-node HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 373


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.3.8 Query Information About Device Groups in a Specified VAS Resource Pool

Typical Scenarios
Information about device groups in a specified VAS resource pool needs to be
queried.

Functions
Information about device groups in a specified VAS resource pool needs to be
queried.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/vaspool/{id}/node

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 374


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-249 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - ID of the VAS "DBB702C3-77


charac resource pool 19-4FE6-
ters. to be queried. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/vaspool/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/node HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 375


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-250 QueryVasNodeDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

queryV ARRAY For details, see Table Parameter for -


asNod _REFER 1-251. querying device
eDto ENCE groups in a
VAS resource
pool.

Table 1-251 QueryVasNodeDto parameters

Param Type Value Range Defaul Description Example


eter t Value

neGro string - - Device group -


upIds ID.

name string - - Device group -


name.

group string - - Device group -


Mode type.

neIds array< - - Device IP -


string> address list.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 376


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.3.4 Relationship between Fabric and VAS

1.9.3.4.1 Query Fabric-VAS Mappings by VAS Pool ID

Typical Scenarios
Fabric VAS mappings need to be queried.

Functions
Query fabric-VAS mappings by VAS pool ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/fabricvas/by/vaspool/{id}

Table 1-252 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID - - VAS pool ID. "CBB702C3-77


19-4FE6-
A5AD-3A9C9E2
65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/fabricvas/by/vaspool/CBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 377


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-253 FabricVasMappingDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string - - Fabric-VAS "CCB702C3-77


mapping ID. 19-4FE6-
A5AD-3A9C9E2
65309"

fabricI string - - Fabric ID. "CCB702C3-77


d 19-4FE6-
A5AD-3A9C9E2
65309"

vaspoo string - - VAS pool ID. "CCB702C3-77


lId 19-4FE6-
A5AD-3A9C9E2
65309"

vaspoo string - - VAS pool type. "Firewall"


lType

vaspoo string - - VAS pool "vaspoll1"


lName name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vaspoolId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vaspoolType" : "Firewall",
"vaspoolName" : "vaspoll1"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 378


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.4.2 Query Fabric VAS Mappings Based on the Fabric ID List

Typical Scenarios
Fabric VAS mappings need to be queried.

Functions
Query fabric VAS mappings based on the fabric ID list.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/fabricvas/by/fabricIds

Request Parameters

Table 1-254 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

VAS Yes REFER For details, see Input -


pool ENCE Table 1-255. parameter for
object querying a VAS
to pool.
query

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 379


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-255 FabricVasMappingQueryDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

fabricI Yes array< - - - -


ds string>

vaspoo No string - - VAS pool "vaspoll1"


lName name.

pageIn No int32 - - Page index. 1


dex

pageSi No int32 - - Page size. 4000


ze

queryV No string - - Fuzzy query "vaspool1"


alue keyword:
queryValue.

order No string - - Order. "asc or desc"

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/fabricvas/by/fabricIds HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"fabricIds" : [
"CBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"vaspoolName" : "vaspoll1",
"pageIndex" : 1,
"pageSize" : 4000,
"queryValue" : "vaspool1",
"order" : "asc or desc"
}

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 380


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-256 FabricVasMappingDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

fabricV ARRAY For details, see Table - -


asMap _REFER 1-253.
pings ENCE

totalN int64 - - Total number 10


um of results.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fabricVasMappings" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vaspoolId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vaspoolType" : "Firewall",
"vaspoolName" : "vaspoll1"
}
],
"totalNum" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.5 Host Link

1.9.3.5.1 Import Host Access Links in a Batch

Typical Scenarios
A third-party system needs to import host links.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 381


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Import host access links in a batch.

Constraints
None.

HTTP Method
POST

URI
/controller/platform/v1/basetopo/host-link-mgr/action/import

Request Parameters

Table 1-257 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

import Yes REFER For details, see Importing host -


HostLi ENCE Table 1-258. access link
nkInpu information.
t

Table 1-258 ImportHostLinkInput parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

hostLin No For details, see - -


kInput Table 1-259.
List

Table 1-259 hostLinkInputList parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 1 to 32 - Device IP "10.1.1.1"


p charac address.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 382


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No string 1 to 64 - Device port "Ethernet0/1/8


Port charac number. "
ters.

hostId No string 1 to - Host ID. "huawei1"


128
charac
ters.

hostM No string 0 to 32 - Host MAC "FA:16:3E:CF:


ac charac address. 1D:66"
ters.

provid No string 0 to - Vendor "network1"


erNet 254 network.
work charac
ters.

Sample Request
HTTP
POST /controller/platform/v1/basetopo/host-link-mgr/action/import HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"hostLinkInputList" : [
{
"deviceIp" : "10.1.1.1",
"devicePort" : "Ethernet0/1/8",
"hostId" : "huawei1",
"hostMac" : "FA:16:3E:CF:1D:66",
"providerNetwork" : "network1"
}
]
}

Response Parameters
Response status code 200: OK.

Table 1-260 ImportHostLinkOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

failedLi For details, see Table - -


nkList 1-261.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 383


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-261 failedLinkList parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 1 to 32 - Device IP "10.1.1.1"


p characters. address.

device string 1 to 64 - Device port "Ethernet0/1/8


Port characters. number. "

hostId string 1 to 128 - Host ID. "huawei1"


characters.

hostM string 0 to 32 - Host MAC "FA:16:3E:CF:


ac characters. address. 1D:66"

failedR string - - Cause for the "Device ip is


eason failure to not exist"
import the
inter-device
link.

provid string 0 to 254 - Vendor "network1"


erNet characters. network.
work

Sample Response
Response status code 200: OK.
HTTP/1.1 200 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"failedLinkList" : [
{
"deviceIp" : "10.1.1.1",
"devicePort" : "Ethernet0/1/8",
"hostId" : "huawei1",
"hostMac" : "FA:16:3E:CF:1D:66",
"failedReason" : "Device ip is not exist",
"providerNetwork" : "network1"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 384


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.3.5.2 Delete Host Access Links in a Batch

Typical Scenarios
A third-party system needs to delete host links.

Functions
Delete host access links in a batch.

Constraints
None.

HTTP Method
POST

URI
/restconf/operations/huawei-ac-net-l2link:delete-host-link

Request Parameters

Table 1-262 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

delete Yes REFER For details, see Deleting the -


HostLi ENCE Table2 host link list.
nkInpu DeleteHostLinkI
t nput
parameters.

Table 1-263 DeleteHostLinkInput parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

huawei No REFER For details, see - -


-ac- ENCE Table 1-264.
net-
l2link:i
nput

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 385


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-264 DeleteHostLinks parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

delete- No ARRAY For details, see - -


host- _REFER Table 1-265.
links ENCE

Table 1-265 HostLinkInfo parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

host- No string 0 to 32 - Host MAC "FA:16:3E:CF:


mac charac address. 1D:66"
ters.

device- No string 1 to 64 - Device port "Ethernet0/1/8


port charac number. "
ters.

host- No string 1 to - host name "huawei1"


name 128
charac
ters.

device- No string - - Device IP "10.1.1.1"


ip address.

Sample Request
cURL
curl -k -s -L -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-
Language: en-US' -H 'X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan' 'https://192.168.1.125:18002/restconf/operations/huawei-ac-net-
l2link:delete-host-link' -d '{
"huawei-ac-net-l2link:input" : {
"delete-host-links" : [
{
"host-mac" : "FA:16:3E:CF:1D:66",
"device-port" : "Ethernet0/1/8",
"host-name" : "huawei1",
"device-ip" : "10.1.1.1"
}
]
}
}'

HTTP
POST /restconf/operations/huawei-ac-net-l2link:delete-host-link HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 386


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"huawei-ac-net-l2link:input" : {
"delete-host-links" : [
{
"host-mac" : "FA:16:3E:CF:1D:66",
"device-port" : "Ethernet0/1/8",
"host-name" : "huawei1",
"device-ip" : "10.1.1.1"
}
]
}
}

Response Parameters
Response status code 200: OK.

Table 1-266 DeleteHostLinkOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

huawei REFER For details, see Table - -


-ac- ENCE 1-267.
net-
l2link:o
utput

Table 1-267 FailedHostLinks parameters

Param Type Value Range Defaul Description Example


eter t Value

failed- For details, see Table - -


host- 1-268.
links

Table 1-268 failed-host-links parameters

Param Type Value Range Defaul Description Example


eter t Value

host- string 0 to 32 - Host MAC "FA:16:3E:CF:


mac characters. address. 1D:66"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 387


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device- string 1 to 64 - Device port "Ethernet0/1/8


port characters. number. "

host- string 1 to 128 - host name "huawei1"


name characters.

device- string - - Device IP "10.1.1.1"


ip address.

failed- string - - Cause for the "Local deivce ip


reason failure to is invalid"
delete the host
access link.

Sample Response
Response status code 200: OK.
HTTP/10.1.1.111111 OK
Date: Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"huawei-ac-net-l2link:output" : {
"failed-host-links" : [
{
"host-mac" : "FA:16:3E:CF:1D:66",
"device-port" : "Ethernet0/1/8",
"host-name" : "huawei1",
"device-ip" : "10.1.1.1",
"failed-reason" : "Local deivce ip is invalid"
}
]
}
}

1.9.3.6 Device Link

1.9.3.6.1 Import Inter-Device Links in a Batch

Typical Scenarios
A third-party system needs to import inter-device links.

Functions
Import inter-device links in a batch.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 388


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
None.

HTTP Method
POST

URI
/restconf/operations/huawei-ac-net-l2link:import-device-link

Request Parameters

Table 1-269 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

import Yes REFER For details, see Importing the -


Device ENCE Table 1-270. inter-device
LinkIut link list.
put

Table 1-270 ImportDeviceLinkInput parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

huawei No REFER For details, see - -


-ac- ENCE Table 1-271.
net-
l2link:i
nput

Table 1-271 ImportDeviceLinks parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

import No For details, see - -


- Table 1-272.
device-
links

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 389


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-272 import-device-links parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

local- No string 0 to - Local "10.1.1.1"


manag 254 management
e-ip charac IP.
ters.

local- No string 1 to 64 - Local port "Ethernet0/1/8


ltp- charac name. "
port ters.

peer- No string 0 to - Peer device "DTB"


device- 246 name (edge
name charac device,
ters. mandatory)

peer-id No string - - Peer ID, which "10.1.1.2"


is an IP or MAC
address.

peer- No string ● ip - Peer ID type, "ip"


id-type which is an IP
● mac
or MAC
address.

peer- No string 1 to 64 - Peer port "Ethernet0/1/5


ltp- charac name. "
port ters.

provid No string 0 to - Vendor "network1"


er- 254 network.
networ charac
k ters.

Sample Request
cURL
curl -k -s -L -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-
Language: en-US' -H 'X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan' 'https://192.168.1.125:18002/restconf/operations/huawei-ac-net-
l2link:import-device-link' -d '{
"huawei-ac-net-l2link:input" : {
"import-device-links" : [
{
"local-manage-ip" : "10.1.1.1",
"local-ltp-port" : "Ethernet0/1/8",
"peer-device-name" : "DTB",
"peer-id" : "10.1.1.2",
"peer-id-type" : "ip",
"peer-ltp-port" : "Ethernet0/1/5",
"provider-network" : "network1"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 390


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}
}'

HTTP
POST /restconf/operations/huawei-ac-net-l2link:import-device-link HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"huawei-ac-net-l2link:input" : {
"import-device-links" : [
{
"local-manage-ip" : "10.1.1.1",
"local-ltp-port" : "Ethernet0/1/8",
"peer-device-name" : "DTB",
"peer-id" : "10.1.1.2",
"peer-id-type" : "ip",
"peer-ltp-port" : "Ethernet0/1/5",
"provider-network" : "network1"
}
]
}
}

Response Parameters
Response status code 200: OK.

Table 1-273 ImportDeviceLinkOutput parameters

Param Type Value Range Defaul Description Example


eter t Value

huawei REFER For details, see Table - -


-ac- ENCE 1-274.
net-
l2link:o
utput

Table 1-274 ImportFailedLinks parameters

Param Type Value Range Defaul Description Example


eter t Value

import For details, see Table - -


- 1-275.
failed-
links

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 391


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-275 import-failed-links parameters


Param Type Value Range Defaul Description Example
eter t Value

local- string 0 to 254 - Local "10.1.1.1"


manag characters. management
e-ip IP.

local- string 1 to 64 - Local port "Ethernet0/1/8


ltp- characters. name. "
port

peer- string 0 to 246 - Peer device "DTB"


device- characters. name (edge
name device,
mandatory)

peer-id string - - Peer ID, which "10.1.1.2"


is an IP or MAC
address.

peer- string ● ip - Peer ID type, "ip"


id-type which is an IP
● mac
or MAC
address.

peer- string 1 to 64 - Peer port "Ethernet0/1/5


ltp- characters. name. "
port

failed- string - - Cause for the "The ip format


reason failure to is invalid"
import the
inter-device
link.

provid string 0 to 254 - Vendor "network1"


er- characters. network.
networ
k

Sample Response
Response status code 200: OK.
HTTP/10.1.1.22OK10.1.1.1111111
Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"huawei-ac-net-l2link:output" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 392


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"import-failed-links" : [
{
"local-manage-ip" : "10.1.1.1",
"local-ltp-port" : "Ethernet0/1/8",
"peer-device-name" : "DTB",
"peer-id" : "10.1.1.2",
"peer-id-type" : "ip",
"peer-ltp-port" : "Ethernet0/1/5",
"failed-reason" : "The ip format is invalid",
"provider-network" : "network1"
}
]
}
}

1.9.3.6.2 Delete Inter-Device Links in a Batch

Typical Scenarios
A third-party system needs to delete inter-device links.

Functions
Delete inter-device links in a batch.

Constraints
None.

HTTP Method
POST

URI
/restconf/operations/huawei-ac-net-l2link:delete-device-link

Request Parameters

Table 1-276 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

delete Yes REFER For details, see Deleting the -


Device ENCE Table 1-277. inter-device
LinkIn link list.
put

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 393


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-277 DeleteDeviceLinkInput parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

huawei No REFER For details, see - -


-ac- ENCE Table 1-278.
net-
l2link:i
nput

Table 1-278 DeleteDeviceLinks parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

delete- No ARRAY For details, see - -


device- _REFER Table 1-279.
links ENCE

Table 1-279 DeviceLinkInfo parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

local- No string 0 to - Local "10.1.1.1"


manag 254 management
e-ip charac IP.
ters.

local- No string 1 to 64 - Local port "Ethernet0/1/8


ltp- charac name. "
port ters.

peer- No string 0 to - Peer device "DTB"


device- 246 name (edge
name charac device,
ters. mandatory)

peer-id No string - - Peer ID, which "10.1.1.2"


is an IP or MAC
address.

peer- No string ● ip - Peer ID type, "ip"


id-type which is an IP
● mac
or MAC
address.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 394


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peer- No string 1 to 64 - Peer port "Ethernet0/1/5


ltp- charac name. "
port ters.

Sample Request
cURL
curl -k -s -L -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-
Language: en-US' -H 'X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan' 'https://192.168.1.125:18002/restconf/operations/huawei-ac-net-
l2link:delete-device-link' -d '{
"huawei-ac-net-l2link:input" : {
"delete-device-links" : [
{
"local-manage-ip" : "10.1.1.1",
"local-ltp-port" : "Ethernet0/1/8",
"peer-device-name" : "DTB",
"peer-id" : "10.1.1.2",
"peer-id-type" : "ip",
"peer-ltp-port" : "Ethernet0/1/5"
}
]
}
}'

HTTP
POST /restconf/operations/huawei-ac-net-l2link:delete-device-link HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"huawei-ac-net-l2link:input" : {
"delete-device-links" : [
{
"local-manage-ip" : "10.1.1.1",
"local-ltp-port" : "Ethernet0/1/8",
"peer-device-name" : "DTB",
"peer-id" : "10.1.1.2",
"peer-id-type" : "ip",
"peer-ltp-port" : "Ethernet0/1/5"
}
]
}
}

Response Parameters
Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 395


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-280 DeleteDeviceLinkOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

huawei REFER For details, see Table - -


-ac- ENCE 1-281.
net-
l2link:o
utput

Table 1-281 FailedDeviceLinks parameters


Param Type Value Range Defaul Description Example
eter t Value

failed- For details, see Table - -


device- 1-282.
links

Table 1-282 failed-device-links parameters


Param Type Value Range Defaul Description Example
eter t Value

local- string 0 to 254 - Local "10.1.1.1"


manag characters. management
e-ip IP.

local- string 1 to 64 - Local port "Ethernet0/1/8


ltp- characters. name. "
port

peer- string 0 to 246 - Peer device "DTB"


device- characters. name (edge
name device,
mandatory)

peer-id string - - Peer ID, which "10.1.1.2"


is an IP or MAC
address.

peer- string ● ip - Peer ID type, "ip"


id-type which is an IP
● mac
or MAC
address.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 396


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peer- string 1 to 64 - Peer port "Ethernet0/1/5


ltp- characters. name. "
port

failed- string - - Cause for the "Local device


reason failure to info is invalid"
delete the
inter-device
link.

Sample Response
Response status code 200: OK.
HTTP/10.1.1.22OK10.1.1.1111
Tue,30 Oct 2018 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"huawei-ac-net-l2link:output" : {
"failed-device-links" : [
{
"local-manage-ip" : "10.1.1.1",
"local-ltp-port" : "Ethernet0/1/8",
"peer-device-name" : "DTB",
"peer-id" : "10.1.1.2",
"peer-id-type" : "ip",
"peer-ltp-port" : "Ethernet0/1/5",
"failed-reason" : "Local device info is invalid"
}
]
}
}

1.9.3.7 Open API for Device Discovery


## API description:
1. Modify the SNMP password.
2. Automatic discover devices
3. Query discovered devices based on keywords.
4. Add devices.

(Note: 1. The northbound NETCONF password needs to be changed. If the


password is different from the device password, the device connection cannot be
established and the device status is abnormal. After the password is changed to be
the same as the device password, the device connection can be established after 3
to 5 minutes and the device status is normal. 2. By default, the password of a new
northbound user cannot be changed within 10 days. To change the password of a

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 397


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

northbound user, log in to the NCE management plane and choose System >
System Security > Security Policies from the main menu. On the displayed page,
choose Password Policy from the navigation pane, deselect Min. password usage
period (days), and click Apply.)

Interface SLA: (special design for special interfaces)


SLAs for query APIs
Request success rate: ≥ 99%
Availability: Tier 1
Data consistency: Strong consistency
Throughput: 200 TPS
TP50 request delay: 50 ms
TP99.9 request delay: 100 ms

1.9.3.7.1 Modify an SNMP Account

Typical Scenarios
The SNMP protocol needs to be changed for a device.

Functions
A device group needs to be added to an SNMP resource pool.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/device/snmp

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 398


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-283 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-284. paramete
r model
for the
SNMP
protocol.

Table 1-284 UserSnmpWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

manag Yes array< Each - Device -


erIp string> item management
has 1 IP address list.
to 100
charac
ters.

snmpP Yes REFER For details, see SNMP entity -


aram ENCE Table 1-285. parameters.

Table 1-285 SnmpParamWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

snmpV No string 1 to v3 SNMP protocol. "v3"


ersion 255 By default,
charac SNMPv3 is
ters. used.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 399


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

authPr Yes string ● NO - Authentication "HMAC_MD5"


otocol NE protocol. The
● HM value can be
AC_ HMAC_SHA,
SHA HMAC_MD5,
HMAC_SHA2_2
● HM 56,
AC_ HMAC_SHA2_3
MD 84, and
5 HMAC_SHA2_5
● HM 12.
AC_
SHA
2_2
56
● HM
AC_
SHA
2_3
84
● HM
AC_
SHA
2_5
12

authPa Yes passw 1 to - This field may "*******"


ssword ord 255 contain
charac sensitive or
ters. personal data.
Keep it secure.
Authentication
key.

privacy Yes string ● NO - Encryption "AES_128"


Protoc NE algorithm. The
ol value can be
● CBC
_DE CBC_DES,
S AES_128, or
AES_256.
● AES
_12
8
● AES
_25
6

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 400


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

encryp Yes passw 1 to - This field may "*******"


tionPa ord 255 contain
ssword charac sensitive or
ters. personal data.
Keep it secure.
Encryption key.

userna Yes string 1 to - User name. "Huawei@456"


me 255
charac
ters.

port Yes int32 [1-655 - SNMP port 161


35] number, in the
range from 1
to 65535.

timeou No int32 - 15000 Timeout 15000


tPeriod interval (≥
3000). The
default value is
15000 ms.

retries No int32 [0-255 3 Number of 3


] retry times, in
the range from
0 to 255. The
default value is
3.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/device/snmp HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"managerIp" : [
"192.168.0.0"
],
"snmpParam" : {
"snmpVersion" : "v3",
"authProtocol" : "HMAC_MD5",
"authPassword" : "*******",
"privacyProtocol" : "AES_128",
"encryptionPassword" : "*******",
"username" : "Huawei@456",
"port" : 161,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 401


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"timeoutPeriod" : 15000,
"retries" : 3
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.7.2 Automatically Discover Devices

Typical Scenarios
Devices need to be automatically discovered.

Functions
Automatically discover devices.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/device/discover/start

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 402


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-286 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table DeviceDis -


NCE 1-287. coverInpu
tDto

Table 1-287 DeviceDiscoverInputDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ipSegP Yes ARRAY For details, see IP address -


aramD _REFER Table 1-288. segment.
toList ENCE

snmpP Yes REFER For details, see SNMP -


aramD ENCE Table 1-285. parameter.
to

netcon Yes REFER For details, see NETCONF -


fParam ENCE Table 1-289. parameters.
Dto

Table 1-288 IpSegParamWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

startIp Yes string 1 to - Start IP "192.168.0.0"


255 address.
charac
ters.

endIp Yes string 1 to - End IP address. "192.168.0.1"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 403


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-289 NetconfParamWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ncPort No int32 1 to 32 22 NETCONF port 22


charac number, which
ters. is set to 22 by
default.

ncUser Yes string 1 to - NETCONF "custom"


Name 255 username.
charac
ters.

ncKey Yes passw 1 to - This field may "*******"


ord 255 contain
charac sensitive or
ters. personal data.
Keep it secure.
NETCONF
password.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/device/discover/start HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"ipSegParamDtoList" : [
{
"startIp" : "192.168.0.0",
"endIp" : "192.168.0.1"
}
],
"snmpParamDto" : {
"snmpVersion" : "v3",
"authProtocol" : "HMAC_MD5",
"authPassword" : "*******",
"privacyProtocol" : "AES_128",
"encryptionPassword" : "*******",
"username" : "Huawei@456",
"port" : 161,
"timeoutPeriod" : 15000,
"retries" : 3
},
"netconfParamDto" : {
"ncPort" : 22,
"ncUserName" : "custom",
"ncKey" : "*******"
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 404


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.7.3 Device Polling Progress

Typical Scenarios
Discovered devices need to be queried by keyword.

Functions
Query discovered devices based on keywords.

Constraints
User role: northbound operator.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 405


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/physicalnetwork/device/discover/result

Table 1-290 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No int32 - - Page index. 1


dex

pageSi No int32 - - Page size. 20


ze

ascend No boolea - - Order. -


n

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/device/discover/result?pageIndex=1&pageSize=20 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK.

Table 1-291 DeviceDiscoverResultDto parameters

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Device name. -


List _REFER 1-292.
ENCE

totalN int64 - - Total number -


um of matched
rows.

switch int64 - - Total number -


Num of switches.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 406


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

firewal int64 - - Total number -


lNum of firewalls.

loadba int64 - - Total number -


lanceN of load
um balancers.

router int64 - - Total number -


Num of routers.

proces int32 - - Task progress -


s

lockErr string - - lockErrorString -


orStrin
g

linkErr string - - linkErrorIp -


orIp

linkFail string - - linkFailedIp -


edIp

Table 1-292 DiscoverDeviceSingleResult parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI REFER For details, see Table Device -


nfo ENCE 1-293. information.

isSucce boolea - - Whether the -


ss n operation is
successful.

resultI string - - Result. -


nfo

added int32 - - Add the Fabric -


Status Status

added string - - Error code for -


ErrorC the failure to
ode add a device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 407


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-293 DeviceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - Device ID. -

ip string - - Device -
management
IP address.

name string - - Device name. -

device string - - Device type. -


Type

device string - - Device mode. -


Model

status int32 - - NETCONF -


status of a
device.

vendor string - - Vendor. -

contac string - - Contact -


t information.

device string - - deviceOrganiza -


Organi tionID
zationI
D

organi string - - organizationNa -


zation me
Name

descrip string - - Device -


tion description.

version string - - Device version. -

admin int32 - - Administrative -


Status status.

locatio string - - Fault location -


n information.

esn string - - esn -

mac string - - Device MAC -


address.

sysoid string - - sysoid -

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 408


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vpnNa string - - VPN name. -


me

softwa string - - Software -


reVersi version.
on

hardw string - - Hardware -


areVer version
sion number.

Response status code 400: Bad request.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Bad request.


HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.7.4 Add a Device

Typical Scenarios
A device needs to be added.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 409


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Add the Default IP Address of the Device.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/device/discover/add

Request Parameters

Table 1-294 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device Yes REFER For details, see Add device -


AddInp ENCE Table 1-295. information.
ut

Table 1-295 DeviceAddInput parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipList No array< - - IP address list. -


string> If this
parameter is
not set, the IP
addresses of all
queried devices
are transferred
by default.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/device/discover/add HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 410


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: OK.

Response status code 400: Bad request.


For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Bad request.


HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.7.5 Result of the Add Operation

Typical Scenarios
Added devices need to be queried.

Functions
Query the added device based on keywords.

Constraints
User role: northbound operator.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 411


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/physicalnetwork/device/discover/add/result

Table 1-296 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No int32 - - Page index. 1


dex

pageSi No int32 - - Page size. 20


ze

ascend No boolea - - Order. -


n

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/device/discover/add/result?pageIndex=1&pageSize=20 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: OK.

Table 1-297 DeviceAddResultDto parameters

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Device name. -


List _REFER 1-298.
ENCE

totalN int64 - - Total number. -


um

switch int64 - - Total number -


Num of switches.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 412


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

firewal int64 - - Total number -


lNum of firewalls.

loadba int64 - - Total number -


lanceN of load
um balancers.

router int64 - - Total number -


Num of routers.

proces int32 - - Total progress. -


s

lockErr string - - lockErrorString -


orStrin
g

linkErr string - - linkErrorIp -


orIp

linkFail string - - linkFailedIp -


edIp

Table 1-298 AddDeviceSingleResult parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI REFER For details, see Table Device -


nfo ENCE 1-293. information.

added int32 - - Device adding -


Status status. The
options are as
follows: 0: not
added; 1:
added.

added string - - Error code for -


ErrorC the failure to
ode add a device.

added string - - Add Device -


ErrorM Error
sg Information

Response status code 400: Bad request.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 413


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Bad request.


HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.7.6 Add Devices

Typical Scenarios
A device needs to be added.

Functions
Add a device to the ATIC.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/device/manager/staticimport

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 414


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-299 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

addDe Yes REFER For details, see addParameter -


vices ENCE Table 1-300.

Table 1-300 DeviceAdd parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No ARRAY 0-300 items. For Device -


nfo _REFER details, see information.
ENCE Table 1-301.

Table 1-301 AddDeviceInfo parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device No REFER For details, see Basic device -


BasicIn ENCE Table 1-302. information.
fo

userAc No ARRAY 0-300 items. For Device -


counts _REFER details, see information
ENCE Table 1-303.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 415


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-302 DeviceBasicInfo parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Device ID, "7f0f98d0-


charac which uniquely daa2-4239-
ters. identifies a b838-440bd12
The device. 830b8"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

manag No string 1 to - Device "192.168.1.1"


Ip 128 management
charac IP address.
ters.

name No string 1 to - Device name. "CE6850_47.10


255 5-12.12.47.104"
charac
ters.

mac No string 0 to - Device MAC "a1:b2:c3:d4:e5:


128 address. f6"
charac
ters.

esn No string 0 to - Device ESN. "D6DB0F51499


512 4E85517180C0
charac F6585C7B5523
ters. B69CC"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 416


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No string 0 to - Device type. "SWITCH"


Type 128
charac
ters.

device No string 0 to - Device model. "CE6850-48S6


Model 256 Q-HI"
charac
ters.

manuf No string 0 to - Manufacturer. "HUAWEI"


acturer 512
charac
ters.

hardw No string 0 to - Hardware "CE6850-48S6


areVer 256 version. Q-HI"
sion charac
ters.

softwa No string 0 to - Software "V200R019C10


reVersi 256 version. SPC800"
on charac
ters.

Table 1-303 UserAccountInfo parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

protoc No string ● NET - Protocol type. "NETCONF"


olType CO
NF
● TEL
NET
● SN
MP
● SSH

userNa No string 1 to - Username. "v3r1user"


me 128
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 417


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

passw No string 1 to - This field may -


ord 128 contain
charac sensitive or
ters. personal data.
Keep it secure.
Password.

portNu No int64 [0-655 - Port. 22


m 35]

snmpV No string 1 to - SNMP version. "V3"


ersion 255
charac
ters.

snmpA No string ● HM - SNMP "HMAC_SHA2_


uthPro AC_ authentication 256"
tocol SHA protocol.
● HM
AC_
MD
5
● HM
AC_
SHA
2_2
56
● HM
AC_
SHA
2_3
84
● HM
AC_
SHA
2_5
12

snmpA No string 1 to - This field may -


uthPas 255 contain
sword charac sensitive or
ters. personal data.
Keep it secure.
SNMP
authentication
key.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 418


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

snmpP No string ● CBC - SNMP "AES_128"


rivacyP _DE encryption
rotocol S algorithm.
● AES
_12
8
● AES
_25
6

snmpE No string 1 to - This field may -


ncrypti 255 contain
onPass charac sensitive or
word ters. personal data.
Keep it secure.
SNMP
encryption key.

snmpTi No int32 [0-150 - Timeout 15000


meout 00] interval.
Period

snmpR No int32 [1-3] - Maximum retry 3


etries times.

snmpS No string 1 to - SNMP sysoid "1.3.6.1.4.1.9.1.


ysOid 255 path. 1018"
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/device/manager/staticimport HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"deviceInfo" : [
{
"deviceBasicInfo" : {
"id" : "7f0f98d0-daa2-4239-b838-440bd12830b8",
"managIp" : "192.168.1.1",
"name" : "CE6850_47.105-12.12.47.104",
"mac" : "a1:b2:c3:d4:e5:f6",
"esn" : "D6DB0F514994E85517180C0F6585C7B5523B69CC",
"deviceType" : "SWITCH",
"deviceModel" : "CE6850-48S6Q-HI",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 419


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"manufacturer" : "HUAWEI",
"hardwareVersion" : "CE6850-48S6Q-HI",
"softwareVersion" : "V200R019C10SPC800"
},
"userAccounts" : [
{
"protocolType" : "NETCONF",
"userName" : "v3r1user",
"portNum" : 22,
"snmpVersion" : "V3",
"snmpAuthProtocol" : "HMAC_SHA2_256",
"snmpPrivacyProtocol" : "AES_128",
"snmpTimeoutPeriod" : 15000,
"snmpRetries" : 3,
"snmpSysOid" : "1.3.6.1.4.1.9.1.1018"
}
]
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-304 DeviceAddResult parameters


Param Type Value Range Defaul Description Example
eter t Value

result REFER For details, see Table Addition Result -


ENCE 1-305.

Table 1-305 DeviceOperateResult parameters


Param Type Value Range Defaul Description Example
eter t Value

success ARRAY 0-300 items. For details, List of devices -


List _REFER see Table 1-306. that are
ENCE successfully
operated.

failedLi ARRAY 0-300 items. For details, List of devices -


st _REFER see Table 1-307. that fail to be
ENCE operated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 420


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-306 SuccessInfo parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - Device ID. "7f0f98d0-


daa2-4239-
b838-440bd12
830b8"

ip string - - ip "192.168.1.1"

name string - - name "CE6850_47.10


5-12.12.47.104"

Table 1-307 FailedInfo parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - Device ID. "7f0f98d0-


daa2-4239-
b838-440bd12
830b8"

ip string - - ip "192.168.1.1"

mac string - - mac "00:00:5E:


00:01:01"

esn string 0 to 512 - esn "D6DB0F51499


characters. 4E85517180C0
F6585C7B5523
B69CC"

comm REFER For details, see Table Common -


onFaile ENCE 1-308. failure result.
dInfo

Table 1-308 CommonFailedInfo parameters


Param Type Value Range Defaul Description Example
eter t Value

errorC string - - errorCode -


ode

errorM string - - errorMessage -


essage

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 421


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"result" : {
"successList" : [
{
"id" : "7f0f98d0-daa2-4239-b838-440bd12830b8",
"ip" : "192.168.1.1",
"name" : "CE6850_47.105-12.12.47.104"
}
],
"failedList" : [
{
"id" : "7f0f98d0-daa2-4239-b838-440bd12830b8",
"ip" : "192.168.1.1",
"mac" : "00:00:5E:00:01:01",
"esn" : "D6DB0F514994E85517180C0F6585C7B5523B69CC"
}
]
}
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.7.7 Delete Devices

Typical Scenarios
A device needs to be deleted.

Functions
Delete a device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 422


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/controller/dc/v3/physicalnetwork/device/manager/delete

Request Parameters

Table 1-309 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

delete Yes REFER For details, see deleteParamet -


Device ENCE Table 1-310. er
s

Table 1-310 DeviceDelete parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No ARRAY 0-300 items. For Device -


nfo _REFER details, see information.
ENCE Table 1-311.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 423


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-311 DeleteDeviceInfo parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Device ID. "7f0f98d0-


charac daa2-4239-
ters. b838-440bd12
The 830b8"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
DELETE /controller/dc/v3/physicalnetwork/device/manager/delete HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"deviceInfo" : [
{
"id" : "7f0f98d0-daa2-4239-b838-440bd12830b8"
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 424


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-312 DeviceDeleteResult parameters

Param Type Value Range Defaul Description Example


eter t Value

result REFER For details, see Table Deletion result. -


ENCE 1-305.

Response status code 400: Response status code 400: Bad request.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"result" : {
"successList" : [
{
"id" : "7f0f98d0-daa2-4239-b838-440bd12830b8",
"ip" : "192.168.1.1",
"name" : "CE6850_47.105-12.12.47.104"
}
],
"failedList" : [
{
"id" : "7f0f98d0-daa2-4239-b838-440bd12830b8",
"ip" : "192.168.1.1",
"mac" : "00:00:5E:00:01:01",
"esn" : "D6DB0F514994E85517180C0F6585C7B5523B69CC"
}
]
}
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 425


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.3.7.8 Save Authentication Information

Typical Scenarios
Authentication information needs to be saved.

Functions
Save the authentication information.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/device/protocol

Request Parameters

Table 1-313 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

SaveA Yes REFER For details, see SaveAuthInfoIn -


uthInfo ENCE Table 1-314. put
Input

Table 1-314 SaveAuthInfoInput parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

authInf No ARRAY 0-300 items. For authInfos -


os _REFER details, see
ENCE Table 1-315.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 426


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-315 AuthInfo parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 36 - Device ID. "7f0f98d0-


d charac daa2-4239-
ters. b838-440bd12
The 830b8"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

UserAc No REFER For details, see Client -


countI ENCE Table 1-303. information.
nfo

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/device/protocol HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"authInfos" : [
{
"deviceId" : "7f0f98d0-daa2-4239-b838-440bd12830b8",
"UserAccountInfo" : {
"protocolType" : "NETCONF",
"userName" : "v3r1user",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 427


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"portNum" : 22,
"snmpVersion" : "V3",
"snmpAuthProtocol" : "HMAC_SHA2_256",
"snmpPrivacyProtocol" : "AES_128",
"snmpTimeoutPeriod" : 15000,
"snmpRetries" : 3,
"snmpSysOid" : "1.3.6.1.4.1.9.1.1018"
}
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-316 SaveAuthInfoOutput parameters


Param Type Value Range Defaul Description Example
eter t Value

saveAu ARRAY 0-300 items. For details, List of devices -


thInfoS _REFER see Table 1-317. that are
uccess ENCE successfully
List authenticated.

saveAu ARRAY 0-300 items. For details, List of devices -


thInfoF _REFER see Table 1-318. that fail to be
ailedLi ENCE authenticated.
st

Table 1-317 SaveAuthInfoSuccess parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string - - Device ID. "7f0f98d0-


d daa2-4239-
b838-440bd12
830b8"

Table 1-318 SaveAuthInfoFailed parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string - - Device ID. "7f0f98d0-


d daa2-4239-
b838-440bd12
830b8"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 428


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

result REFER For details, see Table Failure -


ENCE 1-308. information.

Response status code 400: Response status code 400: Bad request.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"saveAuthInfoSuccessList" : [
{
"deviceId" : "7f0f98d0-daa2-4239-b838-440bd12830b8"
}
],
"saveAuthInfoFailedList" : [
{
"deviceId" : "7f0f98d0-daa2-4239-b838-440bd12830b8"
}
]
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.8 Device Groups


## Device group interface description:
1. Create a device group.
2. Delete a Device Group

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 429


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.3.8.1 Create a Device Group

Typical Scenarios
A device group needs to be created.

Functions
Create a Device Group.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/device-groups

Request Parameters

Table 1-319 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Device -


NCE 1-320. group
object.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 430


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-320 DeviceGroupInputDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Device group "88886666-666


charac ID. 6-8888-6666-8
ters. 88866666111"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to - Device group "Leaf2"


255 name.
charac
ters.

group Yes string 1 to - Device group "active-active"


Mode 255 protection
charac mode. The
ters. value can be
single, active-
active, active-
standby, mirror,
dummy, vrrp,
or cluster.

device Yes ARRAY For details, see Member device -


_REFER Table 1-321. list.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 431


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-321 DeviceEntityDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 36 - Device group "DBB702C3-77


d charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

device No string - - Device role. -


Role This parameter
is read-only.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/device-groups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "88886666-6666-8888-6666-888866666111",
"name" : "Leaf2",
"groupMode" : "active-active",
"device" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 432


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}

Response Parameters
Response status code 200: OK.

Table 1-322 DeviceGroupOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Device group "DBB702C3-77


The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string - - Device group -


name.

status string - - Device group -


status. The
value can be
active, down,
or double-
master.

group string - - Device group -


Mode protection
mode. The
value can be
single, active-
active, active-
standby, mirror,
dummy, vrrp,
or cluster.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 433


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

groupT string - - Device group -


ype type. The
options are
firewall,
thirdparty-
firewall,
thirdparty-
loadbalance,
dhcp-compute,
dhcp-network,
switch, vswitch,
f5-loadbalance,
cp-firewall, pa-
firewall, ft-
firewall, waf,
and router.

device ARRAY For details, see Table List of device -


_REFER 1-323. group
ENCE members.

poolId string 36 characters. - Resource pool "DBB702C3-77


The value must to which a 19-4FE6-
meet the device group A5AD-3A9C9E2
following belongs. 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

device string - - Device type, -


Model such as
CE12800,
NE5000E,
CX600, and
USG6550.

provid string - - Provider. "Local"


er

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 434


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-323 DeviceEntityDto parameters

Param Type Value Range Defaul Description Example


eter t Value

deviceI string 36 characters. - Device group "DBB702C3-77


d The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

device string - - Device role. -


Role This parameter
is read-only.

Response status code 400: Bad request.


For details, see the response message body.
Response status code 500: Failed request due to an internal service error.
For details, see the response message body.

Sample Response
Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"device" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001"
}
],
"poolId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"provider" : "Local"
}

Response status code 400: Bad request.


HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 435


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Failed request due to an internal service error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.8.2 Delete a Device Group

Typical Scenarios
A device group needs to be deleted.

Functions
Delete a device group. A device group that has been added to a resource pool
cannot be deleted.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/controller/dc/v3/physicalnetwork/device-groups/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 436


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-324 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Device group "DBB702C3-77


charac object ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/physicalnetwork/device-groups/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 437


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.3.9 Query the Network Link List

Functions
Query network link information, including the link list, total number of device
records meeting the query condition, and total number of pages for displaying
records.

SLA item Definition

Request success rate ≥ 99%

Data consistency Eventually consistent; inconsistency


duration < 1 minute

Throughput 60 tps

TP50 request delay 200 ms

TP99.9 request delay 1000 ms

Constraints
This API supports access from northbound users and can be used only after a user
session has been established.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 438


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/rest/openapi/network/link

Table 1-325 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

anedn No string 0 to - Source NE DN. "da453377-


100 eb06-11e9-8aa
charac e-
ters. d2f2c051aa41"

anena No string 0 to - Source NE "scp101"


me 255 name.
charac
ters.

aneip No string 0 to - Source NE IP "10.10.12.11"


255 address.
charac
ters.

anesta No integer ● 0 - 0: unmanaged 1


te
● 1 1: online
● 2 2: offline
● 3 3: unknown

aportd No string 0 to - Source port "2961c398-099


n 100 DN. 4-4d3c-8bdb-3
charac efa29370edf"
ters.

aportn No string 0 to - Source port "eth1"


ame 255 name.
charac
ters.

aportip No string 0 to 64 - Source port IP "10.10.13.11"


charac address.
ters.

aporta No integer ● 1 - 1: up 1
dminst
atus ● 2 2: down
● 3 3: testing

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 439


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

aporto No integer ● 1 - 1: up 1
perstat
us ● 2 2: down
● 3 3: testing
● 4 4: unknown
● 5 5: dormant
● 6 6: notPresent
● 7 7:
lowerLayerDow
n

znedn No string 0 to - Destination NE "sa423377-


100 DN. eb06-11e9-8aa
charac e-
ters. d2f2c051aa31"

znena No string 0 to - Destination NE "scp102"


me 255 name.
charac
ters.

zneip No string 0 to - Destination NE "10.10.12.12"


255 IP address.
charac
ters.

znestat No integer ● 0 - 0: unmanaged 1


e
● 1 1: online
● 2 2: offline
● 3 3: unknown

zportd No string 0 to - Destination "2231c398-099


n 100 port DN. 4-4d3c-8bdb-3
charac efa29370231"
ters.

zportn No string 0 to - Destination "eth2"


ame 255 port name.
charac
ters.

zportip No string 0 to 64 - Destination "10.10.13.12"


charac port IP address.
ters.

zporta No integer ● 1 - 1: up 1
dminst
atus ● 2 2: down
● 3 3: testing

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 440


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

zporto No integer ● 1 - 1: up 1
perstat
us ● 2 2: down
● 3 3: testing
● 4 4: unknown
● 5 5: dormant
● 6 6: notPresent
● 7 7:
lowerLayerDow
n

linkdn No string 0 to - Link DN. "2--151449282


255 7838740513-44
charac 985527014712
ters. 4082"

linkna No string 0 to - Link name. "1111"


me 1130
charac
ters.

linksta No integer ● 0 - Link status. 1


tus
● 1 0: normal
● 2 1: unknown
● 3 2: major fault
● 4 3: emergent
● 5 fault
● 6 4: offline
5: unmanaged
6: faulty (major
or emergent
fault)

linktyp No integer ● 1 - 1: LLDP 1


e
● 2 2: side-by-side
● 3 link
● 4 3: MACARP
● 5 4: CDP
● 6 5: IP address
● 99 6: Eth-Trunk
link generated
based on
physical links
99: manual

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 441


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

speed No string 0 to 32 - The unit is "1000"


charac Mbit/s.
ters.

start No integer - 0 Start position 0


for returning
query result
sets. If the
value is smaller
than 0, the
default value is
used.

size No integer - 20 Number of 20


returned query
result sets. The
value range is
1 to 1000. The
default value is
20. Note: If the
value is smaller
than 0, the
default value is
used.

orderb No string 0 to 10 linkdn Field used to "linkdn"


y charac sort query
ters. result sets.

desc No boolea - false Whether query false


n results are
sorted in
descending
order. This
parameter is
valid only
when orderby
is set.

Request Parameters
N/A

Sample Request
cURL
curl -k -s -L -i -X GET -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'Accept-Language:
en-US' -H 'X-AUTH-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 442


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan' 'https://192.168.1.125:18002/rest/openapi/network/link?
anedn=da453377-eb06-11e9-8aae-
d2f2c051aa41&anename=scp101&aneip=10.10.12.11&anestate=1&aportdn=2961c398-0994-4d3c-8bdb-3efa
29370edf&aportname=eth1&aportip=10.10.13.11&aportadminstatus=1&aportoperstatus=1&znedn=sa423377
-eb06-11e9-8aae-
d2f2c051aa31&znename=scp102&zneip=10.10.12.12&znestate=1&zportdn=2231c398-0994-4d3c-8bdb-3efa2
9370231&zportname=eth2&zportip=10.10.13.12&zportadminstatus=1&zportoperstatus=1&linkdn=2--151449
2827838740513-449855270147124082&linkname=1111&linkstatus=1&linktype=1&speed=1000&start=0&size
=20&orderby=linkdn&desc=false'

HTTP
GET /rest/openapi/network/link?anedn=da453377-eb06-11e9-8aae-
d2f2c051aa41&anename=scp101&aneip=10.10.12.11&anestate=1&aportdn=2961c398-0994-4d3c-8bdb-3efa
29370edf&aportname=eth1&aportip=10.10.13.11&aportadminstatus=1&aportoperstatus=1&znedn=sa423377
-eb06-11e9-8aae-
d2f2c051aa31&znename=scp102&zneip=10.10.12.12&znestate=1&zportdn=2231c398-0994-4d3c-8bdb-3efa2
9370231&zportname=eth2&zportip=10.10.13.12&zportadminstatus=1&zportoperstatus=1&linkdn=2--151449
2827838740513-449855270147124082&linkname=1111&linkstatus=1&linktype=1&speed=1000&start=0&size
=20&orderby=linkdn&desc=false HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-AUTH-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Link list.

Table 1-326 NorthResponse parameters


Param Type Value Range Defaul Description Example
eter t Value

code integer - 0 Operation -


return
code.Such as
the following
value: 0:
success not 0:
failure

descrip string - - Description of -


tion the interface
call result.

data ARRAY For details, see Table Link info -


_REFER 1-327.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 443


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-327 LinkDataModel parameters


Param Type Value Range Defaul Description Example
eter t Value

linkdn string - - Link DN. -

linkna string - - Link name. -


me

anedn string - - Source NE DN. -

anena string - - Source NE -


me name.

aneip string - - Source NE IP -


address.

anesta integer ● 0 - 0: unmanaged -


te
● 1 1: online
● 2 2: offline
● 3 3: unknown

aportd string - - Source port -


n DN.

aportn string - - Source port -


ame name.

aportip string - - Source port IP -


address.

aporta integer ● 1 - 1: up -
dminst
atus ● 2 2: down
● 3 3: testing

aporto integer ● 1 - 1: up -
perstat
us ● 2 2: down
● 3 3: testing
● 4 4: unknown
● 5 5: dormant
● 6 6: notPresent
● 7 7:
lowerLayerDow
n

znedn string - - Destination NE -


DN.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 444


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

znena string - - Destination NE -


me name.

zneip string - - Destination NE -


IP address.

znestat integer ● 0 - 0: unmanaged -


e
● 1 1: online
● 2 2: offline
● 3 3: unknown

zportd string - - Destination -


n port DN.

zportn string - - Destination -


ame port name.

zportip string - - Destination -


port IP address.

zporta integer ● 1 - 1: up -
dminst
atus ● 2 2: down
● 3 3: testing

zporto integer ● 1 - 1: up -
perstat
us ● 2 2: down
● 3 3: testing
● 4 4: unknown
● 5 5: dormant
● 6 6: notPresent
● 7 7:
lowerLayerDow
n

linksta integer ● 0 - 0: normal -


tus
● 1 1: unknown
● 2 2: major fault
● 3 3: emergent
● 4 fault
● 5 4: offline
5: unmanaged

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 445


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

linktyp integer ● 1 - 1: LLDP -


e
● 2 2: side-by-side
● 3 link
● 4 3: MACARP
● 5 4: CDP
● 6 5: IP address
● 99 6: Eth-Trunk
link generated
based on
physical links
99: manual

speed string - - The unit is -


Mbit/s.

aportin string - - Source port -


dex index

zportin string - - Sink port index -


dex

Response status code 400: Bad request.


For details, see the response message body.
Response status code 500: Internal error.
For details, see the response message body.

Sample Response
Response status code 200:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code": 0,
"data":[
{
"linkdn": "2--1514492827838740513-449855270147124082",
"linkname": "1111",
"anedn": "da453377-eb06-11e9-8aae-d2f2c051aa41",
"anename": "scp101",
"aneip": "10.10.12.11",
"anestate": 1,
"aportdn": "2961c398-0994-4d3c-8bdb-3efa29370edf",
"aportname": "eth1",
"aportip": "10.10.13.11",
"aportadminstatus": 1,
"aportoperstatus": 1,
"znedn": "sa423377-eb06-11e9-8aae-d2f2c051aa31",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 446


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"znename": "scp102",
"zneip": "10.10.12.12",
"znestate": 1,
"zportdn": "2231c398-0994-4d3c-8bdb-3efa29370231",
"zportname": "eth2",
"zportip": "10.10.13.12",
"zportadminstatus": 1,
"zportoperstatus": 1,
"linkStatus": 1,
"linktype": 1,
"speed": "1000",
"aportindex": "8",
"zportindex": "5"
}
],
"description": "Operation success"
}

Response status code 400:


application/json

Response status code 500:


application/json

1.9.3.10 Host Link Status Query


Host link status query.

1.9.3.10.1 Query Host Link Status

Typical Scenarios
The host link status needs to be queried.

Functions
Query the host link status.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/query-host-status

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 447


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-328 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Host link -


NCE 1-329. status
entity.

Table 1-329 HostStatusRequest parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

hosts No ARRAY 1 items. For Host -


_REFER details, see information to
ENCE Table 1-330. be requested.

Table 1-330 RequestHostsEntity parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

host-id Yes string 1 to - Host ID. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65339"

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/query-host-status HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"hosts" : [
{
"host-id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265339"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 448


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 201: Demo Information

Table 1-331 header parameters


Param Type Value Range Defaul Description Example
eter t Value

X- string - - This field is the -


reques request ID
t-id number for
task tracking.
Format is
request_uuid-
timestamp-
hostname.

Response status code 400: Error response

Table 1-332 header parameters


Param Type Value Range Defaul Description Example
eter t Value

X- string - - This field is the -


reques request ID
t-id number for
task tracking.
Format is
request_uuid-
timestamp-
hostname.

Table 1-333 ErrorRsp parameters


Param Type Value Range Defaul Description Example
eter t Value

error_c string 8 to 36 - Error code. -


ode characters.

error_ string 2 to 512 - Description. -


msg characters.

Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 449


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 201: Demo Information
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
X-request-id:

Response status code 400: Error response


HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
X-request-id:

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4 Public Service

1.9.4.1 Controller Resource Preconfiguration


## Controller preconfiguration APIs

1.9.4.1.1 Preconfigure the Controller

Typical Scenarios
The controller needs to be installed by the preinstallation operator.

Functions
Preconfigure the controller.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/controller/dc/v3/common/preconfig

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 450


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
POST /controller/dc/v3/common/preconfig HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 201: successfully

Table 1-334 Result parameters


Param Type Value Range Defaul Description Example
eter t Value

result string 1 to 36 - Execution "Resources


characters. result. cannot be
deleted
because vni are
being
occupied."

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
Result parameters, For details, see Table 1-334.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"result" : "Resources cannot be deleted because vni are being occupied."
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 451


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive
{
"result" : "Resources cannot be deleted because vni are being occupied."
}

1.9.4.2 External Gateway Management


API for querying external gateways

1.9.4.2.1 Query an External Gateway

Typical Scenarios
An external gateway needs to be queried.

Functions
Query an external gateway.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/external-gateways/external-gateway/{id}

Table 1-335 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/publicservice/external-gateways/external-gateway/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 452


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-336 ExternalGatewayRestfulDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

extern ARRAY For details, see Table External -


alGate _REFER 1-337. gateway
way ENCE information.

Table 1-337 ExternalGatewayDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - External "DBB702C3-77


characters. gateway ID. 19-4FE6-
This field A5AD-3A9C9E2
cannot be 65309"
updated.

name string 1 to 255 - External "10"


characters. gateway name.
This field
cannot be
updated.

descrip string 0 to 255 - External "10"


tion characters. gateway
description.
This field
cannot be
updated.

gatew string 1 to 255 - External "Public"


ayType characters. gateway type,
which can be
Public or
Private. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 453


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

publicI array< - - Public IP ["10.1.1.0/24"]


ppool string> address pool of
an external
gateway.

service array< - - List of IP ["10.1.1.1"]


Ippool string> addresses
connected to
an external
gateway.

isTelco boolea - - Telco cloud false


Gatew n gateway. This
ay field cannot be
updated.

vrfNa string 1 to 255 - VRF. This field "extgw_vrf"


me characters. cannot be
updated.

isAllSh boolea - - Whether the true


ared n field is shared
by all tenants.
This field
cannot be
updated.

fabricC ARRAY For details, see Table Fabric, which -


onfigs _REFER 1-338. cannot be
ENCE updated.

service boolea - - Whether the true


IpDefa n public service
ultPoli IP address is
cy enabled. This
parameter
cannot be
updated.

preConf boolea - - Whether it is true


igured n pre-configured.
This parameter
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 454


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

interfa int32 - - Configured 1


ceType egress
interface type,
which cannot
be updated.

routeE int32 - - Route export 1


xportM mode, which
odel cannot be
updated.

vpnTar string 1 to 255 - Route target, "2:2000"


get characters. which cannot
be updated.

l3Vni int32 - - L3VNI, which 1


cannot be
updated.

default int64 [1-4294967295 - External -


Tag ] gateway tag
information.

default int32 [1-255] 60 Preference -


Prefere attribute of the
nce external
gateway.

fabricV string 1 to 255 - Fabric import "2:2000"


pnTarg characters. router, which
et cannot be
updated.

device ARRAY For details, see Table Device group. -


Groups _REFER 1-339. Devices in the
ENCE list must
belong to the
same device
group. If the
logical router
type is Normal,
the value of
this parameter
must be null.

type string 1 to 255 - External "l3-share-


characters. gateway type, export"
which cannot
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 455


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

additio REFER For details, see Table Additional -


nal ENCE 1-340. information
class.

Table 1-338 ExternalGatewayFabricDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 1 to 255 - ID, which "DBB702C3-77


characters. cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

fabricI string 1 to 255 - Fabric ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

fabricR string - - Fabric role. The "master"


ole value can be
master or
backup. This
parameter
cannot be
updated.

fabric string 0 to 255 - Fabric name. "fabricName"


Name characters. This field
cannot be
updated.

Table 1-339 ExternalGatewayDeviceGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 1 to 255 - ID, which "DBB702C3-77


characters. cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

fabricI string 1 to 255 - Fabric ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 456


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

fabric string 0 to 255 - Fabric name. "fabricName"


Name characters. This field
cannot be
updated.

device string 1 to 255 - Device group "DBB702C3-77


GroupI characters. ID, which 19-4FE6-
d cannot be A5AD-3A9C9E2
updated. 65309"

device string 0 to 255 - Device group "deviceGroupN


Group characters. name, which ame"
Name cannot be
updated.

deviceI string 0 to 256 - Device ID, "DBB702C3-77


d characters. which cannot 19-4FE6-
be updated. A5AD-3A9C9E2
65309"

device string 0 to 255 - Device name, "deviceName"


Name characters. which cannot
be updated.

Table 1-340 AdditionDto parameters

Param Type Value Range Defaul Description Example


eter t Value

produc string 0 to 36 - Producer. This "10"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2016-03-08T2


At characters. 0:19:41.000+00:
00"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 457


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

update string 0 to 255 - Update time. "2016-03-08T2


At characters. 0:19:41.000+00:
00"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalGateway" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"gatewayType" : "Public",
"publicIppool" : ["10.1.1.0/24"],
"serviceIppool" : ["10.1.1.1"],
"isTelcoGateway" : false,
"vrfName" : "extgw_vrf",
"isAllShared" : true,
"fabricConfigs" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"serviceIpDefaultPolicy" : true,
"preConfigured" : true,
"interfaceType" : 1,
"routeExportModel" : 1,
"vpnTarget" : "2:2000",
"l3Vni" : 1,
"fabricVpnTarget" : "2:2000",
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "deviceName"
}
],
"type" : "l3-share-export",
"additional" : {
"producer" : "10",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 458


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.2.2 Update an External Gateway

Typical Scenarios
An external gateway needs to be updated.

Functions
Update an external gateway based on conditions.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/publicservice/external-gateways/external-gateway/{id}

Table 1-341 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 459


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-342 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Parameters for -


er ENCE Table 1-343. updating an
external
gateway list.

Table 1-343 ExternalGatewayRestfulDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern Yes ARRAY For details, see External -


alGate _REFER Table 1-344. gateway
way ENCE information.

Table 1-344 ExternalGatewayDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac This field A5AD-3A9C9E2
ters. cannot be 65309"
updated.

name No string 1 to - External "10"


255 gateway name.
charac This field
ters. cannot be
updated.

descrip No string 0 to - External "10"


tion 255 gateway
charac description.
ters. This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 460


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

gatew No string 1 to - External "Public"


ayType 255 gateway type,
charac which can be
ters. Public or
Private. This
field cannot be
updated.

publicI No array< - - Public IP ["10.1.1.0/24"]


ppool string> address pool of
an external
gateway.

service No array< - - List of IP ["10.1.1.1"]


Ippool string> addresses
connected to
an external
gateway.

isTelco No boolea - - Telco cloud false


Gatew n gateway. This
ay field cannot be
updated.

vrfNa No string 1 to - VRF. This field "extgw_vrf"


me 255 cannot be
charac updated.
ters.

isAllSh No boolea - - Whether the true


ared n field is shared
by all tenants.
This field
cannot be
updated.

fabricC No ARRAY For details, see Fabric, which -


onfigs _REFER Table 1-345. cannot be
ENCE updated.

service No boolea - - Whether the true


IpDefa n public service
ultPoli IP address is
cy enabled. This
parameter
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 461


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

preConf No boolea - - Whether it is true


igured n pre-configured.
This parameter
cannot be
updated.

interfa No int32 - - Configured 1


ceType egress
interface type,
which cannot
be updated.

routeE No int32 - - Route export 1


xportM mode, which
odel cannot be
updated.

vpnTar No string 1 to - Route target, "2:2000"


get 255 which cannot
charac be updated.
ters.

l3Vni No int32 - - L3VNI, which 1


cannot be
updated.

default No int64 [1-429 - External -


Tag 49672 gateway tag
95] information.

default No int32 [1-255 60 Preference -


Prefere ] attribute of the
nce external
gateway.

fabricV No string 1 to - Fabric import "2:2000"


pnTarg 255 router, which
et charac cannot be
ters. updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 462


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No ARRAY For details, see Device group. -


Groups _REFER Table 1-346. Devices in the
ENCE list must
belong to the
same device
group. If the
logical router
type is Normal,
the value of
this parameter
must be null.

type No string 1 to - External "l3-share-


255 gateway type, export"
charac which cannot
ters. be updated.

additio No REFER For details, see Additional -


nal ENCE Table 1-347. information
class.

Table 1-345 ExternalGatewayFabricDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 1 to - ID, which "DBB702C3-77


255 cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

fabricI No string 1 to - Fabric ID. This "DBB702C3-77


d 255 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

fabricR No string - - Fabric role. The "master"


ole value can be
master or
backup. This
parameter
cannot be
updated.

fabric No string 0 to - Fabric name. "fabricName"


Name 255 This field
charac cannot be
ters. updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 463


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-346 ExternalGatewayDeviceGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 1 to - ID, which "DBB702C3-77


255 cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

fabricI No string 1 to - Fabric ID. This "DBB702C3-77


d 255 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

fabric No string 0 to - Fabric name. "fabricName"


Name 255 This field
charac cannot be
ters. updated.

device No string 1 to - Device group "DBB702C3-77


GroupI 255 ID, which 19-4FE6-
d charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

device No string 0 to - Device group "deviceGroupN


Group 255 name, which ame"
Name charac cannot be
ters. updated.

deviceI No string 0 to - Device ID, "DBB702C3-77


d 256 which cannot 19-4FE6-
charac be updated. A5AD-3A9C9E2
ters. 65309"

device No string 0 to - Device name, "deviceName"


Name 255 which cannot
charac be updated.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 464


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-347 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "10"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2016-03-08T2


At 255 0:19:41.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-03-08T2


At 255 0:19:41.000+00:
charac 00"
ters.

Sample Request
HTTP
PUT /controller/dc/v3/publicservice/external-gateways/external-gateway/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"externalGateway" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"gatewayType" : "Public",
"publicIppool" : ["10.1.1.0/24"],
"serviceIppool" : ["10.1.1.1"],
"isTelcoGateway" : false,
"vrfName" : "extgw_vrf",
"isAllShared" : true,
"fabricConfigs" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 465


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"serviceIpDefaultPolicy" : true,
"preConfigured" : true,
"interfaceType" : 1,
"routeExportModel" : 1,
"vpnTarget" : "2:2000",
"l3Vni" : 1,
"fabricVpnTarget" : "2:2000",
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "deviceName"
}
],
"type" : "l3-share-export",
"additional" : {
"producer" : "10",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: successfully
ExternalGatewayRestfulDtoWrapper parameters, For details, see Table 1-336.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalGateway" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"gatewayType" : "Public",
"publicIppool" : ["10.1.1.0/24"],
"serviceIppool" : ["10.1.1.1"],
"isTelcoGateway" : false,
"vrfName" : "extgw_vrf",
"isAllShared" : true,
"fabricConfigs" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 466


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"serviceIpDefaultPolicy" : true,
"preConfigured" : true,
"interfaceType" : 1,
"routeExportModel" : 1,
"vpnTarget" : "2:2000",
"l3Vni" : 1,
"fabricVpnTarget" : "2:2000",
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "deviceName"
}
],
"type" : "l3-share-export",
"additional" : {
"producer" : "10",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.2.3 Delete an External Gateway and Related Interconnection Interfaces

Typical Scenarios
An external gateway and related interconnection interfaces need to be deleted.

Functions
Delete an external gateway and related interconnection interfaces.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 467


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/publicservice/external-gateways/external-gateway/{id}

Table 1-348 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/publicservice/external-gateways/external-gateway/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 468


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.2.4 Query an External Gateway

Typical Scenarios
External gateways need to be queried.

Functions
Query external gateways.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/publicservice/external-gateways/access-external-gateway

Table 1-349 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 469


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-350 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Filter criteria -


er ENCE Table 1-351. for querying
external
gateways.

Table 1-351 AccessExternalGatewayDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac This field A5AD-3A9C9E2
ters. cannot be 65309"
updated.

name No string - - External -


gateway name.
This field
cannot be
updated.

fabricI No string 1 to - External "DBB702C3-77


ds 6044 gateway name. 19-4FE6-
charac This field A5AD-3A9C9E2
ters. cannot be 65309"
updated.

gatew No string - - External -


ayType gateway type.
The value can
be Route(0),
L2SharePort(1)
,
L3SharePort(2)
,
L3Monopolize(
3),
L3ShareExport(
4), or
DynamicRoute
Export(5).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 470


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

protect No ● Sing - Protection -


Type le type.
● Mas
terS
lave

Sample Request
HTTP
POST /controller/dc/v3/publicservice/external-gateways/access-external-gateway?pageIndex=1&pageSize=1
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricIds" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}

Response Parameters
Response status code 200: successfully

Table 1-352 ExternalGatewayPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

extern ARRAY For details, see Table External -


alGate _REFER 1-337. gateway
way ENCE information.

totalN int64 1 to - Number of 1


um 2147483647 returned data
characters. records.

pageIn int32 1 to - Page index. 1


dex 2147483647
characters.

pageSi int32 1 to - Page size. 1


ze 2147483647
characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 471


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalGateway" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"gatewayType" : "Public",
"publicIppool" : ["10.1.1.0/24"],
"serviceIppool" : ["10.1.1.1"],
"isTelcoGateway" : false,
"vrfName" : "extgw_vrf",
"isAllShared" : true,
"fabricConfigs" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"serviceIpDefaultPolicy" : true,
"preConfigured" : true,
"interfaceType" : 1,
"routeExportModel" : 1,
"vpnTarget" : "2:2000",
"l3Vni" : 1,
"fabricVpnTarget" : "2:2000",
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "deviceName"
}
],
"type" : "l3-share-export",
"additional" : {
"producer" : "10",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
],
"totalNum" : 1,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 472


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.2.5 Query External Gateways

Typical Scenarios
External gateways need to be queried.

Functions
Query external networks based on conditions. Data can be displayed in pages.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/external-gateways

Table 1-353 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 473


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v3/publicservice/external-gateways?pageIndex=1&pageSize=1 HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully
ExternalGatewayPagedDtoWrapper parameters, For details, see Table 1-352.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalGateway" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"gatewayType" : "Public",
"publicIppool" : ["10.1.1.0/24"],
"serviceIppool" : ["10.1.1.1"],
"isTelcoGateway" : false,
"vrfName" : "extgw_vrf",
"isAllShared" : true,
"fabricConfigs" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"serviceIpDefaultPolicy" : true,
"preConfigured" : true,
"interfaceType" : 1,
"routeExportModel" : 1,
"vpnTarget" : "2:2000",
"l3Vni" : 1,
"fabricVpnTarget" : "2:2000",
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "deviceName"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 474


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"type" : "l3-share-export",
"additional" : {
"producer" : "10",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
],
"totalNum" : 1,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.2.6 Update the public IP usage status of an external gateway.

Typical Scenarios
The public IP usage status of an external gateway needs to be updated.

Functions
Update the public IP usage status of an external gateway.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/publicservice/external-gateways/external-gateway/{id}/public-ip

Table 1-354 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 475


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-355 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Logical -


NCE 1-356. port
configurat
ion.

Table 1-356 ExternalGatewayPublicIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern Yes string 0 to - External "CEB702C3-771


alGate 256 gateway ID. 9-4FE6-
wayId charac This field A5AD-3A9C9E2
ters. cannot be 65309"
updated.

publicI Yes string 1 to - Public IP "10.23.15.0/24"


p 255 address.
charac
ters.

isUsed Yes boolea - - Flag bit false


n (occupied/
released).

produc Yes string 0 to - Operator. "10"


er 255
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/publicservice/external-gateways/external-gateway/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309/public-ip HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"externalGatewayId" : "CEB702C3-7719-4FE6-A5AD-3A9C9E265309",
"publicIp" : "10.23.15.0/24",
"isUsed" : false,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 476


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"producer" : "10"
}

Response Parameters
Response status code 200: successfully

Table 1-357 ExternalGatewayPublicIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

extern string 0 to 256 - External "CEB702C3-771


alGate characters. gateway ID. 9-4FE6-
wayId This field A5AD-3A9C9E2
cannot be 65309"
updated.

publicI string 1 to 255 - Public IP "10.23.15.0/24"


p characters. address.

isUsed boolea - - Flag bit false


n (occupied/
released).

produc string 0 to 255 - Operator. "10"


er characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalGatewayId" : "CEB702C3-7719-4FE6-A5AD-3A9C9E265309",
"publicIp" : "10.23.15.0/24",
"isUsed" : false,
"producer" : "10"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 477


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.4.2.7 Query an External Gateway and Related Interconnection Interfaces

Typical Scenarios
An external gateway and related interconnection interfaces need to be queried.

Functions
Query an external gateway and related interconnection interfaces.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/external-gateways/easy-external-gateways

Table 1-358 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

name No string 0 to - Name of an "10"


255 external
charac gateway.
ters.

id No string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 478


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

type No string - - External "4"


gateway type.
The options are
as follows: 3:
Layer 3
exclusive
egress 4: Layer
3 shared egress
5: Dynamic
route egress

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/publicservice/external-gateways/easy-external-gateways?
pageIndex=1&pageSize=1&name=10&id=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&type=4 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-359 EasyExtGwConnectIfPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

extern ARRAY For details, see Table Information -


alGate _REFER 1-360. about the
way ENCE external
gateway and
interconnection
interface.

totalN int32 1 to - Number of 1


um 2147483647 returned data
characters. records.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 479


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

pageIn int32 1 to - Page index. 1


dex 2147483647
characters.

pageSi int32 1 to - Page size. 1


ze 2147483647
characters.

Table 1-360 QueryEasyExtGwConnectIfDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - External "DBB702C3-77


characters. gateway ID. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 255 - External "10"


characters. gateway name.

descrip string 0 to 255 - Description of "10"


tion characters. the external
gateway.

gatew int32 - - External 4


ayType gateway type.
The options are
as follows: 3:
Layer 3
exclusive
egress 4: Layer
3 shared egress
5: Dynamic
route egress

publicI array< - - Public IP ["192.168.1.0/2


pPool string> address. 4"]

service array< - - Public service ["192.168.1.0/2


IpPool string> IP address. 4"]

isTelco boolea - - Telco cloud false


Gatew n gateway.
ay

vrfNa string 1 to 255 - VRF. "extgw_vrf"


me characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 480


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

enable boolea - - Whether to true


Escape n enable the
bypass link.

escape string - - IP type of the "Unknown"


IpVersi bypass link.
on The value can
be Ipv4, Ipv6,
or Unknown. If
this parameter
is not set, the
value Unknown
is used.

isAllSh boolea - - Whether the false


ared n external
gateway is
shared by all
tenants.

fabricC ARRAY For details, see Table fabric. -


onfigs _REFER 1-338.
ENCE

service boolea - - Whether to false


IpDefa n bypass the
ultPoli public service
cy IP address of
the cloud
network.

preConf boolea - - Whether to false


igured n perform
preconfiguratio
n.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 481


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

interfa int32 - - Whether an 1


ceType outbound
interface is
configured. The
value 0
indicates that
no outbound
interface is
configured. The
value 1
indicates that
an outbound
interface is
configured.

routeE int32 - - Route export 1


xportM mode.
odel

vpnTar string 1 to 255 - Route target. "2:2000"


get characters.

l3Vni int32 - - Layer 3 VNI. 1

default int64 [1-4294967295 - Tag of the -


Tag ] external
gateway.

default int32 - - Default -


Prefere preference.
nce

device ARRAY For details, see Table Device group. -


Groups _REFER 1-361. The devices in
ENCE the list must
belong to the
same device
group.

type string 1 to 255 - External "l3-share-


characters. gateway type. export"
This field
cannot be
updated.

additio REFER For details, see Table Additional -


nal ENCE 1-340. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 482


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

connec ARRAY For details, see Table Interconnection -


tInterf _REFER 1-362. interface.
aces ENCE

Table 1-361 QueryEasyDeviceGroupDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 1 to 255 - Identifier. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabricI string 1 to 255 - Fabric ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabric string 0 to 255 - Fabric name. "fabricName"


Name characters.

device string 1 to 255 - Device group "DBB702C3-77


GroupI characters. ID. 19-4FE6-
d A5AD-3A9C9E2
65309"

device string 0 to 255 - Device group "deviceGroupN


Group characters. name. ame"
Name

deviceI string 1 to 255 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

device string 0 to 255 - Device name. "deviceName"


Name characters.

Table 1-362 EasyConnectInterfaceDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - External "DBB702C3-77


characters. gateway ID. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 483


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

name string 1 to 255 - Name of an "10"


characters. interconnection
interface.

descrip string 0 to 255 - Description of "10"


tion characters. the
interconnection
interface.

vlanId int32 [0-4094] - ID of the VLAN 10


allowed by the
subnet. If the
value is 0, the
encapsulation
type is untag. If
the value is in
the range from
2 to 4094, the
encapsulation
type is Dot1q.

routeIn boolea - - Whether the false


terface n routed
interface is
used.

subInt int32 [1-4094] - Sub-interface 2000


erface number.
Numb
er

connec ARRAY For details, see Table Interface IP -


tionIps _REFER 1-363. address.
ENCE

connec ARRAY For details, see Table Port list. -


tDevic _REFER 1-364.
es ENCE

Table 1-363 EasyConnectionIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

localIp string 1 to 255 - Local IP "192.168.10.1/2


characters. address. 4"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 484


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peerIp string 1 to 255 - Peer IP "192.168.10.2/2


characters. address. 4"

Table 1-364 EasyConnectionDeviceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

fabricI string 0 to 256 - Fabric ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabric string 1 to 128 - Fabric name. "theFabric"


Name characters.

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID. 19-4FE6-
d A5AD-3A9C9E2
65309"

device string 1 to 128 - Device group "theFabric"


Group characters. name,
Name

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

device string 1 to 255 - Device name. "CE_45"


Name characters.

portNa string 0 to 255 - Port name. "10GE1/0/1"


me characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 485


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Connection: keep-alive
{
"externalGateway" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"gatewayType" : 4,
"publicIpPool" : ["192.168.1.0/24"],
"serviceIpPool" : ["192.168.1.0/24"],
"isTelcoGateway" : false,
"vrfName" : "extgw_vrf",
"enableEscape" : true,
"escapeIpVersion" : "Unknown",
"isAllShared" : false,
"fabricConfigs" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"serviceIpDefaultPolicy" : false,
"preConfigured" : false,
"interfaceType" : 1,
"routeExportModel" : 1,
"vpnTarget" : "2:2000",
"l3Vni" : 1,
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "deviceName"
}
],
"type" : "l3-share-export",
"additional" : {
"producer" : "10",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
},
"connectInterfaces" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"vlanId" : 10,
"routeInterface" : false,
"subInterfaceNumber" : 2000,
"connectionIps" : [
{
"localIp" : "192.168.10.1/24",
"peerIp" : "192.168.10.2/24"
}
],
"connectDevices" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "theFabric",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "theFabric",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portName" : "10GE1/0/1"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 486


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}
]
}
],
"totalNum" : 1,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.2.8 Create an External Gateway and Related Interconnection Interfaces


(Invoked in Easy Network Deployment Mode)

Typical Scenarios
The API needs to be invoked in easy network deployment mode, which can be
used to create an external gateway and related interconnection interfaces.

Functions
Create an external gateway and related interconnection interfaces.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/publicservice/external-gateways/easy-external-gateway

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 487


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-365 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-366. s of the
external
gateway
and
interconn
ected
interfaces.

Table 1-366 EasyExtGwConnectIfDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern No REFER For details, see Parameters of -


alGate ENCE Table 1-367. the external
way gateway and
interconnected
interfaces.

Table 1-367 EasyExtGwConnectIfDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

name Yes string 1 to - Name of an "10"


255 external
charac gateway.
ters.

descrip No string 0 to - Description of "10"


tion 255 the external
charac gateway.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 488


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

type No int32 - - External 4


gateway type.
Only types of
Layer 3 shared
egress and
dynamic route
egress are
supported.

vrfNa No string 1 to - VRF name. "extgw_vrf"


me 255
charac
ters.

service No array< - - Public service ["192.168.1.0/2


IpPool string> IP address. 4"]

publicI No array< - - Public IP ["192.168.1.0/2


pPool string> address. 4"]

routeT No int64 [1-429 - External -


ag 49672 gateway tag
95] information.

routeP No int32 [1-255 60 Preference -


referen ] attribute of the
ce external
gateway.

staticR No boolea - - Egress route true


outeAu n generated
to based on the
public service
IP address.

fabrics No ARRAY For details, see Fabric. -


_REFER Table 1-345.
ENCE

isTelco No boolea - - Telco cloud false


Gatew n gateway.
ay

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 489


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

interfa No int32 - - Outbound 1


ceType interface mode.
0: No
outbound
interface is
configured. 1:
An outbound
interface is
configured.

enable No boolea - - Whether the true


Escape n best-effort
path is
enabled.

escape No string - - IP address type "Unknown"


IpVersi of the best-
on effort path.
The value can
be Ipv4, Ipv6,
or Unknown. If
this parameter
is left empty,
Unknown is
used. This field
can be
updated.

device No ARRAY For details, see Device group. -


Groups _REFER Table 1-368. Devices in the
ENCE list must
belong to the
same device
group. If the
logical router
type is Normal,
the value of
this parameter
must be null.

vpnTar No string 1 to - Route target. "2:2000"


get 255
charac
ters.

l3Vni No int32 - - Layer 3 VNI. 1

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 490


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vniAllo No string 1 to 32 - VNI allocation "Automatic"


cType charac mode.
ters. Automatic:
automatic
allocation;
Manual:
manual
allocation.

fabricI No string 1 to - Fabric import "2:2000"


mport 255 RT.
Rt charac
ters.

publicI No int32 - - Return route. 0: -


pRoute Host route; 1:
Mode Network
segment route.

connec No ARRAY For details, see Interconnection -


tInterf _REFER Table 1-369. interface.
aces ENCE

Table 1-368 EasyDeviceGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 1 to - ID. "DBB702C3-77


255 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

fabricI No string 1 to - Fabric ID. "DBB702C3-77


d 255 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

fabric No string 0 to - Fabric name. "fabricName"


Name 255
charac
ters.

device No string 1 to - Device group "DBB702C3-77


GroupI 255 ID. 19-4FE6-
d charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 491


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No string 0 to - Device group "deviceGroupN


Group 255 name. ame"
Name charac
ters.

Table 1-369 EasyConnectInterfaceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - External "DBB702C3-77


256 gateway ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

name Yes string 1 to - Name of an "10"


255 interconnection
charac interface.
ters.

descrip No string 0 to - Description of "10"


tion 255 the
charac interconnection
ters. interface.

vlanId No int32 [0-409 - ID of the VLAN 10


4] allowed by the
subnet. If the
value is 0, the
encapsulation
type is untag. If
the value is in
the range from
2 to 4094, the
encapsulation
type is Dot1q.

routeIn No boolea - - Whether the false


terface n routed
interface is
used.

subInt No int32 [1-409 - Sub-interface 2000


erface 4] number.
Numb
er

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 492


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

connec Yes ARRAY For details, see Interface IP -


tionIps _REFER Table 1-370. address.
ENCE

connec Yes ARRAY For details, see Port list. -


tDevic _REFER Table 1-371.
es ENCE

Table 1-370 EasyConnectionIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

localIp Yes string 1 to - Local IP "192.168.10.1/2


255 address. 4"
charac
ters.

peerIp Yes string 1 to - Peer IP "192.168.10.2/2


255 address. 4"
charac
ters.

Table 1-371 EasyConnectionDeviceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

fabricI No string 0 to - Fabric ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

fabric No string 1 to - Fabric name. "theFabric"


Name 128
charac
ters.

device No string 0 to - Device group "DBB702C3-77


GroupI 256 ID. 19-4FE6-
d charac A5AD-3A9C9E2
ters. 65309"

device No string 1 to - Device group "theFabric"


Group 128 name,
Name charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 493


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to - Device ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

device No string 1 to - Device name. "CE_45"


Name 255
charac
ters.

portNa Yes string 0 to - Port name. "10GE1/0/1"


me 255
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/publicservice/external-gateways/easy-external-gateway HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"externalGateway" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"type" : 4,
"vrfName" : "extgw_vrf",
"serviceIpPool" : ["192.168.1.0/24"],
"publicIpPool" : ["192.168.1.0/24"],
"staticRouteAuto" : true,
"fabrics" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName"
}
],
"isTelcoGateway" : false,
"interfaceType" : 1,
"enableEscape" : true,
"escapeIpVersion" : "Unknown",
"deviceGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabricName",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName"
}
],
"vpnTarget" : "2:2000",
"l3Vni" : 1,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 494


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vniAllocType" : "Automatic",
"fabricImportRt" : "2:2000",
"connectInterfaces" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"description" : "10",
"vlanId" : 10,
"routeInterface" : false,
"subInterfaceNumber" : 2000,
"connectionIps" : [
{
"localIp" : "192.168.10.1/24",
"peerIp" : "192.168.10.2/24"
}
],
"connectDevices" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "theFabric",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "theFabric",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portName" : "10GE1/0/1"
}
]
}
]
}
}

Response Parameters
Response status code 201: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.3 Routing Policy


# Route policy operation APIs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 495


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.4.3.1 Create a Routing Policy

Typical Scenarios
A routing policy needs to be created.

Functions
Create a routing policy.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/routePolicy/{router_id}/add_route_policy

Table 1-372 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router_ Yes uuid - - Router ID. "ff000000-


id ff00-0000-
abce-00000000
0001"

Request Parameters

Table 1-373 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routeP Yes REFER For details, see Parameters for -


olicyDt ENCE Table 1-374. creating a
oWrap routing policy.
per

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 496


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-374 RoutePolicyDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routeP Yes ARRAY 0-255 items. For Routing policy. -


olicys _REFER details, see
ENCE Table 1-375.

Table 1-375 RoutePolicyDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

peer_r Yes string 0 to 36 - Peer router ID. "b1bcd3d8-2f0


outer_i charac 2-4d05-8283-
d ters. ff87ae962224"

peer_fi Yes array< 0-255 - Peer filter "["192.168.199.


lter_cid string> items. CIDR. 0/24"]"
rs Each
item
has 0
to 255
charac
ters.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/routePolicy/ff000000-ff00-0000-abce-000000000001/add_route_policy
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routePolicys" : [
{
"peer_router_id" : "b1bcd3d8-2f02-4d05-8283-ff87ae962224",
"peer_filter_cidrs" : "["192.168.199.0/24"]"
}
]
}

Response Parameters
Response status code 201: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 497


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-376 RoutePolicyDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

routeP ARRAY 0-255 items. For details, Routing policy. -


olicys _REFER see Table 1-377.
ENCE

Table 1-377 RoutePolicyDto parameters


Param Type Value Range Defaul Description Example
eter t Value

peer_r string 0 to 36 - Peer router ID. "b1bcd3d8-2f0


outer_i characters. 2-4d05-8283-
d ff87ae962224"

peer_fi array< 0-255 items. - Peer filter "["192.168.199.


lter_cid string> Each item has 0 CIDR. 0/24"]"
rs to 255
characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routePolicys" : [
{
"peer_router_id" : "b1bcd3d8-2f02-4d05-8283-ff87ae962224",
"peer_filter_cidrs" : "["192.168.199.0/24"]"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 498


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.3.2 Delete a Routing Policy by Router ID

Typical Scenarios
Query a VPC Connection by ID.

Functions
Delete a routing policy by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/routePolicy/{router_id}/delete_route_policy

Table 1-378 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router_ Yes uuid - - Router ID. "ff000000-


id ff00-0000-
abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 499


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-379 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routeP Yes REFER For details, see Parameters for -


olicyDt ENCE Table 1-374. deleting a
oWrap routing policy.
per

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/routePolicy/ff000000-ff00-0000-abce-000000000001/
delete_route_policy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routePolicys" : [
{
"peer_router_id" : "b1bcd3d8-2f02-4d05-8283-ff87ae962224",
"peer_filter_cidrs" : "["192.168.199.0/24"]"
}
]
}

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 500


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.3.3 Query a Routing Policy by Router ID

Typical Scenarios
A routing policy needs to be queried by router ID.

Functions
Query a routing policy by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/routePolicy/{router_id}/query_route_policy

Table 1-380 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router_ Yes uuid - - Router ID. "ff000000-


id ff00-0000-
abce-00000000
0001"

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 501


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/routePolicy/ff000000-ff00-0000-abce-000000000001/query_route_policy
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-381 RoutePolicyQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

routeP ARRAY 0-255 items. For details, Routing policy. -


olicys _REFER see Table 1-377.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routePolicys" : [
{
"peer_router_id" : "b1bcd3d8-2f02-4d05-8283-ff87ae962224",
"peer_filter_cidrs" : "["192.168.199.0/24"]"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 502


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.3.4 Update a Routing Policy by Router ID

Typical Scenarios
A routing policy needs to be updated by router ID.

Functions
Update a routing policy by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routePolicy/{router_id}/update_route_policy

Table 1-382 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router_ Yes uuid - - Router ID. "ff000000-


id ff00-0000-
abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 503


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-383 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routeP Yes REFER For details, see Routing policy -


olicyDt ENCE Table 1-374. entity to be
oWrap updated.
per

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routePolicy/ff000000-ff00-0000-abce-000000000001/update_route_policy
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routePolicys" : [
{
"peer_router_id" : "b1bcd3d8-2f02-4d05-8283-ff87ae962224",
"peer_filter_cidrs" : "["192.168.199.0/24"]"
}
]
}

Response Parameters
Response status code 200: Response status code 201: OK.
RoutePolicyDtoWrapper parameters, For details, see Table 1-376.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 504


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"routePolicys" : [
{
"peer_router_id" : "b1bcd3d8-2f02-4d05-8283-ff87ae962224",
"peer_filter_cidrs" : "["192.168.199.0/24"]"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.3.5 NFVI Routing Policy

Query NFVI Routing Policies

Typical Scenarios
Routing policies need to be queried.

Functions
Query a routing policy.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/nfvi/routepolicy

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 505


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/nfvi/routepolicy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-384 NfviRoutePolicyRestfulDto parameters

Param Type Value Range Defaul Description Example


eter t Value

loadBa int32 - 32 Number of 32


lanceN load balancing
um entries.

loadBa int64 - - Load balancing 82345


lanceT flag.
ag

bfdInte int32 - - BFD detection 300


rval interval.

bfdMul int32 - - BFD detection 6


tiplier multiplier.

nqaInt int32 - - NQA detection 200


erval interval.

directR int64 - - Direct route 82348


outeTa flag.
g

evpnSu int64 - - EVPN 82346


ppressi suppression
onTag flag.

ebgpR int64 - - EBGP peer 82456


outeTa route label.
g

bestEff string 0 to 200 - Bypass path "besteffortpath


ortPat characters. routing policy. rtp"
hRtp

dciExp string 0 to 200 - DCI export "dciexportrtp"


ortRtp characters. routing policy

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 506


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

dciImp string 0 to 200 - DCI import "dciimportrtp"


ortRtp characters. routing policy

dciDye string 0 to 200 - DCI colored "dcidyeingrtp"


ingRtp characters. routing policy

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"loadBalanceNum" : 32,
"loadBalanceTag" : 82345,
"bfdInterval" : 300,
"bfdMultiplier" : 6,
"nqaInterval" : 200,
"directRouteTag" : 82348,
"evpnSuppressionTag" : 82346,
"ebgpRouteTag" : 82456,
"bestEffortPathRtp" : "besteffortpathrtp",
"dciExportRtp" : "dciexportrtp",
"dciImportRtp" : "dciimportrtp",
"dciDyeingRtp" : "dcidyeingrtp"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Update NFVI Routing Policies

Typical Scenarios
A routing policy needs to be updated.

Functions
Update a routing policy.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 507


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/physicalnetwork/fabricresource/nfvi/routepolicy

Request Parameters

Table 1-385 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-386. paramete
r.

Table 1-386 NfviRoutePolicyRestfulDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

loadBa Yes int32 - 32 Number of 32


lanceN load balancing
um entries.

loadBa Yes int64 - - Load balancing 82345


lanceT flag.
ag

bfdInte Yes int32 - - BFD detection 300


rval interval.

bfdMul Yes int32 - - BFD detection 6


tiplier multiplier.

nqaInt Yes int32 - - NQA detection 200


erval interval.

directR Yes int64 - - Direct route 82348


outeTa flag.
g

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 508


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

evpnSu Yes int64 - - EVPN 82346


ppressi suppression
onTag flag.

ebgpR Yes int64 - - EBGP peer 82456


outeTa route label.
g

bestEff No string 0 to - Bypass path "besteffortpath


ortPat 200 routing policy. rtp"
hRtp charac
ters.

dciExp No string 0 to - DCI export "dciexportrtp"


ortRtp 200 routing policy
charac
ters.

dciImp No string 0 to - DCI import "dciimportrtp"


ortRtp 200 routing policy
charac
ters.

dciDye No string 0 to - DCI colored "dcidyeingrtp"


ingRtp 200 routing policy
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/physicalnetwork/fabricresource/nfvi/routepolicy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"loadBalanceNum" : 32,
"loadBalanceTag" : 82345,
"bfdInterval" : 300,
"bfdMultiplier" : 6,
"nqaInterval" : 200,
"directRouteTag" : 82348,
"evpnSuppressionTag" : 82346,
"ebgpRouteTag" : 82456,
"bestEffortPathRtp" : "besteffortpathrtp",
"dciExportRtp" : "dciexportrtp",
"dciImportRtp" : "dciimportrtp",
"dciDyeingRtp" : "dcidyeingrtp"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 509


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

NfviRoutePolicyRestfulDto parameters, For details, see Table 1-384.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"loadBalanceNum" : 32,
"loadBalanceTag" : 82345,
"bfdInterval" : 300,
"bfdMultiplier" : 6,
"nqaInterval" : 200,
"directRouteTag" : 82348,
"evpnSuppressionTag" : 82346,
"ebgpRouteTag" : 82456,
"bestEffortPathRtp" : "besteffortpathrtp",
"dciExportRtp" : "dciexportrtp",
"dciImportRtp" : "dciimportrtp",
"dciDyeingRtp" : "dcidyeingrtp"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4 BFD System Configuration Management


BFD API description:

1. Add, delete, modify, and query the BFD system configuration.

2. Add and delete the device group applied in the BFD system.

1.9.4.4.1 Create BFD System Configuration

Typical Scenarios
BFD system configuration needs to be created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 510


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Create BFD system configuration to enable the BFD feature for specified devices in
the fabric.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds

Request Parameters

Table 1-387 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-388. paramete
r model
class for
creating
BFD
system
configurat
ion.

Table 1-388 BfdSystemDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

bfd Yes ARRAY For details, see "" -


_REFER Table 1-389.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 511


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-389 BfdSystemDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - Object ID. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

name No string 1 to - BFD session "bfd1"


255 name, which
charac contains only
ters. digits,
uppercase and
lowercase
letters, and
underscores
(_). This
parameter can
be updated.

descrip No string 0 to - Description. "This is for


tion 255 The value can tenant1."
charac be changed.
ters.

device No REFER For details, see "" -


Group ENCE Table 1-390.

delayU No int32 [0-600 0 Delay for a 200


pTimer ] BFD session to
go Up. The
default value is
0, indicating
that the BFD
session is
disabled. This
parameter can
be updated.

initWai No int32 [1-360 2000 First BFD 2000


tTime 0000] session
suppression
time, in
milliseconds.
The default
value is 2000
ms. This
parameter can
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 512


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

maxW No int32 [1-360 12000 Maximum BFD 12000


aitTim 0000] session
e suppression
time, in
milliseconds.
The default
value is 12,000
ms. This
parameter can
be updated.

second No int32 [1-360 5000 Second BFD 5000


WaitTi 0000] session
me suppression
time, in
milliseconds.
The default
value is 5000
ms. This
parameter can
be updated.

linkBu No int32 [6000- 16000 First BFD link- 16000


ndleIni 36000 bundle session
tTime 00] suppression
time, in
milliseconds.
The default
value is 16,000
ms. This
parameter can
be updated.

linkBu No int32 [20000 600000 Maximum BFD 600000


ndleM -36000 link-bundle
axTime 00] session
suppression
time, in
milliseconds.
The default
value is
600,000 ms.
This parameter
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 513


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

linkBu No int32 [10000 20000 Second BFD 20000


ndleSe -36000 link-bundle
condTi 00] session
me suppression
time, in
milliseconds.
The default
value is 20,000
ms. This
parameter can
be updated.

linkBu No boolea - false Whether only false


ndleL3 n the main BFD
Mode link-bundle
session
flapping is
suppressed.
This parameter
can be
updated.

deliver No int32 - 2 Delivery status. 2


State 1: Ongoing. 2:
Delivered. This
parameter is
read-only.

Table 1-390 BfdSystemDevGrpDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

fabricI No string 0 to - Fabric ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

fabric No string 0 to - Fabric name, "fabric1"


Name 255 which is read-
charac only.
ters.

device Yes ARRAY For details, see "" -


Group _REFER Table 1-391.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 514


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-391 BfdSystemDevGrpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes string 0 to - Device group "DBB702C3-77


GroupI 256 ID. 19-4FE6-
d charac A5AD-3A9C9E2
ters. 65309"

device No string 0 to - Name of the "CE6881"


Group 255 device group
Name charac where BFD is
ters. deployed. This
parameter is
read-only.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/fabricresource/bfds HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"bfd" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"deviceGroup" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
},
"delayUpTimer" : 200,
"initWaitTime" : 2000,
"maxWaitTime" : 12000,
"secondWaitTime" : 5000,
"linkBundleInitTime" : 16000,
"linkBundleMaxTime" : 600000,
"linkBundleSecondTime" : 20000,
"linkBundleL3Mode" : false,
"deliverState" : 2
}
]
}

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 515


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4.2 Query the BFD System Configuration List

Typical Scenarios
The BFD system configuration list needs to be queried.

Functions
Query the BFD system configuration list by condition.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 516


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-392 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string [1-214 - Page index. "1"


dex 74836
47]

pageSi No string [1-400 - Page size. "1"


ze 0]

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/physicalnetwork/fabricresource/bfds?pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-393 BfdSystemPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

bfd ARRAY For details, see Table "" -


_REFER 1-394.
ENCE

totalN int64 [1-1000] - Total number 10


um of BFD
configuration
items queried,
which is read-
only.

pageIn int32 [1-2147483647 - Page index. 10


dex ]

pageSi int32 [1-4000] - Page size. 10


ze

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 517


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-394 BfdSystemDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 255 - BFD session "bfd1"


characters. name, which
contains only
digits,
uppercase and
lowercase
letters, and
underscores
(_). This
parameter can
be updated.

descrip string 0 to 255 - Description. "This is for


tion characters. The value can tenant1."
be changed.

device REFER For details, see Table "" -


Group ENCE 1-395.

delayU int32 [0-600] 0 Delay for a 200


pTimer BFD session to
go Up. The
default value is
0, indicating
that the BFD
session is
disabled. This
parameter can
be updated.

initWai int32 [1-3600000] 2000 First BFD 2000


tTime session
suppression
time, in
milliseconds.
The default
value is 2000
ms. This
parameter can
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 518


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

maxW int32 [1-3600000] 12000 Maximum BFD 12000


aitTim session
e suppression
time, in
milliseconds.
The default
value is 12,000
ms. This
parameter can
be updated.

second int32 [1-3600000] 5000 Second BFD 5000


WaitTi session
me suppression
time, in
milliseconds.
The default
value is 5000
ms. This
parameter can
be updated.

linkBu int32 [6000-3600000 16000 First BFD link- 16000


ndleIni ] bundle session
tTime suppression
time, in
milliseconds.
The default
value is 16,000
ms. This
parameter can
be updated.

linkBu int32 [20000-360000 600000 Maximum BFD 600000


ndleM 0] link-bundle
axTime session
suppression
time, in
milliseconds.
The default
value is
600,000 ms.
This parameter
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 519


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

linkBu int32 [10000-360000 20000 Second BFD 20000


ndleSe 0] link-bundle
condTi session
me suppression
time, in
milliseconds.
The default
value is 20,000
ms. This
parameter can
be updated.

linkBu boolea - false Whether only false


ndleL3 n the main BFD
Mode link-bundle
session
flapping is
suppressed.
This parameter
can be
updated.

deliver int32 - 2 Delivery status. 2


State 1: Ongoing. 2:
Delivered. This
parameter is
read-only.

Table 1-395 BfdSystemDevGrpDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

fabricI string 0 to 256 - Fabric ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabric string 0 to 255 - Fabric name, "fabric1"


Name characters. which is read-
only.

device ARRAY For details, see Table "" -


Group _REFER 1-396.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 520


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-396 BfdSystemDevGrpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID. 19-4FE6-
d A5AD-3A9C9E2
65309"

device string 0 to 255 - Name of the "CE6881"


Group characters. device group
Name where BFD is
deployed. This
parameter is
read-only.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"bfd" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"deviceGroup" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
},
"delayUpTimer" : 200,
"initWaitTime" : 2000,
"maxWaitTime" : 12000,
"secondWaitTime" : 5000,
"linkBundleInitTime" : 16000,
"linkBundleMaxTime" : 600000,
"linkBundleSecondTime" : 20000,
"linkBundleL3Mode" : false,
"deliverState" : 2
}
],
"totalNum" : 10,
"pageIndex" : 10,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 521


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"pageSize" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4.3 Query BFD System Configuration

Typical Scenarios
Specific BFD system configuration needs to be queried.

Functions
Query specific BFD system configuration.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/{id}

Table 1-397 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 522


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-398 BfdSystemDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

bfd ARRAY For details, see Table "" -


_REFER 1-394.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"bfd" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"deviceGroup" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
},
"delayUpTimer" : 200,
"initWaitTime" : 2000,
"maxWaitTime" : 12000,
"secondWaitTime" : 5000,
"linkBundleInitTime" : 16000,
"linkBundleMaxTime" : 600000,
"linkBundleSecondTime" : 20000,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 523


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"linkBundleL3Mode" : false,
"deliverState" : 2
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4.4 Update BFD System Configuration

Typical Scenarios
Specific BFD system configuration needs to be updated.

Functions
Update specific BFD system configuration, including BFD parameters or device list.
If the device list needs to be updated, the PUT operation supports only full update
and replacement.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/{id}

Table 1-399 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID of the BFD "DBB702C3-77


256 system 19-4FE6-
charac configuration A5AD-3A9C9E2
ters. item to be 65309"
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 524


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-400 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-388. paramete
r model
class for
updating
BFD
system
configurat
ion.

Sample Request
HTTP
PUT /controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"bfd" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"deviceGroup" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
},
"delayUpTimer" : 200,
"initWaitTime" : 2000,
"maxWaitTime" : 12000,
"secondWaitTime" : 5000,
"linkBundleInitTime" : 16000,
"linkBundleMaxTime" : 600000,
"linkBundleSecondTime" : 20000,
"linkBundleL3Mode" : false,
"deliverState" : 2
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 525


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully
BfdSystemDtoWrapper parameters, For details, see Table 1-398.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"bfd" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"deviceGroup" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
},
"delayUpTimer" : 200,
"initWaitTime" : 2000,
"maxWaitTime" : 12000,
"secondWaitTime" : 5000,
"linkBundleInitTime" : 16000,
"linkBundleMaxTime" : 600000,
"linkBundleSecondTime" : 20000,
"linkBundleL3Mode" : false,
"deliverState" : 2
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4.5 Delete BFD System Configuration

Typical Scenarios
Specific BFD system configuration needs to be deleted.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 526


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Delete specific BFD system configuration and disable the BFD feature for the
Fabric. This is a high-risk operation and can be performed only when all BFD
sessions are deleted.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/{id}

Table 1-401 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID of the BFD "DBB702C3-77


256 system 19-4FE6-
charac configuration A5AD-3A9C9E2
ters. item to be 65309"
deleted.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 527


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4.6 Add a Device to BFD System Configuration

Typical Scenarios
A device needs to be added to specific BFD system configuration.

Functions
Add a device to specific BFD system configuration.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/{id}/add-device

Table 1-402 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Object ID. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 528


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-403 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-390. paramete
r model
class for
adding a
device.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309/add-device HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 529


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.4.7 Remove a Device from BFD System Configuration

Typical Scenarios
BFD system configurations need to be created. This operation is risky and affects
all BFD sessions on the device.
This API cannot be used to disable BFD globally on the device to prevent the
manually configured BFD sessions from being deleted by mistake.

Functions
Create BFD system configuration to enable the BFD feature for specified devices in
the fabric.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/{id}/remove-device

Table 1-404 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Object ID. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 530


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-405 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-390. paramete
r model
class for
removing
a device.

Sample Request
HTTP
POST /controller/dc/v3/physicalnetwork/fabricresource/bfds/bfd/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309/remove-device HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricName" : "fabric1",
"deviceGroup" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE6881"
}
]
}

Response Parameters
Response status code 201: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 531


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.5 Global Resources


Description of the user object operation API:

1. Create or delete resource pools in batches based on information such as the


type.

2. Query all resources by information such as the type.

1.9.4.5.1 Create a Resource Pool

Typical Scenarios
A resource pool needs to be created.

Functions
Create a resource pool.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/topoapi/day0topo/openapi/resourcepool/{type}

Table 1-406 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

type Yes string 1 to 36 - type. "vni"


charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 532


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-407 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Day0Reso -


NCE 1-408. urceDto

Table 1-408 CreateResourceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

gid No string - - - -

begin Yes int64 - - - -

end Yes int64 - - - -

vniTyp No int32 - - - -
e

priority Yes int32 - - - -


Type

Sample Request
HTTP
POST /acdcn/v3/topoapi/day0topo/openapi/resourcepool/vni HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: success

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 533


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-409 Day0ResourceResponse parameters

Param Type Value Range Defaul Description Example


eter t Value

result string ● SUCCESS - Result type. -


● ERROR
● INPUT_NOT_
EXISTS
● EXCEPTION_
OCCURS
● RPC_RESULT
_IS_WRONG
● PREPARE_SE
RVICE_IS_NU
LL
● REQUEST_PA
RAM_IS_WR
ONG
● URL_PARAM
_TYPE_IS_W
RONG
● BODY_PARA
M_VNITYPE_
IS_WRONG
● BODY_PARA
M_BEGIN_IS
_WRONG
● BODY_PARA
M_END_IS_
WRONG
● BODY_PARA
M_PRIORITY
TYPE_IS_WR
ONG

excepti string - - Error -


onMsg information.

Response status code 500: nternal server error.


For details, see the response message body.

Sample Response
Response status code 200: success
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 534


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: nternal server error.


HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.5.2 Delete a Resource Pool

Typical Scenarios
A resource pool needs to be deleted.

Functions
Destroy a resource pool.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/acdcn/v3/topoapi/day0topo/openapi/resourcepool/{type}

Table 1-410 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

type Yes string 1 to 36 - type. "vni"


charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 535


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-411 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table DeleteRes -


NCE 1-412. ourceDto

Table 1-412 DeleteResourceDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

gid No string - - - -

begin Yes int64 - - - -

end Yes int64 - - - -

vniTyp No int32 - - - -
e

priority No int32 - - - -
Type

Sample Request
HTTP
PUT /acdcn/v3/topoapi/day0topo/openapi/resourcepool/vni HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: success

Day0ResourceResponse parameters, For details, see Table 1-409.

Response status code 500: Resource pools need to be created or deleted in


batches.

For details, see the response message body.

Sample Response
Response status code 200: success

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 536


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Resource pools need to be created or deleted in


batches.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.5.3 Create or destroy resource pools in batches.

Typical Scenarios
Resource pools need to be created or deleted in batches.

Functions
Create or destroy resource pools in batches.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/acdcn/v3/topoapi/day0topo/openapi/resourcepools/{type}

Table 1-413 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

type Yes string 0 to - type. "vni"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 537


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-414 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Resource -


NCE 1-415. informati
on.

Table 1-415 ResourceDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

gid No string - - gid "DBB702C3-77


19-4FE6-
A5AD-3A9C9E2
60001"

vniTyp Yes int32 - - - -


e

operat Yes string - - Operation type. "create"


eType The value can
be create or
delete.

resourc Yes ARRAY For details, see Resource list. -


eList _REFER Table 1-416.
ENCE

Table 1-416 ResourceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

begin Yes int64 - - End time. 1

end Yes int64 - - End time. 2

priority No int32 - - Result type. 100


Type

Sample Request
HTTP
PUT /acdcn/v3/topoapi/day0topo/openapi/resourcepools/vni HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 538


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"gid" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"operateType" : "create",
"resourceList" : [
{
"begin" : 1,
"end" : 2,
"priorityType" : 100
}
]
}

Response Parameters
Response status code 200: success
Day0ResourceResponse parameters, For details, see Table 1-409.
Response status code 500: nternal server error.
For details, see the response message body.

Sample Response
Response status code 200: success
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: nternal server error.


HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.6 Easy VPC Management


Easy VPC management API description:
1. Create an easy VPC.

1.9.4.6.1 Create an Easy VPC

Typical Scenarios
An easy VPC needs to be created.

Functions
Create an easy VPC.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 539


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/easyvpc

Request Parameters

Table 1-417 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Easy VPC. -


NCE 1-418.

Table 1-418 EasyVpcWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

easyVp No REFER For details, see Easy VPC -


c ENCE Table 1-419. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 540


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-419 EasyVpcDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to 36 - VPC ID. If the "DBB702C3-77


charac VPC already 19-4FE6-
ters. exists, set this A5AD-3A9C9E2
36 parameter to 65301"
charac the ID of the
ters. existing VPC.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 1 to - Name of the "theEasyVpcNa


255 VPC to be me"
charac created.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 541


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI No string 0 to 36 - Fabric ID. The "DBB702C3-77


d charac fabric ID is 19-4FE6-
ters. preferentially A5AD-3A9C9E2
36 applied, but 65302"
charac either the
ters. fabric ID or
The name must be
value specified.
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

fabric No string 1 to - Fabric name. "theFabric"


Name 128 The fabric ID is
charac preferentially
ters. applied, but
either the
fabric ID or
name must be
specified.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 542


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenantI No string 0 to 36 - Tenant ID. If "DBB702C3-77


d charac the tenant 19-4FE6-
ters. already exists, A5AD-3A9C9E2
36 set this 65303"
charac parameter to
ters. the ID of the
The existing tenant.
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

tenant No string 1 to - Name of the "theTenant"


Name 128 tenant to be
charac created.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 543


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extern No string 0 to 36 - ID of the "DBB702C3-77


alGate charac external 19-4FE6-
wayId ters. gateway used A5AD-3A9C9E2
36 to access the 65304"
charac external
ters. network. The
The external
value gateway ID is
must preferentially
meet applied.
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

extern No string 1 to - Name of the "theExternalGa


alGate 255 external teway"
wayNa charac gateway used
me ters. to access the
external
network. The
external
gateway ID is
preferentially
applied.

vlanLis Yes ARRAY 0-200 items. For List of subnet -


t _REFER details, see CIDR and
ENCE Table 1-420. VLAN
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 544


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

portGr Yes ARRAY 0-200 items. For Port group -


oupList _REFER details, see information.
ENCE Table 1-421.

Table 1-420 VlanDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vlan Yes int32 [0-409 - ID of the VLAN 10


4] allowed by the
subnet. If the
value is 0, the
encapsulation
type is untag. If
the value is in
the range from
2 to 4094, the
encapsulation
type is Dot1q.

cidr No string 1 to - Gateway IP "192.168.10.1/2


255 address and 4"
charac mask. If this
ters. parameter is
not specified,
only the Layer
2 configuration
is delivered.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 545


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-421 PortGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

portGr No string 0 to 36 - Port group ID. "DBB702C3-77


oupId charac The port group 19-4FE6-
ters. ID is A5AD-3A9C9E2
36 preferentially 65305"
charac applied, but
ters. either the port
The group ID or
value name must be
must specified.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

portGr No string 1 to - Port group "thePortGroup"


oupNa 255 name. The port
me charac group ID is
ters. preferentially
applied, but
either the port
group ID or
name must be
specified.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/easyvpc HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 546


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"easyVpc" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"name" : "theEasyVpcName",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265302",
"fabricName" : "theFabric",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265303",
"tenantName" : "theTenant",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265304",
"externalGatewayName" : "theExternalGateway",
"vlanList" : [
{
"vlan" : 10,
"cidr" : "192.168.10.1/24"
}
],
"portGroupList" : [
{
"portGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265305",
"portGroupName" : "thePortGroup"
}
]
}
}

Response Parameters
Response status code 201: successfully

Table 1-422 EasyVpcOutputWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 36 - VPC ID. "DBB702C3-77


characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 65306"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - VPC name. "theEasyVpcNa


characters. me"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 547


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenantI string 0 to 36 - Tenant ID. "DBB702C3-77


d characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 65307"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

tenant string 1 to 128 - Tenant name. "theTenant"


Name characters.

fabricI string 0 to 36 - Fabric ID. The "DBB702C3-77


d characters. 36 fabric ID is 19-4FE6-
characters. The preferentially A5AD-3A9C9E2
value must applied, but 65308"
meet the either the
following fabric ID or
regular name must be
expression: specified.
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

fabric string 1 to 128 - Fabric name. "theFabric"


Name characters. The fabric ID is
preferentially
applied, but
either the
fabric ID or
name must be
specified.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 548


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extern string 0 to 36 - External "DBB702C3-77


alNetw characters. 36 network ID. 19-4FE6-
orkId characters. The A5AD-3A9C9E2
value must 65309"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

extern string 1 to 255 - External "theExternalNe


alNetw characters. network name. twork"
orkNa
me

logicR string 0 to 36 - Logical router "DBB702C3-77


outerId characters. 36 ID. 19-4FE6-
characters. The A5AD-3A9C9E2
value must 6530a"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

logicR string 1 to 255 - Logical router "theLogicRoute


outerN characters. name. r"
ame

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 549


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extern string 0 to 36 - External "DBB702C3-77


alConn characters. 36 connection ID. 19-4FE6-
ectId characters. The A5AD-3A9C9E2
value must 6530b"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

extern string 1 to 255 - External "theExternalCo


alConn characters. connection nnect"
ectNa name.
me

reques string 0 to 36 - Request ID, "DBB702C3-77


tId characters. 36 which can be 19-4FE6-
characters. The used to query A5AD-3A9C9E2
value must southbound 6530e"
meet the operation logs.
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

taskIds array< 0-255 items. - List of task IDs. -


string> Each item has 0
to 36
characters.

logicS ARRAY For details, see Table List of logical -


witch _REFER 1-423. switch
ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 550


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-423 LogicSwitchOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

logicS string 0 to 36 - Port group ID. "DBB702C3-77


witchId characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 6530c"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

logicS string 1 to 255 - Logical switch "theLogicSwitc


witchN characters. name. h"
ame

cidr array< 0-255 items. - CIDR list. -


string> Each item has 1
to 255
characters.

portGr ARRAY For details, see Table List of port -


oupList _REFER 1-424. groups bound
ENCE to logical
switches.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 551


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-424 PortGroupOutputDto parameters

Param Type Value Range Defaul Description Example


eter t Value

portGr string 0 to 36 - Port group ID. "DBB702C3-77


oupId characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 6530d"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

portGr string 1 to 255 - Port group "thePortGroup"


oupNa characters. name.
me

vlan int32 [0-4094] - ID of the VLAN 10


allowed by the
subnet. If the
value is 0, the
encapsulation
type is untag. If
the value is in
the range from
2 to 4094, the
encapsulation
type is Dot1q.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265306",
"name" : "theEasyVpcName",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265307",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 552


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"tenantName" : "theTenant",
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265308",
"fabricName" : "theFabric",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkName" : "theExternalNetwork",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530a",
"logicRouterName" : "theLogicRouter",
"externalConnectId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530b",
"externalConnectName" : "theExternalConnect",
"requestId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530e",
"taskIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E26530f"
],
"logicSwitch" : [
{
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530c",
"logicSwitchName" : "theLogicSwitch",
"cidr" : [
"192.168.10.1/24"
],
"portGroupList" : [
{
"portGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530d",
"portGroupName" : "thePortGroup",
"vlan" : 10
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.7 DiffServ Domain Management


Interfaces in the DiffServ domain are described as follows:
1. Create a DiffServ domain.
2. Update a DiffServ domain.
3. Delete a DiffServ domain.
4. Query the DiffServ domain.
5. Query the DiffServ domain list.

1.9.4.7.1 Create a DiffServ Domain

Typical Scenarios
A DiffServ domain needs to be created.

Functions
Create a DiffServ domain.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 553


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/publicservice/diffservs

Request Parameters

Table 1-425 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-426. paramete
r
informati
on.

Table 1-426 DiffServDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

diffSer Yes ARRAY 1 items. For DiffServ -


v _REFER details, see domain
ENCE Table 1-427. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 554


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-427 DiffServDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to 36 - ID. "00278832-


charac cec9-490e-
ters. b222-8bef7f23
36 9523"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to 31 - Name. "diffserv001"


charac
ters.

descrip No string 0 to - Description. "diffserv001des


tion 255 "
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 555


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI Yes string 0 to 36 - FabricID. "00278832-


d charac cec9-490e-
ters. b222-8bef7f23
36 9508"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

upStre Yes ARRAY 1-128 items. For Upstream port -


amPor _REFER details, see list.
ts ENCE Table 1-428.

priority Yes ARRAY 1-8 items. For Priority -


Mappi _REFER details, see mapping list.
ngs ENCE Table 1-429.

additio No REFER For details, see Additional -


nal ENCE Table 1-430. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 556


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-428 UpStreamPortDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes string 0 to 36 - Device group "00278832-


GroupI charac ID cec9-490e-
d ters. b222-8bef7f23
36 9523"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

device No string 0 to - Device group "BorderLeaf"


Group 255 name, which is
Name charac read-only.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 557


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI Yes string 0 to 36 - Device ID. "00278832-


d charac cec9-490e-
ters. b222-8bef7f23
36 9523"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

device No string 0 to - Device name, "CE6850"


Name 255 which is read-
charac only.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 558


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

portId Yes string 0 to 36 - Port ID. "00278832-


charac cec9-490e-
ters. b222-8bef7f23
36 9523"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

portNa Yes string 0 to - Interface "10GE1/0/32"


me 255 name.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 559


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-429 PriorityMappingDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string ● be be Data Type "be"


Name Value - be: BE -
● af1
af1: AF1 - af2:
● af2 AF2 - af3: AF3
● af3 - af4: AF4 - ef:
● af4 EF - cs6: CS6 -
cs7: CS7
● ef
● cs6
● cs7

dscp Yes int32 [0-63] - DSCP value. 1

Table 1-430 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 560


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v3/publicservice/diffservs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"diffServ" : [
{
"id" : "00278832-cec9-490e-b222-8bef7f239523",
"name" : "diffserv001",
"description" : "diffserv001des",
"fabricId" : "00278832-cec9-490e-b222-8bef7f239508",
"upStreamPorts" : [
{
"deviceGroupId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceGroupName" : "BorderLeaf",
"deviceId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceName" : "CE6850",
"portId" : "00278832-cec9-490e-b222-8bef7f239523",
"portName" : "10GE1/0/32"
}
],
"priorityMappings" : [
{
"serviceName" : "be",
"dscp" : 1
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 561


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.7.2 Query the DiffServ Domain List

Typical Scenarios
The DiffServ domain list needs to be queried.

Functions
Query the DiffServ domain list.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/diffservs

Table 1-431 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - producer. "default"


er charac
ters.

name No string 0 to 36 - Name. "diffserv1"


charac
ters.

pageIn No string 0 to - Name. "1"


dex 255
charac
ters.

pageSi No string 0 to - Name. "1"


ze 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 562


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/publicservice/diffservs?producer=default&name=diffserv1&pageIndex=1&pageSize=1
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-432 DiffServPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

diffSer ARRAY 0-4000 items. For details, DiffServ -


v _REFER see Table 1-433. domain
ENCE information.

totalN int64 [1-2147483647 - Total number. 200


um ]

pageIn int32 [1-2147483647 - Page number. 1


dex ]

pageSi int32 [1-4000] - Number of 1


ze records on
each page.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 563


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-433 DiffServDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 36 - ID. "00278832-


characters. 36 cec9-490e-
characters. The b222-8bef7f23
value must 9523"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 31 - Name. "diffserv001"


characters.

descrip string 0 to 255 - Description. "diffserv001des


tion characters. "

fabricI string 0 to 36 - FabricID. "00278832-


d characters. 36 cec9-490e-
characters. The b222-8bef7f23
value must 9508"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

upStre ARRAY 1-128 items. For details, Upstream port -


amPor _REFER see Table 1-434. list.
ts ENCE

priority ARRAY 1-8 items. For details, see Priority -


Mappi _REFER Table 1-435. mapping list.
ngs ENCE

additio REFER For details, see Table Additional -


nal ENCE 1-436. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 564


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-434 UpStreamPortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 36 - Device group "00278832-


GroupI characters. 36 ID cec9-490e-
d characters. The b222-8bef7f23
value must 9523"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

device string 0 to 255 - Device group "BorderLeaf"


Group characters. name, which is
Name read-only.

deviceI string 0 to 36 - Device ID. "00278832-


d characters. 36 cec9-490e-
characters. The b222-8bef7f23
value must 9523"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

device string 0 to 255 - Device name, "CE6850"


Name characters. which is read-
only.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 565


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

portId string 0 to 36 - Port ID. "00278832-


characters. 36 cec9-490e-
characters. The b222-8bef7f23
value must 9523"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

portNa string 0 to 255 - Interface "10GE1/0/32"


me characters. name.

Table 1-435 PriorityMappingDto parameters


Param Type Value Range Defaul Description Example
eter t Value

service string ● be be Data Type "be"


Name Value - be: BE -
● af1
af1: AF1 - af2:
● af2 AF2 - af3: AF3
● af3 - af4: AF4 - ef:
● af4 EF - cs6: CS6 -
cs7: CS7
● ef
● cs6
● cs7

dscp int32 [0-63] - DSCP value. 1

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 566


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-436 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"diffServ" : [
{
"id" : "00278832-cec9-490e-b222-8bef7f239523",
"name" : "diffserv001",
"description" : "diffserv001des",
"fabricId" : "00278832-cec9-490e-b222-8bef7f239508",
"upStreamPorts" : [
{
"deviceGroupId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceGroupName" : "BorderLeaf",
"deviceId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceName" : "CE6850",
"portId" : "00278832-cec9-490e-b222-8bef7f239523",
"portName" : "10GE1/0/32"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 567


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"priorityMappings" : [
{
"serviceName" : "be",
"dscp" : 1
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.7.3 Query a DiffServ Domain

Typical Scenarios
The DiffServ domain needs to be queried.

Functions
Query the DiffServ domain.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/diffservs/diffserv/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 568


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-437 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - ID used for "DBB702C3-77


charac querying 19-4FE6-
ters. tenant resource A5AD-3A9C9E2
36 statistics. 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/publicservice/diffservs/diffserv/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 569


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-438 DiffServDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

diffSer ARRAY 1 items. For details, see DiffServ -


v _REFER Table 1-433. domain
ENCE information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"diffServ" : [
{
"id" : "00278832-cec9-490e-b222-8bef7f239523",
"name" : "diffserv001",
"description" : "diffserv001des",
"fabricId" : "00278832-cec9-490e-b222-8bef7f239508",
"upStreamPorts" : [
{
"deviceGroupId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceGroupName" : "BorderLeaf",
"deviceId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceName" : "CE6850",
"portId" : "00278832-cec9-490e-b222-8bef7f239523",
"portName" : "10GE1/0/32"
}
],
"priorityMappings" : [
{
"serviceName" : "be",
"dscp" : 1
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 570


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.7.4 Update a DiffServ Domain

Typical Scenarios
A DiffServ domain needs to be updated.

Functions
Update a DiffServ domain.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/publicservice/diffservs/diffserv/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 571


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-439 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - Update by ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-440 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-426. paramete
r
informati
on.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 572


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v3/publicservice/diffservs/diffserv/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"diffServ" : [
{
"id" : "00278832-cec9-490e-b222-8bef7f239523",
"name" : "diffserv001",
"description" : "diffserv001des",
"fabricId" : "00278832-cec9-490e-b222-8bef7f239508",
"upStreamPorts" : [
{
"deviceGroupId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceGroupName" : "BorderLeaf",
"deviceId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceName" : "CE6850",
"portId" : "00278832-cec9-490e-b222-8bef7f239523",
"portName" : "10GE1/0/32"
}
],
"priorityMappings" : [
{
"serviceName" : "be",
"dscp" : 1
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response Parameters
Response status code 200: successfully
DiffServDtoWrapper parameters, For details, see Table 1-438.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"diffServ" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 573


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"id" : "00278832-cec9-490e-b222-8bef7f239523",
"name" : "diffserv001",
"description" : "diffserv001des",
"fabricId" : "00278832-cec9-490e-b222-8bef7f239508",
"upStreamPorts" : [
{
"deviceGroupId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceGroupName" : "BorderLeaf",
"deviceId" : "00278832-cec9-490e-b222-8bef7f239523",
"deviceName" : "CE6850",
"portId" : "00278832-cec9-490e-b222-8bef7f239523",
"portName" : "10GE1/0/32"
}
],
"priorityMappings" : [
{
"serviceName" : "be",
"dscp" : 1
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.7.5 Delete a DiffServ Domain

Typical Scenarios
A DiffServ domain needs to be deleted.

Functions
Delete a DiffServ domain.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/publicservice/diffservs/diffserv/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 574


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-441 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - Deletion by ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/publicservice/diffservs/diffserv/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 575


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.8 Tenant Management


Tenant management API description: 1. Query tenants and resource usage of
them. 2. Create tenants. 3. Update tenants. 4. Delete tenants.

1.9.4.8.1 Create a Tenant

Typical Scenarios
A tenant needs to be created.

Functions
Create a tenant based on the request information.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/tenants

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 576


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-442 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Parameters for -


er ENCE Table 1-443. creating a
tenant.

Table 1-443 TenantRestfulDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

tenant Yes ARRAY For details, see Tenant -


_REFER Table 1-444. information
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 577


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-444 TenantDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Tenant ID. This "DBB702C3-77


charac field cannot be 19-4FE6-
ters. updated. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to - Tenant name. "name"


128
charac
ters.

descrip No string 0 to - Tenant "description"


tion 255 description.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 578


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

multic No boolea - false Whether the true


astCap n multicast
ability capability is
supported.

quota No REFER For details, see Quota. -


ENCE Table 1-445.

multic No REFER For details, see Multicast -


astQuo ENCE Table 1-446. quota.
ta

resPool No REFER For details, see Resource Pool -


ENCE Table 1-447.

Table 1-445 QuotaDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicV Yes int32 [0-214 0 Quota of 10


asNum 74836 logical VAS
47] devices.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 579


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR Yes int32 [0-214 0 Quota of 10


outerN 74836 logical routers.
um 47]

logicS Yes int32 [0-214 0 Quota of 10


witchN 74836 logical
um 47] switches.

Table 1-446 MulticastQuotaDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

aclNu Yes int32 [0-100 0 Quota of ACLs. 10


m 0]

aclRule Yes int32 [0-300 0 Quota of ACL 10


Num 0] rules.

Table 1-447 ResPoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern No array< - - External -


alGate string> Gateway Ids
wayIds

fabricI No array< - - Fabric Ids -


ds string>

vmmId No array< - - Vmm Ids -


s string>

dhcpGr No array< - - DHCP Group -


oupIds string> Ids

Sample Request
HTTP
POST /controller/dc/v3/tenants HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 580


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"tenant" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40",
"multicastCapability" : true,
"quota" : {
"logicVasNum" : 10,
"logicRouterNum" : 10,
"logicSwitchNum" : 10
},
"multicastQuota" : {
"aclNum" : 10,
"aclRuleNum" : 10
},
"resPool" : {
"externalGatewayIds" : [
"00000000-0000-0000-0000-000000000001"
],
"fabricIds" : [
"00000000-0000-0000-0000-000000000002"
],
"vmmIds" : [
"00000000-0000-0000-0000-000000000003"
],
"dhcpGroupIds" : [
"00000000-0000-0000-0000-000000000004"
]
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 581


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.4.8.2 Query All Tenants

Typical Scenarios
Query All Tenants.

Functions
Query all tenants based on a specified condition, for example, based on the
producer. The default tenant cannot be queried. To query the public VPC and its
services, set the tenant ID to 00000000-0000-0000-0000-000000000000.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/tenants

Table 1-448 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 582


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/tenants?producer=default&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-449 TenantPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant ARRAY For details, see Table Tenant -


_REFER 1-450. information
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of queried
tenants.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 583


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-450 TenantDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Tenant ID. This "DBB702C3-77


The value must field cannot be 19-4FE6-
meet the updated. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 128 - Tenant name. "name"


characters.

descrip string 0 to 255 - Tenant "description"


tion characters. description.

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

multic boolea - false Whether the true


astCap n multicast
ability capability is
supported.

quota REFER For details, see Table Quota. -


ENCE 1-451.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 584


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

multic REFER For details, see Table Multicast -


astQuo ENCE 1-452. quota.
ta

resPool REFER For details, see Table Resource Pool -


ENCE 1-453.

Table 1-451 QuotaDto parameters


Param Type Value Range Defaul Description Example
eter t Value

logicV int32 [0-2147483647 0 Quota of 10


asNum ] logical VAS
devices.

logicR int32 [0-2147483647 0 Quota of 10


outerN ] logical routers.
um

logicS int32 [0-2147483647 0 Quota of 10


witchN ] logical
um switches.

Table 1-452 MulticastQuotaDto parameters


Param Type Value Range Defaul Description Example
eter t Value

aclNu int32 [0-1000] 0 Quota of ACLs. 10


m

aclRule int32 [0-3000] 0 Quota of ACL 10


Num rules.

Table 1-453 ResPoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

extern array< - - External -


alGate string> Gateway Ids
wayIds

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 585


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

fabricI array< - - Fabric Ids -


ds string>

vmmId array< - - Vmm Ids -


s string>

dhcpGr array< - - DHCP Group -


oupIds string> Ids

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenant" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40",
"multicastCapability" : true,
"quota" : {
"logicVasNum" : 10,
"logicRouterNum" : 10,
"logicSwitchNum" : 10
},
"multicastQuota" : {
"aclNum" : 10,
"aclRuleNum" : 10
},
"resPool" : {
"externalGatewayIds" : [
"00000000-0000-0000-0000-000000000001"
],
"fabricIds" : [
"00000000-0000-0000-0000-000000000002"
],
"vmmIds" : [
"00000000-0000-0000-0000-000000000003"
],
"dhcpGroupIds" : [
"00000000-0000-0000-0000-000000000004"
]
}
}
],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 586


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.8.3 Query a Tenant by ID

Typical Scenarios
A tenant needs to be queried by ID.

Functions
Query a tenant by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/tenants/tenant/{id}

Table 1-454 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 587


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/tenants/tenant/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-455 TenantRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant ARRAY For details, see Table Tenant -


_REFER 1-450. information
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenant" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40",
"multicastCapability" : true,
"quota" : {
"logicVasNum" : 10,
"logicRouterNum" : 10,
"logicSwitchNum" : 10
},
"multicastQuota" : {
"aclNum" : 10,
"aclRuleNum" : 10
},
"resPool" : {
"externalGatewayIds" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 588


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"00000000-0000-0000-0000-000000000001"
],
"fabricIds" : [
"00000000-0000-0000-0000-000000000002"
],
"vmmIds" : [
"00000000-0000-0000-0000-000000000003"
],
"dhcpGroupIds" : [
"00000000-0000-0000-0000-000000000004"
]
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.8.4 Update a Tenant by ID

Typical Scenarios
Tenant information needs to be updated by ID.

Functions
Modify a tenant by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/tenants/tenant/{id}

Table 1-456 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 VPCs. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 589


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-457 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-443. s for
updating
a tenant.

Sample Request
HTTP
PUT /controller/dc/v3/tenants/tenant/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"tenant" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40",
"multicastCapability" : true,
"quota" : {
"logicVasNum" : 10,
"logicRouterNum" : 10,
"logicSwitchNum" : 10
},
"multicastQuota" : {
"aclNum" : 10,
"aclRuleNum" : 10
},
"resPool" : {
"externalGatewayIds" : [
"00000000-0000-0000-0000-000000000001"
],
"fabricIds" : [
"00000000-0000-0000-0000-000000000002"
],
"vmmIds" : [
"00000000-0000-0000-0000-000000000003"
],
"dhcpGroupIds" : [
"00000000-0000-0000-0000-000000000004"
]
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 590


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully
TenantRestfulDtoWrapper parameters, For details, see Table 1-455.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenant" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40",
"multicastCapability" : true,
"quota" : {
"logicVasNum" : 10,
"logicRouterNum" : 10,
"logicSwitchNum" : 10
},
"multicastQuota" : {
"aclNum" : 10,
"aclRuleNum" : 10
},
"resPool" : {
"externalGatewayIds" : [
"00000000-0000-0000-0000-000000000001"
],
"fabricIds" : [
"00000000-0000-0000-0000-000000000002"
],
"vmmIds" : [
"00000000-0000-0000-0000-000000000003"
],
"dhcpGroupIds" : [
"00000000-0000-0000-0000-000000000004"
]
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 591


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.4.8.5 Delete a Tenant

Typical Scenarios
A tenant needs to be delete by ID.

Functions
Delete a tenant by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/tenants/tenant/{id}

Table 1-458 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 an observing 19-4FE6-
charac port. A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/tenants/tenant/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 592


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.4.8.6 Query the Number of Logical NEs and Fabric Resources Used by a Tenant

Typical Scenarios
Resource statistics of a tenant need to be queried based on the tenant ID,
including the numbers of logical NEs and fabric resources used by the tenant.

Functions
Query the resource statistics of a tenant.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/tenants/tenant/{id}/statistics

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 593


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-459 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/tenants/tenant/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/statistics HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-460 TenantAuthWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

statisti REFER For details, see Table statistics -


cs ENCE 1-461.

Table 1-461 StatisticsDto parameters


Param Type Value Range Defaul Description Example
eter t Value

usedFa ARRAY For details, see Table Associated -


bric _REFER 1-462. fabric resource.
ENCE

logicEl REFER For details, see Table Logical -


ement ENCE 1-463. resource
Statisti statistics.
csDto

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 594


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-462 UsedFabricDto parameters

Param Type Value Range Defaul Description Example


eter t Value

fabricI string 1 to 36 - Fabric ID. "10"


d characters.

fabric string 1 to 255 - Fabric name. "10"


Name characters.

Table 1-463 LogicElementStatisticsDto parameters

Param Type Value Range Defaul Description Example


eter t Value

logicN int32 [0-2147483647 0 Number of 10


etwork ] logical
Num networks.

logicR int32 [0-2147483647 0 Number of 10


outerN ] logical routers.
um

logicS int32 [0-2147483647 0 Number of 10


witchN ] logical
um switches.

logicV int32 [0-2147483647 0 Number of 10


asNum ] logical VAS
devices.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"statistics" : {
"usedFabric" : [
{
"fabricId" : "10",
"fabricName" : "10"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 595


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"logicElementStatisticsDto" : {
"logicNetworkNum" : 10,
"logicRouterNum" : 10,
"logicSwitchNum" : 10,
"logicVasNum" : 10
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5 Neutron

1.9.5.1 Network
# Network operation APIs

1.9.5.1.1 Create a Network

Typical Scenarios
A network needs to be created.

Functions
Create a network.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/networks

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 596


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-464 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ Yes REFER For details, see Parameters for -


kDtoW ENCE Table 1-465. creating a
rapper network.

Table 1-465 NetworkDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name. This
charac field cannot be
ters. updated.

networ Yes REFER For details, see Network -


k ENCE Table 1-466. information.

Table 1-466 NeutronNetworkDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

name No string 0 to - Network name. "testNetwork"


255
charac
ters.

router: Yes string 0 to - Whether the "false"


extern 255 network is an
al charac external
ters. network. This
● true field cannot be
● fals updated.
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 597


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

admin No string 0 to - Administrative "true"


_state_ 255 status.
up charac
ters.
● true
● fals
e

tenant Yes string 0 to 36 - Tenant ID. Only "00000000-000


_id charac the 0-0000-0000-0
ters. administrator 00000000005"
can specify the
tenant ID of
other tenants.
The value
cannot be
changed.

shared No string 0 to - Whether cross- "false"


255 tenant sharing
charac is supported.
ters. The default
● true value is false.
● fals
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 598


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - Network ID. "DBB702C3-77


charac This field 19-4FE6-
ters. cannot be A5AD-3A9C9E2
36 updated. 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

provid No string 0 to 64 - Extended "physnet1"


er:phys charac attribute: used
ical_ne ters. physical
twork network, which
must be the
same as that
configured in
the
configuration
file of the
cloud platform.
The value
physnet1 is
often used.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 599


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

provid No string 0 to - Network type, "vlan"


er:net 255 which can be
work_t charac VLAN or
ype ters. VXLAN.

provid No int32 [1-167 - Extended 10


er:seg 77215] attribute:
mentat network
ion_id segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

segme No ARRAY 0-255 items. For List of -


nts _REFER details, see providers. This
ENCE Table 1-467. field is used
only by ML2-
Plugin. It
cannot coexist
with the
provider:physic
al_network,
provider:netwo
rk_type, or
provider:segme
ntation_id
attribute. A
maximum of
two segments
can be
specified.
When two
segments are
specified, the
network types
can only be set
to vxlan and
bms or vxlan
and vlan.

bindin No REFER For details, see Profile -


g:profil ENCE Table 1-468. information.
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 600


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

qos_po No string 0 to 36 - QoS policy ID. "DBB702C3-77


licy_id charac 19-4FE6-
ters. A5AD-3A9C9E2
36 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 601


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-467 SegmentDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

provid No string 0 to - Extended "physnet1"


er:phys 255 attribute: used
ical_ne charac physical
twork ters. network, which
must be the
same as that
configured in
the
configuration
file of the
cloud platform.
The value
physnet1 is
often used.

provid Yes string 0 to - Network type, "vlan"


er:net 255 which is an
work_t charac extended
ype ters. attribute. The
value can be
vlan, vxlan, or
bms.

provid No string 0 to - Extended "123"


er:seg 255 attribute:
mentat charac network
ion_id ters. segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

Table 1-468 BindingProfileDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

arp_mi No string 0 to - arpMiss "true"


ss 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 602


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

arp_pr No int32 [0-255 - arpProxy 0


oxy ]

bum No REFER For details, see bum -


ENCE Table 1-469.

Table 1-469 BumDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

broadc No boolea ● true - Whether to false


ast_en n enable
able ● fals
e broadcast.

broadc No int64 - - Broadcast CIR. 10


ast_cir The value
_value range is from 0
to 4294967295
in Kbytes, 0 to
4294967 in
Mbytes, or 0 to
4294 in Gbytes.

broadc No string 0 to - Broadcast CIR "gbps"


ast_cir 255 unit.
_unit charac
ters.

broadc No int64 - - Broadcast CBS. 10


ast_cbs The value
_value range is from
10000 to
4294967295 in
bytes, 10 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes.

broadc No string 0 to - Broadcast CBS "mbyte(s)"


ast_cbs 255 unit.
_unit charac
ters.

multic No boolea ● true - Whether to false


ast_en n enable
able ● fals
e multicast.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 603


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

multic No int64 - - Multicast CIR. 10


ast_cir The value
_value ranges from 0
to 4294967295
in Kbytes, 0 to
4294967 in
Mbytes, or 0 to
4294 in Gbytes.

multic No string 0 to - Multicast CIR "gbps"


ast_cir 255 unit.
_unit charac
ters.

multic No int64 - - Multicast CBS. 10


ast_cbs The value
_value ranges from
10000 to
4294967295 in
bytes, 10 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes.

multic No string 0 to - Multicast CBS "mbyte(s)"


ast_cbs 255 unit.
_unit charac
ters.

unkno No boolea ● true - Whether to false


wn_uni n enable
cast_e ● fals
e unknown
nable unicast.

unkno No int64 - - Unknown 10


wn_uni unicast CIR.
cast_ci The value
r_value range is from 0
to 4294967295
in Kbytes, 0 to
4294967 in
Mbytes, or 0 to
4294 in Gbytes.

unkno No string 0 to - Unknown "gbps"


wn_uni 255 unicast CIR
cast_ci charac unit.
r_unit ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 604


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

unkno No int64 - - Unknown 10


wn_uni unicast CBS.
cast_cb The value
s_value range is from
10000 to
4294967295 in
bytes, 10 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes.

unkno No string 0 to - Unknown "mbyte(s)"


wn_uni 255 unicast CBS
cast_cb charac unit.
s_unit ters.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/networks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"network" : {
"name" : "testNetwork",
"router:external" : "false",
"admin_state_up" : "true",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"shared" : "false",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : 10,
"segments" : [
{
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : "123"
}
],
"binding:profile" : {
"arp_miss" : "true",
"arp_proxy" : 0,
"bum" : {
"broadcast_enable" : false,
"broadcast_cir_value" : 10,
"broadcast_cir_unit" : "gbps",
"broadcast_cbs_value" : 10,
"broadcast_cbs_unit" : "mbyte(s)",
"multicast_enable" : false,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 605


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"multicast_cir_value" : 10,
"multicast_cir_unit" : "gbps",
"multicast_cbs_value" : 10,
"multicast_cbs_unit" : "mbyte(s)",
"unknown_unicast_enable" : false,
"unknown_unicast_cir_value" : 10,
"unknown_unicast_cir_unit" : "gbps",
"unknown_unicast_cbs_value" : 10,
"unknown_unicast_cbs_unit" : "mbyte(s)"
}
},
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-470 NetworkDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name. This
field cannot be
updated.

networ REFER For details, see Table Network -


k ENCE 1-471. information.

Table 1-471 NeutronNetworkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

name string 0 to 255 - Network name. "testNetwork"


characters.

router: string 0 to 255 - Whether the "false"


extern characters. network is an
al ● true external
● false network. This
field cannot be
updated.

admin string 0 to 255 - Administrative "true"


_state_ characters. status.
up ● true
● false

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 606


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenant string 0 to 36 - Tenant ID. Only "00000000-000


_id characters. the 0-0000-0000-0
administrator 00000000005"
can specify the
tenant ID of
other tenants.
The value
cannot be
changed.

shared string 0 to 255 - Whether cross- "false"


characters. tenant sharing
● true is supported.
● false The default
value is false.

id string 0 to 36 - Network ID. "DBB702C3-77


characters. 36 This field 19-4FE6-
characters. The cannot be A5AD-3A9C9E2
value must updated. 65309"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

provid string 0 to 64 - Extended "physnet1"


er:phys characters. attribute: used
ical_ne physical
twork network, which
must be the
same as that
configured in
the
configuration
file of the
cloud platform.
The value
physnet1 is
often used.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 607


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

provid string 0 to 255 - Network type, "vlan"


er:net characters. which can be
work_t VLAN or
ype VXLAN.

provid int32 [1-16777215] - Extended 10


er:seg attribute:
mentat network
ion_id segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

segme ARRAY 0-255 items. For details, List of -


nts _REFER see Table 1-472. providers. This
ENCE field is used
only by ML2-
Plugin. It
cannot coexist
with the
provider:physic
al_network,
provider:netwo
rk_type, or
provider:segme
ntation_id
attribute. A
maximum of
two segments
can be
specified.
When two
segments are
specified, the
network types
can only be set
to vxlan and
bms or vxlan
and vlan.

bindin REFER For details, see Table Profile -


g:profil ENCE 1-473. information.
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 608


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

qos_po string 0 to 36 - QoS policy ID. "DBB702C3-77


licy_id characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 65309"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-472 SegmentDto parameters


Param Type Value Range Defaul Description Example
eter t Value

provid string 0 to 255 - Extended "physnet1"


er:phys characters. attribute: used
ical_ne physical
twork network, which
must be the
same as that
configured in
the
configuration
file of the
cloud platform.
The value
physnet1 is
often used.

provid string 0 to 255 - Network type, "vlan"


er:net characters. which is an
work_t extended
ype attribute. The
value can be
vlan, vxlan, or
bms.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 609


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

provid string 0 to 255 - Extended "123"


er:seg characters. attribute:
mentat network
ion_id segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

Table 1-473 BindingProfileDto parameters


Param Type Value Range Defaul Description Example
eter t Value

arp_mi string 0 to 255 - arpMiss "true"


ss characters.

arp_pr int32 [0-255] - arpProxy 0


oxy

bum REFER For details, see Table bum -


ENCE 1-474.

Table 1-474 BumDto parameters


Param Type Value Range Defaul Description Example
eter t Value

broadc boolea ● true - Whether to false


ast_en n enable
able ● false
broadcast.

broadc int64 - - Broadcast CIR. 10


ast_cir The value
_value range is from 0
to 4294967295
in Kbytes, 0 to
4294967 in
Mbytes, or 0 to
4294 in Gbytes.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 610


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

broadc string 0 to 255 - Broadcast CIR "gbps"


ast_cir characters. unit.
_unit

broadc int64 - - Broadcast CBS. 10


ast_cbs The value
_value range is from
10000 to
4294967295 in
bytes, 10 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes.

broadc string 0 to 255 - Broadcast CBS "mbyte(s)"


ast_cbs characters. unit.
_unit

multic boolea ● true - Whether to false


ast_en n enable
able ● false
multicast.

multic int64 - - Multicast CIR. 10


ast_cir The value
_value ranges from 0
to 4294967295
in Kbytes, 0 to
4294967 in
Mbytes, or 0 to
4294 in Gbytes.

multic string 0 to 255 - Multicast CIR "gbps"


ast_cir characters. unit.
_unit

multic int64 - - Multicast CBS. 10


ast_cbs The value
_value ranges from
10000 to
4294967295 in
bytes, 10 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes.

multic string 0 to 255 - Multicast CBS "mbyte(s)"


ast_cbs characters. unit.
_unit

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 611


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

unkno boolea ● true - Whether to false


wn_uni n enable
cast_e ● false
unknown
nable unicast.

unkno int64 - - Unknown 10


wn_uni unicast CIR.
cast_ci The value
r_value range is from 0
to 4294967295
in Kbytes, 0 to
4294967 in
Mbytes, or 0 to
4294 in Gbytes.

unkno string 0 to 255 - Unknown "gbps"


wn_uni characters. unicast CIR
cast_ci unit.
r_unit

unkno int64 - - Unknown 10


wn_uni unicast CBS.
cast_cb The value
s_value range is from
10000 to
4294967295 in
bytes, 10 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes.

unkno string 0 to 255 - Unknown "mbyte(s)"


wn_uni characters. unicast CBS
cast_cb unit.
s_unit

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 612


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 201 Created


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"network" : {
"name" : "testNetwork",
"router:external" : "false",
"admin_state_up" : "true",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"shared" : "false",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : 10,
"segments" : [
{
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : "123"
}
],
"binding:profile" : {
"arp_miss" : "true",
"arp_proxy" : 0,
"bum" : {
"broadcast_enable" : false,
"broadcast_cir_value" : 10,
"broadcast_cir_unit" : "gbps",
"broadcast_cbs_value" : 10,
"broadcast_cbs_unit" : "mbyte(s)",
"multicast_enable" : false,
"multicast_cir_value" : 10,
"multicast_cir_unit" : "gbps",
"multicast_cbs_value" : 10,
"multicast_cbs_unit" : "mbyte(s)",
"unknown_unicast_enable" : false,
"unknown_unicast_cir_value" : 10,
"unknown_unicast_cir_unit" : "gbps",
"unknown_unicast_cbs_value" : 10,
"unknown_unicast_cbs_unit" : "mbyte(s)"
}
},
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 613


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.1.2 Query All Networks

Typical Scenarios
All networks need to be queried.

Functions
Query all networks.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/networks

Table 1-475 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/networks?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 614


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-476 NetworkQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

networ ARRAY 0-255 items. For details, Network object -


ks _REFER see Table 1-471. list.
ENCE

numbe int32 [1-255] - Quantity. 1


r

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"networks" : [
{
"name" : "testNetwork",
"router:external" : "false",
"admin_state_up" : "true",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"shared" : "false",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : 10,
"segments" : [
{
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : "123"
}
],
"binding:profile" : {
"arp_miss" : "true",
"arp_proxy" : 0,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 615


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"bum" : {
"broadcast_enable" : false,
"broadcast_cir_value" : 10,
"broadcast_cir_unit" : "gbps",
"broadcast_cbs_value" : 10,
"broadcast_cbs_unit" : "mbyte(s)",
"multicast_enable" : false,
"multicast_cir_value" : 10,
"multicast_cir_unit" : "gbps",
"multicast_cbs_value" : 10,
"multicast_cbs_unit" : "mbyte(s)",
"unknown_unicast_enable" : false,
"unknown_unicast_cir_value" : 10,
"unknown_unicast_cir_unit" : "gbps",
"unknown_unicast_cbs_value" : 10,
"unknown_unicast_cbs_unit" : "mbyte(s)"
}
},
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"number" : 1,
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.1.3 Query a Network by ID

Typical Scenarios
A network needs to be queried by ID.

Functions
Query a network by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 616


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/networks/{id}

Table 1-477 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - Network ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 617


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v2/neutronapi/networks/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
NetworkDtoWrapper parameters, For details, see Table 1-470.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"network" : {
"name" : "testNetwork",
"router:external" : "false",
"admin_state_up" : "true",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"shared" : "false",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : 10,
"segments" : [
{
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : "123"
}
],
"binding:profile" : {
"arp_miss" : "true",
"arp_proxy" : 0,
"bum" : {
"broadcast_enable" : false,
"broadcast_cir_value" : 10,
"broadcast_cir_unit" : "gbps",
"broadcast_cbs_value" : 10,
"broadcast_cbs_unit" : "mbyte(s)",
"multicast_enable" : false,
"multicast_cir_value" : 10,
"multicast_cir_unit" : "gbps",
"multicast_cbs_value" : 10,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 618


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"multicast_cbs_unit" : "mbyte(s)",
"unknown_unicast_enable" : false,
"unknown_unicast_cir_value" : 10,
"unknown_unicast_cir_unit" : "gbps",
"unknown_unicast_cbs_value" : 10,
"unknown_unicast_cbs_unit" : "mbyte(s)"
}
},
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.1.4 Update a Network by ID

Typical Scenarios
A network needs to be updated by name.

Functions
Update a network by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/networks/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 619


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-478 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - Network ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-479 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ Yes REFER For details, see Parameters for -


kDtoW ENCE Table 1-465. updating a
rapper network.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 620


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/networks/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"network" : {
"name" : "testNetwork",
"router:external" : "false",
"admin_state_up" : "true",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"shared" : "false",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : 10,
"segments" : [
{
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : "123"
}
],
"binding:profile" : {
"arp_miss" : "true",
"arp_proxy" : 0,
"bum" : {
"broadcast_enable" : false,
"broadcast_cir_value" : 10,
"broadcast_cir_unit" : "gbps",
"broadcast_cbs_value" : 10,
"broadcast_cbs_unit" : "mbyte(s)",
"multicast_enable" : false,
"multicast_cir_value" : 10,
"multicast_cir_unit" : "gbps",
"multicast_cbs_value" : 10,
"multicast_cbs_unit" : "mbyte(s)",
"unknown_unicast_enable" : false,
"unknown_unicast_cir_value" : 10,
"unknown_unicast_cir_unit" : "gbps",
"unknown_unicast_cbs_value" : 10,
"unknown_unicast_cbs_unit" : "mbyte(s)"
}
},
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
NetworkDtoWrapper parameters, For details, see Table 1-470.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 621


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"network" : {
"name" : "testNetwork",
"router:external" : "false",
"admin_state_up" : "true",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"shared" : "false",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : 10,
"segments" : [
{
"provider:physical_network" : "physnet1",
"provider:network_type" : "vlan",
"provider:segmentation_id" : "123"
}
],
"binding:profile" : {
"arp_miss" : "true",
"arp_proxy" : 0,
"bum" : {
"broadcast_enable" : false,
"broadcast_cir_value" : 10,
"broadcast_cir_unit" : "gbps",
"broadcast_cbs_value" : 10,
"broadcast_cbs_unit" : "mbyte(s)",
"multicast_enable" : false,
"multicast_cir_value" : 10,
"multicast_cir_unit" : "gbps",
"multicast_cbs_value" : 10,
"multicast_cbs_unit" : "mbyte(s)",
"unknown_unicast_enable" : false,
"unknown_unicast_cir_value" : 10,
"unknown_unicast_cir_unit" : "gbps",
"unknown_unicast_cbs_value" : 10,
"unknown_unicast_cbs_unit" : "mbyte(s)"
}
},
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 622


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.1.5 Delete a Network by ID

Typical Scenarios
A network needs to be deleted by ID. After a network is deleted, all the
corresponding subnets are deleted.

Functions
Delete a network by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/networks/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 623


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-480 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - Network ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/networks/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 624


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.2 Subnet
# Subnet operation APIs

1.9.5.2.1 Create a Subnet

Typical Scenarios
A subnet needs to be created.

Functions
Create a subnet.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 625


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 500 times/minute.


Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/subnets

Request Parameters

Table 1-481 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-482. creating a
subnet.

Table 1-482 NeutronSubnetDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

subnet Yes REFER For details, see Subnet object. -


ENCE Table 1-483.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 626


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-483 NeutronSubnetDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Subnet ID. This "20000000-000


charac field cannot be 0-0000-0000-0
ters. updated. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - Subnet name. "subnet1"


255
charac
ters.

ip_vers Yes int32 [1-255 - IP version. This 4


ion ] field cannot be
updated.

ipv6_a No string 0 to - IPv6 addressing "dhcpv6-


ddress 255 mode. stateful"
_mode charac
ters.

ipv6_ra No string 0 to - IPv6 route "dhcpv6-


_mode 255 broadcast stateful"
charac mode.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 627


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

networ Yes string 36 - Network ID. "DBB702C3-77


k_id charac This field 19-4FE6-
ters. cannot be A5AD-3A9C9E2
The updated. 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

cidr Yes string 0 to 64 - CIDR address. "192.168.10.0/2


charac This field 4"
ters. cannot be
updated.

gatew No string 0 to 64 - Gateway IP "192.168.10.1"


ay_ip charac address.
ters.

allocat No ARRAY 0-255 items. For Available IP -


ion_po _REFER details, see address pool.
ols ENCE Table 1-484.

dns_na No array< 0-255 - DNS server. ["192.168.10.1"


meserv string> items. ]
ers

host_r No ARRAY 0-255 items. For Static route of -


outes _REFER details, see a VM.
ENCE Table 1-485.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 628


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-0000-0
ters. updated. 00000000004"

enable No string 0 to - Whether to "false"


_dhcp 255 enable DHCP.
charac
ters.
● fals
e
● true

Table 1-484 NeutronSubnetAllocationPoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

start Yes string 0 to 64 - Start IP address "192.168.10.2"


charac of a network
ters. pool.

end Yes string 0 to 64 - End IP address "192.168.10.25


charac of a network 4"
ters. pool.

Table 1-485 HostRouteDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

destina No string 0 to - Destination "192.168.9.0/24


tion 255 subnet of a "
charac route.
ters.

nextho No string 0 to 64 - Next hop IP "192.168.53.1"


p charac address of a
ters. route.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/subnets HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 629


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"subnet" : {
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "subnet1",
"ip_version" : 4,
"ipv6_address_mode" : "dhcpv6-stateful",
"ipv6_ra_mode" : "dhcpv6-stateful",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.10.0/24",
"gateway_ip" : "192.168.10.1",
"allocation_pools" : [
{
"start" : "192.168.10.2",
"end" : "192.168.10.254"
}
],
"dns_nameservers" : ["192.168.10.1"],
"host_routes" : [
{
"destination" : "192.168.9.0/24",
"nexthop" : "192.168.53.1"
}
],
"tenant_id" : "00000000-0000-0000-0000-000000000004",
"enable_dhcp" : "false"
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-486 NeutronSubnetDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

subnet REFER For details, see Table Subnet object. -


ENCE 1-487.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 630


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-487 NeutronSubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Subnet ID. This "20000000-000


The value must field cannot be 0-0000-0000-0
meet the updated. 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - Subnet name. "subnet1"


characters.

ip_vers int32 [1-255] - IP version. This 4


ion field cannot be
updated.

ipv6_a string 0 to 255 - IPv6 addressing "dhcpv6-


ddress characters. mode. stateful"
_mode

ipv6_ra string 0 to 255 - IPv6 route "dhcpv6-


_mode characters. broadcast stateful"
mode.

networ string 36 characters. - Network ID. "DBB702C3-77


k_id The value must This field 19-4FE6-
meet the cannot be A5AD-3A9C9E2
following updated. 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

cidr string 0 to 64 - CIDR address. "192.168.10.0/2


characters. This field 4"
cannot be
updated.

gatew string 0 to 64 - Gateway IP "192.168.10.1"


ay_ip characters. address.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 631


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

allocat ARRAY 0-255 items. For details, Available IP -


ion_po _REFER see Table 1-488. address pool.
ols ENCE

dns_na array< 0-255 items. - DNS server. ["192.168.10.1"


meserv string> ]
ers

host_r ARRAY 0-255 items. For details, Static route of -


outes _REFER see Table 1-489. a VM.
ENCE

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-0000-0
updated. 00000000004"

enable string 0 to 255 - Whether to "false"


_dhcp characters. enable DHCP.
● false
● true

Table 1-488 NeutronSubnetAllocationPoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

start string 0 to 64 - Start IP address "192.168.10.2"


characters. of a network
pool.

end string 0 to 64 - End IP address "192.168.10.25


characters. of a network 4"
pool.

Table 1-489 HostRouteDto parameters


Param Type Value Range Defaul Description Example
eter t Value

destina string 0 to 255 - Destination "192.168.9.0/24


tion characters. subnet of a "
route.

nextho string 0 to 64 - Next hop IP "192.168.53.1"


p characters. address of a
route.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 632


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"subnet" : {
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "subnet1",
"ip_version" : 4,
"ipv6_address_mode" : "dhcpv6-stateful",
"ipv6_ra_mode" : "dhcpv6-stateful",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.10.0/24",
"gateway_ip" : "192.168.10.1",
"allocation_pools" : [
{
"start" : "192.168.10.2",
"end" : "192.168.10.254"
}
],
"dns_nameservers" : ["192.168.10.1"],
"host_routes" : [
{
"destination" : "192.168.9.0/24",
"nexthop" : "192.168.53.1"
}
],
"tenant_id" : "00000000-0000-0000-0000-000000000004",
"enable_dhcp" : "false"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 633


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.2.2 Query Subnets

Typical Scenarios
All subnets need to be queried.

Functions
Query all subnets.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/subnets

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 634


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-490 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ No string 36 - Network ID. "DBB702C3-77


k_id charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/subnets?network_id=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 635


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: Created.

Table 1-491 SubnetQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet ARRAY 0-255 items. For details, Subnet list. -


s _REFER see Table 1-487.
ENCE

numbe int32 [0-2147483647 - Number of 1


r ] subnets.

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: Created.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"subnets" : [
{
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "subnet1",
"ip_version" : 4,
"ipv6_address_mode" : "dhcpv6-stateful",
"ipv6_ra_mode" : "dhcpv6-stateful",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.10.0/24",
"gateway_ip" : "192.168.10.1",
"allocation_pools" : [
{
"start" : "192.168.10.2",
"end" : "192.168.10.254"
}
],
"dns_nameservers" : ["192.168.10.1"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 636


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"host_routes" : [
{
"destination" : "192.168.9.0/24",
"nexthop" : "192.168.53.1"
}
],
"tenant_id" : "00000000-0000-0000-0000-000000000004",
"enable_dhcp" : "false"
}
],
"number" : 1,
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.2.3 Query a Subnet by ID

Typical Scenarios
A subnet needs to be queried by ID.

Functions
Query a subnet by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/subnets/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 637


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-492 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Parameters for "DBB702C3-77


charac querying a 19-4FE6-
ters. subnet. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/subnets/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 638


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

NeutronSubnetDtoWrapper parameters, For details, see Table 1-486.


Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"subnet" : {
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "subnet1",
"ip_version" : 4,
"ipv6_address_mode" : "dhcpv6-stateful",
"ipv6_ra_mode" : "dhcpv6-stateful",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.10.0/24",
"gateway_ip" : "192.168.10.1",
"allocation_pools" : [
{
"start" : "192.168.10.2",
"end" : "192.168.10.254"
}
],
"dns_nameservers" : ["192.168.10.1"],
"host_routes" : [
{
"destination" : "192.168.9.0/24",
"nexthop" : "192.168.53.1"
}
],
"tenant_id" : "00000000-0000-0000-0000-000000000004",
"enable_dhcp" : "false"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 639


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.2.4 Update a Subnet by ID

Typical Scenarios
A subnet needs to be updated by ID.

Functions
Update a subnet by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/subnets/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 640


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-493 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Subnet ID "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-494 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-482. updating a
subnet.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/subnets/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 641


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"subnet" : {
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "subnet1",
"ip_version" : 4,
"ipv6_address_mode" : "dhcpv6-stateful",
"ipv6_ra_mode" : "dhcpv6-stateful",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.10.0/24",
"gateway_ip" : "192.168.10.1",
"allocation_pools" : [
{
"start" : "192.168.10.2",
"end" : "192.168.10.254"
}
],
"dns_nameservers" : ["192.168.10.1"],
"host_routes" : [
{
"destination" : "192.168.9.0/24",
"nexthop" : "192.168.53.1"
}
],
"tenant_id" : "00000000-0000-0000-0000-000000000004",
"enable_dhcp" : "false"
}
}

Response Parameters
Response status code 200: Response status code 204: OK.
NeutronSubnetDtoWrapper parameters, For details, see Table 1-486.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 204: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"subnet" : {
"id" : "20000000-0000-0000-0000-000000000001",
"name" : "subnet1",
"ip_version" : 4,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 642


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ipv6_address_mode" : "dhcpv6-stateful",
"ipv6_ra_mode" : "dhcpv6-stateful",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.10.0/24",
"gateway_ip" : "192.168.10.1",
"allocation_pools" : [
{
"start" : "192.168.10.2",
"end" : "192.168.10.254"
}
],
"dns_nameservers" : ["192.168.10.1"],
"host_routes" : [
{
"destination" : "192.168.9.0/24",
"nexthop" : "192.168.53.1"
}
],
"tenant_id" : "00000000-0000-0000-0000-000000000004",
"enable_dhcp" : "false"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.2.5 Delete a Subnet by ID

Typical Scenarios
A subnet needs to be deleted by ID.

Functions
Delete a subnet by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 2000 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 643


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/neutronapi/subnets/{id}

Table 1-495 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Subnet ID "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/subnets/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 644


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.3 Port
# Port operation APIs

1.9.5.3.1 Create a Port

Typical Scenarios
A port needs to be created.

Functions
Create a port.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 645


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 600 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/ports

Request Parameters

Table 1-496 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

Neutro Yes REFER For details, see Parameters for -


nportD ENCE Table 1-497. creating a port.
toWra
pper

Table 1-497 NeutronPortDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

port Yes REFER For details, see Port -


ENCE Table 1-498. information.

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name. This
charac field cannot be
ters. updated.

Table 1-498 NeutronPortDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

name No string 0 to - Port name. "test_name"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 646


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - UUID. This field "DBB702C3-77


charac cannot be 19-4FE6-
ters. updated. A5AD-3A9C9E2
36 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 647


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

networ Yes string 0 to 36 - Network ID. "DBB702C3-77


k_id charac This field 19-4FE6-
ters. cannot be A5AD-3A9C9E2
36 updated. 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

mac_a Yes string 0 to 32 - Port MAC "fa:16:3e:9e:ff:


ddress charac address. If 55"
ters. device_owner
is set to
network:router
_interface, the
input value
does not take
effect, and the
controller sets
this parameter
to a fixed MAC
address.

fixed_i No ARRAY 0-255 items. For IP address of a -


ps _REFER details, see port.
ENCE Table 1-499.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 648


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device_ No string 0 to 36 - ID of the "40000000-111


id charac device that 1-0000-0000-0
ters. uses the port. 00000099001"
The value of
this parameter
depends on the
value of
device_owner.
For example, if
device_owner
is set to
network:router
_gateway or
network:router
_interface, this
parameter
needs to be set
to a logical
router ID; if
device_owner
is set to
compute:nova
or
network:dhcp,
this parameter
needs to be set
to a device ID.

device_ No string 0 to - Type of the "compute:nova


owner 255 object to which "
charac the port
ters. belongs. The
value can be a
VM
(compute:nova
), router
(network:route
r_interface),
DHCP server
(network:dhcp)
, routing
gateway
(network:route
r_gateway), or
load balancer
(neutron:LOAD
BALANCER).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 649


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string 0 to 36 - Tenant ID. This "14c6bc47-5a5


_id charac field cannot be c-47da-
ters. updated. bff3-7ed2b0ca
8c8f"

status No string 0 to - Port status. "ACTIVE"


255
charac
ters.

bindin No string 0 to 64 - Extended "normal"


g:vif_ty charac attribute: VIF
pe ters. type.

bindin No string 0 to - Detailed "details"


g:vif_d 255 information
etails charac about a VIF.
ters.

bindin No string 0 to - Extended "compute-192.


g:host_ 255 attribute: host 168.8.161"
id charac ID. In the
ters. distributed
hybrid overlay
solution, this
parameter is
mandatory and
the value is the
ID of the
CE1800V. In
the network
overlay
solution, this
parameter is
optional and
the value is the
host name of
the compute
node where
the VM is
located.

bindin No REFER For details, see Profile -


g:profil ENCE Table 1-500. information.
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 650


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

port_se No string 0 to - Extended "true"


curity_ 255 attribute:
enable charac whether the
d ters. port supports
● true security
● fals groups.
e

securit No array< 0-255 - Extended ["00000000-00


y_grou string> items. attribute: UUID 00-0000-2222-
ps Each of a security 000000000001
item group. "]
has 0
to 36
charac
ters.

allowe No ARRAY 0-255 items. For Extended -


d_addr _REFER details, see attributed: IP
ess_pai ENCE Table 1-502. address or
rs MAC address
pair list.

extra_d No ARRAY 0-255 items. For Extended -


hcp_op _REFER details, see attribute:
ts ENCE Table 1-503. extended
option of
DHCP.

bindin No string 0 to 64 - Type of the "normal"


g:vnic_ charac bound vNIC.
type ters.

qos_po No string 0 to 36 - QoS policy ID. "DBB702C3-77


licy_id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

device_ No string 0 to 64 - Physical switch, "123"


group_ charac firewall, or LB
id ters. group ID.

interfa No string 0 to - Physical device "123"


ce_id 255 port ID. It is a
charac backfilling
ters. attribute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 651


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

trunkp No string 0 to - Trunk port "trunk"


ort:typ 255 type. If the
e charac value is left
ters. empty, the
original port
type is used.
The value
trunk indicates
a trunk port
and the value
subport
indicates a
subport of a
trunk port.
Other
unidentified
values are
processed as
the original
port type.

trunkp No string 0 to 36 - ID of a trunk "123"


ort:par charac interface when
ent_id ters. the port type is
subport.

trunkp No int32 0 to - VLAN ID 10


ort:vid 21474 allowed by a
83647 trunk interface
charac when the port
ters. type is subport.
[1-214
74836
47]

admin No string 0 to - Administrative "true"


_state_ 255 status.
up charac
ters.

mtu No string 0 to - Maximum "1500"


65536 transmission
charac unit.
ters.

trunkD No REFER For details, see Trunk details. -


etails ENCE Table 1-504.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 652


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-499 FixedIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

subnet No string 0 to 36 - Subnet ID "DBB702C3-77


_id charac 19-4FE6-
ters. A5AD-3A9C9E2
36 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

ip_add No string 0 to 64 - IP address. "192.168.73.16


ress charac "
ters.

Table 1-500 BindProfileDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

migrati No string 0 to - ID or name of "testHost"


ng_hos 255 the host to
t charac which the VM
ters. is migrated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 653


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

migrati No string 0 to - VM migration "ACTIVE"


ng_sta 255 status.
tus charac
ters.

extern No string 0 to - External VLAN. "vlan1"


al_vlan 255
charac
ters.

local_li No ARRAY 0-255 items. For Local link -


nk_inf _REFER details, see information.
ormati ENCE Table 1-501.
on

Table 1-501 LocalLinkInformationDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

switch No string 0 to 36 - Switch ID. "00000000-000


_id charac 0-0000-0000-0
ters. 00000000002"

mgmtI No string 0 to 64 - Migrated IP "192.168.5.3"


P charac address.
ters.

port_id No string 0 to 36 - Port ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000003"

switch No string 0 to - Switch "123"


_info 255 information.
charac
ters.

Table 1-502 AddressPairDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

mac_a No string 0 to 64 - MAC address. "fa:16:3e:9e:ff:


ddress charac 55"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 654


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ip_add No string 0 to 64 - IP address, "192.168.1.1"


ress charac which cannot
ters. be empty.

Table 1-503 DHCPOptionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to 36 - Option ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

opt_na No string 0 to - Option name. "test"


me 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 655


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

opt_val No string 0 to - Option value. "testValue"


ue 255
charac
ters.

Table 1-504 TrunkDetailDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

trunk_i No string 0 to 36 - Trunk ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

sub_po No ARRAY 0-255 items. For Sub-interface -


rts _REFER details, see of a trunk
ENCE Table 1-505. interface.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 656


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-505 SubPortDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

segme No int32 [2-409 - Segmentation 10


ntation 4] ID.
_id

port_id No string 0 to 36 - Sub-interface "DBB702C3-77


charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

segme No string 0 to 10 - Network type. "vlan"


ntation charac
_type ters.

mac_a No string 0 to 64 - MAC address. "00-FF-9E-8B-


ddress charac FF-26"
ters.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/ports HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 657


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port" : {
"name" : "test_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.73.16"
}
],
"device_id" : "40000000-1111-0000-0000-000000099001",
"device_owner" : "compute:nova",
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"status" : "ACTIVE",
"binding:vif_type" : "normal",
"binding:vif_details" : "details",
"binding:host_id" : "compute-192.168.8.161",
"binding:profile" : {
"migrating_host" : "testHost",
"migrating_status" : "ACTIVE",
"external_vlan" : "vlan1",
"local_link_information" : [
{
"switch_id" : "00000000-0000-0000-0000-000000000002",
"mgmtIP" : "192.168.5.3",
"port_id" : "00000000-0000-0000-0000-000000000003",
"switch_info" : "123"
}
]
},
"port_security_enabled" : "true",
"security_groups" : ["00000000-0000-0000-2222-000000000001"],
"allowed_address_pairs" : [
{
"mac_address" : "fa:16:3e:9e:ff:55",
"ip_address" : "192.168.1.1"
}
],
"extra_dhcp_opts" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"opt_name" : "test",
"opt_value" : "testValue"
}
],
"binding:vnic_type" : "normal",
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"device_group_id" : "123",
"interface_id" : "123",
"trunkport:type" : "trunk",
"trunkport:parent_id" : "123",
"trunkport:vid" : 10,
"admin_state_up" : "true",
"mtu" : "1500",
"trunkDetails" : {
"trunk_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"sub_ports" : [
{
"segmentation_id" : 10,
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"segmentation_type" : "vlan",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 658


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"mac_address" : "00-FF-9E-8B-FF-26"
}
]
}
},
"service_name" : "physnet1"
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-506 NeutronPortDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

port REFER For details, see Table Port -


ENCE 1-507. information.

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name. This
field cannot be
updated.

Table 1-507 NeutronPortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

name string 0 to 255 - Port name. "test_name"


characters.

id string 0 to 36 - UUID. This field "DBB702C3-77


characters. 36 cannot be 19-4FE6-
characters. The updated. A5AD-3A9C9E2
value must 65309"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 659


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

networ string 0 to 36 - Network ID. "DBB702C3-77


k_id characters. 36 This field 19-4FE6-
characters. The cannot be A5AD-3A9C9E2
value must updated. 65309"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

mac_a string 0 to 32 - Port MAC "fa:16:3e:9e:ff:


ddress characters. address. If 55"
device_owner
is set to
network:router
_interface, the
input value
does not take
effect, and the
controller sets
this parameter
to a fixed MAC
address.

fixed_i ARRAY 0-255 items. For details, IP address of a -


ps _REFER see Table 1-508. port.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 660


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device_ string 0 to 36 - ID of the "40000000-111


id characters. device that 1-0000-0000-0
uses the port. 00000099001"
The value of
this parameter
depends on the
value of
device_owner.
For example, if
device_owner
is set to
network:router
_gateway or
network:router
_interface, this
parameter
needs to be set
to a logical
router ID; if
device_owner
is set to
compute:nova
or
network:dhcp,
this parameter
needs to be set
to a device ID.

device_ string 0 to 255 - Type of the "compute:nova


owner characters. object to which "
the port
belongs. The
value can be a
VM
(compute:nova
), router
(network:route
r_interface),
DHCP server
(network:dhcp)
, routing
gateway
(network:route
r_gateway), or
load balancer
(neutron:LOAD
BALANCER).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 661


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenant string 0 to 36 - Tenant ID. This "14c6bc47-5a5


_id characters. field cannot be c-47da-
updated. bff3-7ed2b0ca
8c8f"

status string 0 to 255 - Port status. "ACTIVE"


characters.

bindin string 0 to 64 - Extended "normal"


g:vif_ty characters. attribute: VIF
pe type.

bindin string 0 to 255 - Detailed "details"


g:vif_d characters. information
etails about a VIF.

bindin string 0 to 255 - Extended "compute-192.


g:host_ characters. attribute: host 168.8.161"
id ID. In the
distributed
hybrid overlay
solution, this
parameter is
mandatory and
the value is the
ID of the
CE1800V. In
the network
overlay
solution, this
parameter is
optional and
the value is the
host name of
the compute
node where
the VM is
located.

bindin REFER For details, see Table Profile -


g:profil ENCE 1-509. information.
e

port_se string 0 to 255 - Extended "true"


curity_ characters. attribute:
enable ● true whether the
d port supports
● false
security
groups.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 662


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

securit array< 0-255 items. - Extended ["00000000-00


y_grou string> Each item has 0 attribute: UUID 00-0000-2222-
ps to 36 of a security 000000000001
characters. group. "]

allowe ARRAY 0-255 items. For details, Extended -


d_addr _REFER see Table 1-511. attributed: IP
ess_pai ENCE address or
rs MAC address
pair list.

extra_d ARRAY 0-255 items. For details, Extended -


hcp_op _REFER see Table 1-512. attribute:
ts ENCE extended
option of
DHCP.

bindin string 0 to 64 - Type of the "normal"


g:vnic_ characters. bound vNIC.
type

qos_po string 0 to 36 - QoS policy ID. "DBB702C3-77


licy_id characters. 19-4FE6-
A5AD-3A9C9E2
65309"

device_ string 0 to 64 - Physical switch, "123"


group_ characters. firewall, or LB
id group ID.

interfa string 0 to 255 - Physical device "123"


ce_id characters. port ID. It is a
backfilling
attribute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 663


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

trunkp string 0 to 255 - Trunk port "trunk"


ort:typ characters. type. If the
e value is left
empty, the
original port
type is used.
The value
trunk indicates
a trunk port
and the value
subport
indicates a
subport of a
trunk port.
Other
unidentified
values are
processed as
the original
port type.

trunkp string 0 to 36 - ID of a trunk "123"


ort:par characters. interface when
ent_id the port type is
subport.

trunkp int32 0 to - VLAN ID 10


ort:vid 2147483647 allowed by a
characters. trunk interface
[1-2147483647 when the port
] type is subport.

admin string 0 to 255 - Administrative "true"


_state_ characters. status.
up

mtu string 0 to 65536 - Maximum "1500"


characters. transmission
unit.

trunkD REFER For details, see Table Trunk details. -


etails ENCE 1-513.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 664


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-508 FixedIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet string 0 to 36 - Subnet ID "DBB702C3-77


_id characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 65309"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

ip_add string 0 to 64 - IP address. "192.168.73.16


ress characters. "

Table 1-509 BindProfileDto parameters


Param Type Value Range Defaul Description Example
eter t Value

migrati string 0 to 255 - ID or name of "testHost"


ng_hos characters. the host to
t which the VM
is migrated.

migrati string 0 to 255 - VM migration "ACTIVE"


ng_sta characters. status.
tus

extern string 0 to 255 - External VLAN. "vlan1"


al_vlan characters.

local_li ARRAY 0-255 items. For details, Local link -


nk_inf _REFER see Table 1-510. information.
ormati ENCE
on

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 665


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-510 LocalLinkInformationDto parameters

Param Type Value Range Defaul Description Example


eter t Value

switch string 0 to 36 - Switch ID. "00000000-000


_id characters. 0-0000-0000-0
00000000002"

mgmtI string 0 to 64 - Migrated IP "192.168.5.3"


P characters. address.

port_id string 0 to 36 - Port ID. "00000000-000


characters. 0-0000-0000-0
00000000003"

switch string 0 to 255 - Switch "123"


_info characters. information.

Table 1-511 AddressPairDto parameters

Param Type Value Range Defaul Description Example


eter t Value

mac_a string 0 to 64 - MAC address. "fa:16:3e:9e:ff:


ddress characters. 55"

ip_add string 0 to 64 - IP address, "192.168.1.1"


ress characters. which cannot
be empty.

Table 1-512 DHCPOptionDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 36 - Option ID. "DBB702C3-77


characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 60001"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 666


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

opt_na string 0 to 255 - Option name. "test"


me characters.

opt_val string 0 to 255 - Option value. "testValue"


ue characters.

Table 1-513 TrunkDetailDto parameters


Param Type Value Range Defaul Description Example
eter t Value

trunk_i string 0 to 36 - Trunk ID. "DBB702C3-77


d characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 60001"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

sub_po ARRAY 0-255 items. For details, Sub-interface -


rts _REFER see Table 1-514. of a trunk
ENCE interface.

Table 1-514 SubPortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

segme int32 [2-4094] - Segmentation 10


ntation ID.
_id

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 667


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

port_id string 0 to 36 - Sub-interface "DBB702C3-77


characters. 36 ID. 19-4FE6-
characters. The A5AD-3A9C9E2
value must 60001"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

segme string 0 to 10 - Network type. "vlan"


ntation characters.
_type

mac_a string 0 to 64 - MAC address. "00-FF-9E-8B-


ddress characters. FF-26"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : {
"name" : "test_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.73.16"
}
],
"device_id" : "40000000-1111-0000-0000-000000099001",
"device_owner" : "compute:nova",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 668


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"status" : "ACTIVE",
"binding:vif_type" : "normal",
"binding:vif_details" : "details",
"binding:host_id" : "compute-192.168.8.161",
"binding:profile" : {
"migrating_host" : "testHost",
"migrating_status" : "ACTIVE",
"external_vlan" : "vlan1",
"local_link_information" : [
{
"switch_id" : "00000000-0000-0000-0000-000000000002",
"mgmtIP" : "192.168.5.3",
"port_id" : "00000000-0000-0000-0000-000000000003",
"switch_info" : "123"
}
]
},
"port_security_enabled" : "true",
"security_groups" : ["00000000-0000-0000-2222-000000000001"],
"allowed_address_pairs" : [
{
"mac_address" : "fa:16:3e:9e:ff:55",
"ip_address" : "192.168.1.1"
}
],
"extra_dhcp_opts" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"opt_name" : "test",
"opt_value" : "testValue"
}
],
"binding:vnic_type" : "normal",
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"device_group_id" : "123",
"interface_id" : "123",
"trunkport:type" : "trunk",
"trunkport:parent_id" : "123",
"trunkport:vid" : 10,
"admin_state_up" : "true",
"mtu" : "1500",
"trunkDetails" : {
"trunk_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"sub_ports" : [
{
"segmentation_id" : 10,
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"segmentation_type" : "vlan",
"mac_address" : "00-FF-9E-8B-FF-26"
}
]
}
},
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 669


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.3.2 Query All Ports

Typical Scenarios
A port needs to be created.

Functions
Query all ports.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 600 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/ports

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 670


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-515 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ No string 0 to 36 - Network ID. "DBB702C3-77


k_id charac 19-4FE6-
ters. A5AD-3A9C9E2
36 65309"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/ports?network_id=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 671


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-516 PortQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ports ARRAY 0-255 items. For details, Port list. -


_REFER see Table 1-507.
ENCE

numbe int32 [0-2147483647 - Number of 1


r ] ports in a list.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ports" : [
{
"name" : "test_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.73.16"
}
],
"device_id" : "40000000-1111-0000-0000-000000099001",
"device_owner" : "compute:nova",
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"status" : "ACTIVE",
"binding:vif_type" : "normal",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 672


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"binding:vif_details" : "details",
"binding:host_id" : "compute-192.168.8.161",
"binding:profile" : {
"migrating_host" : "testHost",
"migrating_status" : "ACTIVE",
"external_vlan" : "vlan1",
"local_link_information" : [
{
"switch_id" : "00000000-0000-0000-0000-000000000002",
"mgmtIP" : "192.168.5.3",
"port_id" : "00000000-0000-0000-0000-000000000003",
"switch_info" : "123"
}
]
},
"port_security_enabled" : "true",
"security_groups" : ["00000000-0000-0000-2222-000000000001"],
"allowed_address_pairs" : [
{
"mac_address" : "fa:16:3e:9e:ff:55",
"ip_address" : "192.168.1.1"
}
],
"extra_dhcp_opts" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"opt_name" : "test",
"opt_value" : "testValue"
}
],
"binding:vnic_type" : "normal",
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"device_group_id" : "123",
"interface_id" : "123",
"trunkport:type" : "trunk",
"trunkport:parent_id" : "123",
"trunkport:vid" : 10,
"admin_state_up" : "true",
"mtu" : "1500",
"trunkDetails" : {
"trunk_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"sub_ports" : [
{
"segmentation_id" : 10,
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"segmentation_type" : "vlan",
"mac_address" : "00-FF-9E-8B-FF-26"
}
]
}
}
],
"number" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 673


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.3.3 Query a Port by ID

Typical Scenarios
Query a Port by ID.

Functions
Query a port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 600 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/ports/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 674


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-517 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - Port ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/ports/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 675


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Response status code 201: OK.
NeutronPortDtoWrapper parameters, For details, see Table 1-506.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : {
"name" : "test_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.73.16"
}
],
"device_id" : "40000000-1111-0000-0000-000000099001",
"device_owner" : "compute:nova",
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"status" : "ACTIVE",
"binding:vif_type" : "normal",
"binding:vif_details" : "details",
"binding:host_id" : "compute-192.168.8.161",
"binding:profile" : {
"migrating_host" : "testHost",
"migrating_status" : "ACTIVE",
"external_vlan" : "vlan1",
"local_link_information" : [
{
"switch_id" : "00000000-0000-0000-0000-000000000002",
"mgmtIP" : "192.168.5.3",
"port_id" : "00000000-0000-0000-0000-000000000003",
"switch_info" : "123"
}
]
},
"port_security_enabled" : "true",
"security_groups" : ["00000000-0000-0000-2222-000000000001"],
"allowed_address_pairs" : [
{
"mac_address" : "fa:16:3e:9e:ff:55",
"ip_address" : "192.168.1.1"
}
],
"extra_dhcp_opts" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 676


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"opt_name" : "test",
"opt_value" : "testValue"
}
],
"binding:vnic_type" : "normal",
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"device_group_id" : "123",
"interface_id" : "123",
"trunkport:type" : "trunk",
"trunkport:parent_id" : "123",
"trunkport:vid" : 10,
"admin_state_up" : "true",
"mtu" : "1500",
"trunkDetails" : {
"trunk_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"sub_ports" : [
{
"segmentation_id" : 10,
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"segmentation_type" : "vlan",
"mac_address" : "00-FF-9E-8B-FF-26"
}
]
}
},
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.3.4 Update a Port by ID

Typical Scenarios
A port needs to be deleted by ID.

Functions
Update a port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 600 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 677


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/ports/{id}

Table 1-518 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - Port ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 678


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-519 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

Neutro Yes REFER For details, see Parameters for -


nportD ENCE Table 1-497. updating a
toWra port.
pper

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/ports/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port" : {
"name" : "test_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.73.16"
}
],
"device_id" : "40000000-1111-0000-0000-000000099001",
"device_owner" : "compute:nova",
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"status" : "ACTIVE",
"binding:vif_type" : "normal",
"binding:vif_details" : "details",
"binding:host_id" : "compute-192.168.8.161",
"binding:profile" : {
"migrating_host" : "testHost",
"migrating_status" : "ACTIVE",
"external_vlan" : "vlan1",
"local_link_information" : [
{
"switch_id" : "00000000-0000-0000-0000-000000000002",
"mgmtIP" : "192.168.5.3",
"port_id" : "00000000-0000-0000-0000-000000000003",
"switch_info" : "123"
}
]
},
"port_security_enabled" : "true",
"security_groups" : ["00000000-0000-0000-2222-000000000001"],
"allowed_address_pairs" : [
{
"mac_address" : "fa:16:3e:9e:ff:55",
"ip_address" : "192.168.1.1"
}
],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 679


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"extra_dhcp_opts" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"opt_name" : "test",
"opt_value" : "testValue"
}
],
"binding:vnic_type" : "normal",
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"device_group_id" : "123",
"interface_id" : "123",
"trunkport:type" : "trunk",
"trunkport:parent_id" : "123",
"trunkport:vid" : 10,
"admin_state_up" : "true",
"mtu" : "1500",
"trunkDetails" : {
"trunk_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"sub_ports" : [
{
"segmentation_id" : 10,
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"segmentation_type" : "vlan",
"mac_address" : "00-FF-9E-8B-FF-26"
}
]
}
},
"service_name" : "physnet1"
}

Response Parameters
Response status code 200: Response status code 201: OK.
NeutronPortDtoWrapper parameters, For details, see Table 1-506.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : {
"name" : "test_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 680


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ip_address" : "192.168.73.16"
}
],
"device_id" : "40000000-1111-0000-0000-000000099001",
"device_owner" : "compute:nova",
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"status" : "ACTIVE",
"binding:vif_type" : "normal",
"binding:vif_details" : "details",
"binding:host_id" : "compute-192.168.8.161",
"binding:profile" : {
"migrating_host" : "testHost",
"migrating_status" : "ACTIVE",
"external_vlan" : "vlan1",
"local_link_information" : [
{
"switch_id" : "00000000-0000-0000-0000-000000000002",
"mgmtIP" : "192.168.5.3",
"port_id" : "00000000-0000-0000-0000-000000000003",
"switch_info" : "123"
}
]
},
"port_security_enabled" : "true",
"security_groups" : ["00000000-0000-0000-2222-000000000001"],
"allowed_address_pairs" : [
{
"mac_address" : "fa:16:3e:9e:ff:55",
"ip_address" : "192.168.1.1"
}
],
"extra_dhcp_opts" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"opt_name" : "test",
"opt_value" : "testValue"
}
],
"binding:vnic_type" : "normal",
"qos_policy_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"device_group_id" : "123",
"interface_id" : "123",
"trunkport:type" : "trunk",
"trunkport:parent_id" : "123",
"trunkport:vid" : 10,
"admin_state_up" : "true",
"mtu" : "1500",
"trunkDetails" : {
"trunk_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"sub_ports" : [
{
"segmentation_id" : 10,
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"segmentation_type" : "vlan",
"mac_address" : "00-FF-9E-8B-FF-26"
}
]
}
},
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 681


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.3.5 Delete a Port by ID

Typical Scenarios
A port needs to be deleted by ID.

Functions
Update a port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 600 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/ports/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 682


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-520 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - Port ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
36 60001"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/ports/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 683


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4 Router
# Router operation APIs

1.9.5.4.1 Create a Router

Typical Scenarios
A router needs to be created.

Functions
Create a router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 684


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/routers

Request Parameters

Table 1-521 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router Yes REFER For details, see Router. -


DtoWr ENCE Table 1-522.
apper

Table 1-522 RouterDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

router Yes REFER For details, see Router -


ENCE Table 1-523. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 685


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-523 RouterDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. This "DBB702C3-77


charac field cannot be 19-4FE6-
ters. updated. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - Router name. "router1"


255
charac
ters.

admin No string 0 to - Administrative "true"


_state_ 255 status.
up charac
ters.
● true
● fals
e

status No string 0 to - Router status. "ACTIVE"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 686


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

extern No REFER For details, see External -


al_gate ENCE Table 1-524. gateway
way_in information.
fo

routes No ARRAY 0-255 items. For Route, which is -


_REFER details, see configured
ENCE Table 1-525. using the
routes
interface.
When a router
is created or
modified, do
not set this
parameter.

vpn- No string 0 to - VPN instance "vpn1"


instanc 255 name. This
e charac field cannot be
ters. updated.

provid No int64 [1-160 - L3VNI value. 10


er:seg 00000] This field
mentat cannot be
ion_id updated.

provid No string 0 to - Export RT of a "3:1000"


er:vrf_r 255 VRF.
t_expo charac
rt ters.

provid No array< 0-255 - Import RT of a ["3:1000"]


er:vrf_r string> items. VRF.
t_impo
rt

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 687


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-524 ExternalGatewayDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

port_id No string 36 - Gateway port "00000000-000


charac ID. 0-0000-3222-0
ters. 00000000003"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

enable No string 0 to 5 - Whether to "false"


d_snat charac enable global
ters. SNAT.
● true
● fals
e

Table 1-525 RouteDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

destina No string 0 to 64 - Destination "192.168.2.0/24


tion charac address. "
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 688


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

nextho No string 0 to 64 - Next hop. "192.168.2.2"


p charac
ters.

track_t No string 0 to 16 - Track type. "share-bfd"


ype charac
ters.

port_id No string 36 - VM port ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/routers HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 689


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"name" : "router1",
"admin_state_up" : "true",
"status" : "ACTIVE",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"external_gateway_info" : {
"port_id" : "00000000-0000-0000-3222-000000000003",
"enabled_snat" : "false"
},
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"vpn-instance" : "vpn1",
"provider:segmentation_id" : 10,
"provider:vrf_rt_export" : "3:1000",
"provider:vrf_rt_import" : ["3:1000"]
}
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-526 RouterDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

router REFER For details, see Table Router -


ENCE 1-527. information.

Table 1-527 RouterDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 36 characters. - Router ID. This "DBB702C3-77


The value must field cannot be 19-4FE6-
meet the updated. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 690


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

name string 0 to 255 - Router name. "router1"


characters.

admin string 0 to 255 - Administrative "true"


_state_ characters. status.
up ● true
● false

status string 0 to 255 - Router status. "ACTIVE"


characters.

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

extern REFER For details, see Table External -


al_gate ENCE 1-528. gateway
way_in information.
fo

routes ARRAY 0-255 items. For details, Route, which is -


_REFER see Table 1-529. configured
ENCE using the
routes
interface.
When a router
is created or
modified, do
not set this
parameter.

vpn- string 0 to 255 - VPN instance "vpn1"


instanc characters. name. This
e field cannot be
updated.

provid int64 [1-16000000] - L3VNI value. 10


er:seg This field
mentat cannot be
ion_id updated.

provid string 0 to 255 - Export RT of a "3:1000"


er:vrf_r characters. VRF.
t_expo
rt

provid array< 0-255 items. - Import RT of a ["3:1000"]


er:vrf_r string> VRF.
t_impo
rt

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 691


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-528 ExternalGatewayDto parameters


Param Type Value Range Defaul Description Example
eter t Value

port_id string 36 characters. - Gateway port "00000000-000


The value must ID. 0-0000-3222-0
meet the 00000000003"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

enable string 0 to 5 - Whether to "false"


d_snat characters. enable global
● true SNAT.
● false

Table 1-529 RouteDto parameters


Param Type Value Range Defaul Description Example
eter t Value

destina string 0 to 64 - Destination "192.168.2.0/24


tion characters. address. "

nextho string 0 to 64 - Next hop. "192.168.2.2"


p characters.

track_t string 0 to 16 - Track type. "share-bfd"


ype characters.

port_id string 36 characters. - VM port ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 692


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "router1",
"admin_state_up" : "true",
"status" : "ACTIVE",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"external_gateway_info" : {
"port_id" : "00000000-0000-0000-3222-000000000003",
"enabled_snat" : "false"
},
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"vpn-instance" : "vpn1",
"provider:segmentation_id" : 10,
"provider:vrf_rt_export" : "3:1000",
"provider:vrf_rt_import" : ["3:1000"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 693


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.4.2 Query All Routers

Typical Scenarios
All routers need to be queried.

Functions
Query all routers.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/routers

Table 1-530 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/routers?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 694


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-531 RouterQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

routers ARRAY 0-255 items. For details, Router -


_REFER see Table 1-527. information.
ENCE

numbe int32 [0-2147483647 - Quantity. 1


r ]

service string 0 to 255 - Cloud platform "physnet1"


Name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routers" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "router1",
"admin_state_up" : "true",
"status" : "ACTIVE",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"external_gateway_info" : {
"port_id" : "00000000-0000-0000-3222-000000000003",
"enabled_snat" : "false"
},
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"vpn-instance" : "vpn1",
"provider:segmentation_id" : 10,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 695


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"provider:vrf_rt_export" : "3:1000",
"provider:vrf_rt_import" : ["3:1000"]
}
],
"number" : 1,
"serviceName" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4.3 Query a Router by ID

Typical Scenarios
A router needs to be queried by ID.

Functions
Query a router by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/routers/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 696


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-532 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 697


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

RouterDtoWrapper parameters, For details, see Table 1-526.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "router1",
"admin_state_up" : "true",
"status" : "ACTIVE",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"external_gateway_info" : {
"port_id" : "00000000-0000-0000-3222-000000000003",
"enabled_snat" : "false"
},
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"vpn-instance" : "vpn1",
"provider:segmentation_id" : 10,
"provider:vrf_rt_export" : "3:1000",
"provider:vrf_rt_import" : ["3:1000"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 698


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.4.4 Update a Router

Typical Scenarios
A router needs to be updated by ID.

Functions
Update a router by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routers/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 699


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-533 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-534 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router Yes REFER For details, see Router. -


DtoWr ENCE Table 1-522.
apper

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 700


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "router1",
"admin_state_up" : "true",
"status" : "ACTIVE",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"external_gateway_info" : {
"port_id" : "00000000-0000-0000-3222-000000000003",
"enabled_snat" : "false"
},
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"vpn-instance" : "vpn1",
"provider:segmentation_id" : 10,
"provider:vrf_rt_export" : "3:1000",
"provider:vrf_rt_import" : ["3:1000"]
}
}

Response Parameters
Response status code 200: Response status code 201: OK.
RouterDtoWrapper parameters, For details, see Table 1-526.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "router1",
"admin_state_up" : "true",
"status" : "ACTIVE",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"external_gateway_info" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 701


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"port_id" : "00000000-0000-0000-3222-000000000003",
"enabled_snat" : "false"
},
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"vpn-instance" : "vpn1",
"provider:segmentation_id" : 10,
"provider:vrf_rt_export" : "3:1000",
"provider:vrf_rt_import" : ["3:1000"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4.5 Delete a Router by ID

Typical Scenarios
A router needs to be deleted by ID.

Functions
Delete a router by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/routers/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 702


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-535 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 703


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4.6 Create a Router Link

Typical Scenarios
A router link needs to be created.

Functions
Create a router link.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 704


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/neutronapi/routers/{id}/add_links

Table 1-536 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-537 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routerli Yes REFER For details, see Router link. -


nkDto ENCE Table 1-538.
Wrapp
er

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 705


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-538 RouterLinkDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

links Yes ARRAY 0-255 items. For Router link. -


_REFER details, see
ENCE Table 1-539.

Table 1-539 RouterLinkDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

name No string 0 to - Router link "link"


255 name.
charac
ters.

peer_r No string 36 - Peer router ID. "00000000-000


outer_i charac 0-0000-1234-0
d ters. 00000000002"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

peer_v No string 0 to - RT of the peer "1:1"


rf_rt 255 VRF.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 706


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001/add_links HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"links" : [
{
"name" : "link",
"peer_router_id" : "00000000-0000-0000-1234-000000000002",
"peer_vrf_rt" : "1:1"
}
]
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-540 RouterLinkDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

links ARRAY 0-255 items. For details, Router link. -


_REFER see Table 1-541.
ENCE

Table 1-541 RouterLinkDto parameters

Param Type Value Range Defaul Description Example


eter t Value

name string 0 to 255 - Router link "link"


characters. name.

peer_r string 36 characters. - Peer router ID. "00000000-000


outer_i The value must 0-0000-1234-0
d meet the 00000000002"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 707


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peer_v string 0 to 255 - RT of the peer "1:1"


rf_rt characters. VRF.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"links" : [
{
"name" : "link",
"peer_router_id" : "00000000-0000-0000-1234-000000000002",
"peer_vrf_rt" : "1:1"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4.7 Add a Route by Router ID

Typical Scenarios
A route needs to be added by router ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 708


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Add a route by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routers/{id}/add_routes

Table 1-542 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 709


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-543 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routes Yes REFER For details, see Route. -


DtoWr ENCE Table 1-544.
apper

Table 1-544 RoutesDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routes Yes ARRAY 0-255 items. For Route. -


_REFER details, see
ENCE Table 1-525.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001/add_routes HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 710


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-545 RoutesDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

routes ARRAY 0-255 items. For details, Route. -


_REFER see Table 1-529.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 711


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.4.8 Query a Router Link by Router ID

Typical Scenarios
A router link needs to be queried by router ID.

Functions
Query a router link by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/routers/{id}/query_links

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 712


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-546 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001/query_links HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 713


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-547 RouterLinkQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

links ARRAY 0-255 items. For details, Router link. -


_REFER see Table 1-541.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"links" : [
{
"name" : "link",
"peer_router_id" : "00000000-0000-0000-1234-000000000002",
"peer_vrf_rt" : "1:1"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 714


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.4.9 Delete a Router Link by Router ID

Typical Scenarios
A router link needs to be deleted by router ID.

Functions
Delete a router link by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routers/{id}/remove_links

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 715


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-548 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-549 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routerL Yes REFER For details, see Router link. -


inkDto ENCE Table 1-538.
Wrapp
er

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001/remove_links HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 716


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"links" : [
{
"name" : "link",
"peer_router_id" : "00000000-0000-0000-1234-000000000002",
"peer_vrf_rt" : "1:1"
}
]
}

Response Parameters
Response status code 200: Response status code 204: OK.
RouterLinkDtoWrapper parameters, For details, see Table 1-540.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 204: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"links" : [
{
"name" : "link",
"peer_router_id" : "00000000-0000-0000-1234-000000000002",
"peer_vrf_rt" : "1:1"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 717


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4.10 Delete a Route by Router ID

Typical Scenarios
A route needs to be deleted by router ID.

Functions
Delete a route by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routers/{id}/remove_routes

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 718


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-550 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-551 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routes Yes REFER For details, see Parameters for -


DtoWr ENCE Table 1-544. deleting a
apper route.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001/remove_routes HTTP/
1.1

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 719


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response Parameters
Response status code 200: Response status code 201: OK.

RoutesDtoWrapper parameters, For details, see Table 1-545.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 720


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.4.11 Query a Static Route by Router ID

Typical Scenarios
Static route information needs to be queried based on the router ID.

Functions
Query a static route by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/routers/{id}/query_staticrouters

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 721


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-552 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Router ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/routers/00000000-0000-0000-1234-000000000001/query_staticrouters
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 722


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

RoutesDtoWrapper parameters, For details, see Table 1-545.


Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routes" : [
{
"destination" : "192.168.2.0/24",
"nexthop" : "192.168.2.2",
"track_type" : "share-bfd",
"port_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.5 Internal Router APIs


# Internal router interface operation APIs

1.9.5.5.1 Create an Internal Router Interface by ID

Typical Scenarios
An internal router interface needs to be created by ID.
This API is retained to maintain compatibility and does not implement any
function. Instead, the function is implemented by the API for deleting ports.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 723


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Create an internal router interface by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routerinterface/{router_id}/add_router_interface

Table 1-553 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router_ Yes uuid - - Router ID. "00000000-000


id 0-0000-1234-0
00000000001"

Request Parameters

Table 1-554 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routerI Yes REFER For details, see Router -


nterfac ENCE Table 1-555. interface.
eDto

Table 1-555 RouterInterfaceDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

port_id Yes string 0 to 36 - Port ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000009"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 724


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

subnet Yes string 0 to 36 - Subnet ID. "00000000-000


_id charac 0-0000-0000-0
ters. 00000000003"

tenant Yes string 0 to - Tenant ID. "00000000-000


_id 255 0-0000-0000-0
charac 00000000001"
ters.

id Yes string 0 to 36 - Route ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000002"

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routerinterface/00000000-0000-0000-1234-000000000001/
add_router_interface HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port_id" : "00000000-0000-0000-0000-000000000009",
"subnet_id" : "00000000-0000-0000-0000-000000000003",
"tenant_id" : "00000000-0000-0000-0000-000000000001",
"id" : "00000000-0000-0000-0000-000000000002",
"service_name" : "physnet1"
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-556 RouterInterfaceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

port_id string 0 to 36 - Port ID. "00000000-000


characters. 0-0000-0000-0
00000000009"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 725


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

subnet string 0 to 36 - Subnet ID. "00000000-000


_id characters. 0-0000-0000-0
00000000003"

tenant string 0 to 255 - Tenant ID. "00000000-000


_id characters. 0-0000-0000-0
00000000001"

id string 0 to 36 - Route ID. "00000000-000


characters. 0-0000-0000-0
00000000002"

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port_id" : "00000000-0000-0000-0000-000000000009",
"subnet_id" : "00000000-0000-0000-0000-000000000003",
"tenant_id" : "00000000-0000-0000-0000-000000000001",
"id" : "00000000-0000-0000-0000-000000000002",
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 726


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.5.2 Query Sunbet IDs

Typical Scenarios
A subnet ID needs to be queried by ID.

Functions
Query the subnet ID of internal interfaces by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/routerinterface/{router_id}/query_subnet_ids

Table 1-557 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router_ Yes uuid - - Subnet ID for "00000000-000


id querying 0-0000-1234-0
internal 00000000001"
interfaces.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/routerinterface/00000000-0000-0000-1234-000000000001/
query_subnet_ids HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 727


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-558 QuerySubnetIdsOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subNet ARRAY 0-255 items. For details, subnetIdDtos -


DtoIds _REFER see Table 1-559.
ENCE

Table 1-559 SubnetIdDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet uuid - - Subnet ID "DBB702C3-77


_id 19-4FE6-
A5AD-3A9C9E2
65309"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"subNetDtoIds" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 728


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.5.5.3 Delete an Internal Router Interface by ID

Typical Scenarios
A router interface needs to be deleted by ID.

This API is retained to maintain compatibility and does not implement any
function. Instead, the function is implemented by the API for deleting ports.

Functions
Delete an internal router interface by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/routerinterface/{router_id}/remove_router_interface

Table 1-560 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router_ Yes uuid - - router id. "00000000-000


id 0-0000-1234-0
00000000001"

Request Parameters

Table 1-561 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Router -


ENCE Table 1-555. interface.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 729


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/routerinterface/00000000-0000-0000-1234-000000000001/
remove_router_interface HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port_id" : "00000000-0000-0000-0000-000000000009",
"subnet_id" : "00000000-0000-0000-0000-000000000003",
"tenant_id" : "00000000-0000-0000-0000-000000000001",
"id" : "00000000-0000-0000-0000-000000000002",
"service_name" : "physnet1"
}

Response Parameters
Response status code 200: Response status code 200: OK.

RouterInterfaceDto parameters, For details, see Table 1-556.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port_id" : "00000000-0000-0000-0000-000000000009",
"subnet_id" : "00000000-0000-0000-0000-000000000003",
"tenant_id" : "00000000-0000-0000-0000-000000000001",
"id" : "00000000-0000-0000-0000-000000000002",
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 730


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.6 Snat

1.9.5.6.1 Create SNAT

Typical Scenarios
The SNAT needs to be created.

Functions
Create SNAT.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/snats

Request Parameters

Table 1-562 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table SNAT -


NCE 1-563. entity to
be
created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 731


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-563 snats parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

snat No ARRAY For details, see snat -


_REFER Table 1-564.
ENCE

Table 1-564 snat-wrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - SNAT UUID. "00000000-000


charac 0-1111-2222-0
ters. 00000000008"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - SNAT name. "snat"


255
charac
ters.

update No string 0 to - Update time. "2017-06-24T1


d-at 128 2:30:30"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 732


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

create No string 0 to - Creation time. "2017-06-24T1


d-at 128 2:30:30"
charac
ters.

cloud- Yes string 0 to - Cloud platform "openstack"


name 255 name
charac
ters.

tenant Yes string 0 to - Tenant ID. "00000000-000


-id 128 0-1111-2222-0
charac 00000000008"
ters.

snat- No string - - SNAT IP "192.168.0.1"


ip- address.
addres
s

snat- Yes string 36 - External "00000000-000


networ charac network ID of 0-1111-2222-0
k-id ters. SNAT. 00000000008"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 733


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router- Yes string 36 - ID of the "00000000-000


id charac router 0-1111-2222-0
ters. corresponding 00000000008"
The to SNAT.
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

orignal Yes array< - - Source CIDR ["10.10.0.0/8"]


-cidrs string> set.

type No integer - - SNAT type. The 0


value 0
indicates
NAT44, and
the value 1
indicates
NAT64.

snat- No ARRAY For details, see - -


ip-pool _REFER Table 1-565.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 734


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-565 snatIpPoolDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

begin- Yes string - - Begin IP "192.168.0.1"


ip address.

end-ip Yes string - - End IP address. "192.168.0.255


"

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/snats HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"snat" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "snat",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"snat-ip-address" : "192.168.0.1",
"snat-network-id" : "00000000-0000-1111-2222-000000000008",
"router-id" : "00000000-0000-1111-2222-000000000008",
"orignal-cidrs" : ["10.10.0.0/8"],
"type" : 0,
"snat-ip-pool" : [
{
"begin-ip" : "192.168.0.1",
"end-ip" : "192.168.0.255"
}
]
}
]
}

Response Parameters
Response status code 201: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 735


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.6.2 Query the SNAT List

Typical Scenarios
SNAT needs to be queried.

Functions
Query all SNATs.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/snats

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 736


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/snats HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-566 snats parameters

Param Type Value Range Defaul Description Example


eter t Value

snat ARRAY For details, see Table snat -


_REFER 1-567.
ENCE

Table 1-567 snat-wrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

uuid string 36 characters. - SNAT UUID. "00000000-000


The value must 0-1111-2222-0
meet the 00000000008"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - SNAT name. "snat"


characters.

update string 0 to 128 - Update time. "2017-06-24T1


d-at characters. 2:30:30"

create string 0 to 128 - Creation time. "2017-06-24T1


d-at characters. 2:30:30"

cloud- string 0 to 255 - Cloud platform "openstack"


name characters. name

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 737


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenant string 0 to 128 - Tenant ID. "00000000-000


-id characters. 0-1111-2222-0
00000000008"

snat- string - - SNAT IP "192.168.0.1"


ip- address.
addres
s

snat- string 36 characters. - External "00000000-000


networ The value must network ID of 0-1111-2222-0
k-id meet the SNAT. 00000000008"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

router- string 36 characters. - ID of the "00000000-000


id The value must router 0-1111-2222-0
meet the corresponding 00000000008"
following to SNAT.
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

orignal array< - - Source CIDR ["10.10.0.0/8"]


-cidrs string> set.

type integer - - SNAT type. The 0


value 0
indicates
NAT44, and
the value 1
indicates
NAT64.

snat- ARRAY For details, see Table - -


ip-pool _REFER 1-568.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 738


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-568 snatIpPoolDto parameters

Param Type Value Range Defaul Description Example


eter t Value

begin- string - - Begin IP "192.168.0.1"


ip address.

end-ip string - - End IP address. "192.168.0.255


"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"snat" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "snat",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"snat-ip-address" : "192.168.0.1",
"snat-network-id" : "00000000-0000-1111-2222-000000000008",
"router-id" : "00000000-0000-1111-2222-000000000008",
"orignal-cidrs" : ["10.10.0.0/8"],
"type" : 0,
"snat-ip-pool" : [
{
"begin-ip" : "192.168.0.1",
"end-ip" : "192.168.0.255"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 739


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.6.3 Query SNAT by Name

Typical Scenarios
The SNAT needs to be queried by name.

Functions
Query SNAT by name.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/snats/snat/{id}

Table 1-569 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - SNAT ID. "00000000-000


128 0-1111-2222-0
charac 00000000008"
ters.

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 740


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /restconf/data/huawei-ac-neutron:neutron-cfg/snats/snat/00000000-0000-1111-2222-000000000008
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
snats parameters, For details, see Table 1-566.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"snat" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "snat",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"snat-ip-address" : "192.168.0.1",
"snat-network-id" : "00000000-0000-1111-2222-000000000008",
"router-id" : "00000000-0000-1111-2222-000000000008",
"orignal-cidrs" : ["10.10.0.0/8"],
"type" : 0,
"snat-ip-pool" : [
{
"begin-ip" : "192.168.0.1",
"end-ip" : "192.168.0.255"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 741


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.6.4 Update the SNAT by Name

Typical Scenarios
The SNAT needs to be updated.

Functions
Update SNAT.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/snats/snat/{id}

Table 1-570 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - SNAT ID. "00000000-000


128 0-1111-2222-0
charac 00000000008"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 742


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-571 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table SNAT -


NCE 1-563. entity to
be
updated.

Sample Request
HTTP
PUT /restconf/data/huawei-ac-neutron:neutron-cfg/snats/snat/00000000-0000-1111-2222-000000000008
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"snat" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "snat",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"snat-ip-address" : "192.168.0.1",
"snat-network-id" : "00000000-0000-1111-2222-000000000008",
"router-id" : "00000000-0000-1111-2222-000000000008",
"orignal-cidrs" : ["10.10.0.0/8"],
"type" : 0,
"snat-ip-pool" : [
{
"begin-ip" : "192.168.0.1",
"end-ip" : "192.168.0.255"
}
]
}
]
}

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 743


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.6.5 Delete SNAT by Name

Typical Scenarios
The SNAT needs to be deleted.

Functions
Delete an SNAT by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/snats/snat/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 744


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-572 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - SNAT ID. "00000000-000


128 0-1111-2222-0
charac 00000000008"
ters.

Request Parameters
N/A

Sample Request
HTTP
DELETE /restconf/data/huawei-ac-neutron:neutron-cfg/snats/snat/
00000000-0000-1111-2222-000000000008 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 745


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.7 Floating IP Address

1.9.5.7.1 Create a Floating IP Address

Typical Scenarios
A floating IP address needs to be created.

Functions
Create a floating IP address.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/floatingips

Request Parameters

Table 1-573 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cloud Yes REFER For details, see Floating IP -


ENCE Table 1-574. address entity
to be created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 746


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-574 floatingips parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

floatin No ARRAY For details, see Floating IP -


gip _REFER Table 1-575. address entity.
ENCE

Table 1-575 l3-floatingip-wrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - Floating IP "00000004-000


charac address ID. 0-3333-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - Floating IP "FloatingIpNa


255 address ID. me"
charac
ters.

update No string 0 to - Update time. "2018-02-20T0


d-at 128 8:15:49"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 747


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

create No string 0 to - Creation time. "2018-02-20T0


d-at 128 8:15:49"
charac
ters.

cloud- Yes string 0 to - Cloud platform "openstack"


name 255 name.
charac
ters.

tenant Yes string 0 to - Tenant ID. "00000004-000


-id 128 0-3333-0000-0
charac 00000000001"
ters.

floatin Yes string 36 - Network ID. "00000004-000


g- charac 0-3333-0000-0
networ ters. 00000000001"
k-id The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 748


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

port-id Yes string 36 - Port ID. "00000004-000


charac 0-3333-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

fixed- Yes string - - Fixed IP "192.168.2.2"


ip- address.
addres
s

floatin Yes string - - Floating IP "192.168.3.3"


g-ip- address.
addres
s

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 749


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router- No string 36 - Router ID. "00000004-000


id charac 0-3333-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/floatingips HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"floatingip" : [
{
"uuid" : "00000004-0000-3333-0000-000000000001",
"name" : "FloatingIpName",
"updated-at" : "2018-02-20T08:15:49",
"created-at" : "2018-02-20T08:15:49",
"cloud-name" : "openstack",
"tenant-id" : "00000004-0000-3333-0000-000000000001",
"floating-network-id" : "00000004-0000-3333-0000-000000000001",
"port-id" : "00000004-0000-3333-0000-000000000001",
"fixed-ip-address" : "192.168.2.2",
"floating-ip-address" : "192.168.3.3",
"router-id" : "00000004-0000-3333-0000-000000000001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 750


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}

Response Parameters
Response status code 201: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.7.2 Query the Floating IP Address List

Typical Scenarios
A floating IP address needs to be queried.

Functions
Query all floating IP addresses.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 751


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 500 times/minute.


Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/floatingips

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/floatingips HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-576 floatingips parameters


Param Type Value Range Defaul Description Example
eter t Value

floatin ARRAY For details, see Table Floating IP -


gip _REFER 1-577. address entity.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 752


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-577 l3-floatingip-wrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

uuid string 36 characters. - Floating IP "00000004-000


The value must address ID. 0-3333-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - Floating IP "FloatingIpNa


characters. address ID. me"

update string 0 to 128 - Update time. "2018-02-20T0


d-at characters. 8:15:49"

create string 0 to 128 - Creation time. "2018-02-20T0


d-at characters. 8:15:49"

cloud- string 0 to 255 - Cloud platform "openstack"


name characters. name.

tenant string 0 to 128 - Tenant ID. "00000004-000


-id characters. 0-3333-0000-0
00000000001"

floatin string 36 characters. - Network ID. "00000004-000


g- The value must 0-3333-0000-0
networ meet the 00000000001"
k-id following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 753


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

port-id string 36 characters. - Port ID. "00000004-000


The value must 0-3333-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

fixed- string - - Fixed IP "192.168.2.2"


ip- address.
addres
s

floatin string - - Floating IP "192.168.3.3"


g-ip- address.
addres
s

router- string 36 characters. - Router ID. "00000004-000


id The value must 0-3333-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 754


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"floatingip" : [
{
"uuid" : "00000004-0000-3333-0000-000000000001",
"name" : "FloatingIpName",
"updated-at" : "2018-02-20T08:15:49",
"created-at" : "2018-02-20T08:15:49",
"cloud-name" : "openstack",
"tenant-id" : "00000004-0000-3333-0000-000000000001",
"floating-network-id" : "00000004-0000-3333-0000-000000000001",
"port-id" : "00000004-0000-3333-0000-000000000001",
"fixed-ip-address" : "192.168.2.2",
"floating-ip-address" : "192.168.3.3",
"router-id" : "00000004-0000-3333-0000-000000000001"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.7.3 Query a Floating IP Address by Name

Typical Scenarios
A floating IP address needs to be queried by name.

Functions
Query floating IP addresses by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 755


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/floatingips/floatingip/{urlId}

Table 1-578 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

urlId Yes string 1 to - Floating IP -


128 address ID.
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/floatingips/floatingip/{urlId} HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
floatingips parameters, For details, see Table 1-576.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"floatingip" : [
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 756


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"uuid" : "00000004-0000-3333-0000-000000000001",
"name" : "FloatingIpName",
"updated-at" : "2018-02-20T08:15:49",
"created-at" : "2018-02-20T08:15:49",
"cloud-name" : "openstack",
"tenant-id" : "00000004-0000-3333-0000-000000000001",
"floating-network-id" : "00000004-0000-3333-0000-000000000001",
"port-id" : "00000004-0000-3333-0000-000000000001",
"fixed-ip-address" : "192.168.2.2",
"floating-ip-address" : "192.168.3.3",
"router-id" : "00000004-0000-3333-0000-000000000001"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.7.4 Update a Floating IP Address Based on the Name

Typical Scenarios
A floating IP address needs to be updated.

Functions
Update the floating IP address.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/floatingips/floatingip/{urlId}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 757


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-579 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

urlId Yes string 1 to - Floating IP "00000004-000


128 address ID. 0-3333-0000-0
charac 00000000001"
ters.

Request Parameters

Table 1-580 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cloud Yes REFER For details, see Floating IP -


ENCE Table 1-574. address entity
to be updated.

Sample Request
HTTP
PUT /restconf/data/huawei-ac-neutron:neutron-cfg/floatingips/floatingip/
00000004-0000-3333-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"floatingip" : [
{
"uuid" : "00000004-0000-3333-0000-000000000001",
"name" : "FloatingIpName",
"updated-at" : "2018-02-20T08:15:49",
"created-at" : "2018-02-20T08:15:49",
"cloud-name" : "openstack",
"tenant-id" : "00000004-0000-3333-0000-000000000001",
"floating-network-id" : "00000004-0000-3333-0000-000000000001",
"port-id" : "00000004-0000-3333-0000-000000000001",
"fixed-ip-address" : "192.168.2.2",
"floating-ip-address" : "192.168.3.3",
"router-id" : "00000004-0000-3333-0000-000000000001"
}
]
}

Response Parameters
Response status code 204: Response status code 204: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 758


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.7.5 Delete a Floating IP Address by Name

Typical Scenarios
A floating IP address needs to be deleted.

Functions
Delete a floating IP address by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 759


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/floatingips/floatingip/{urlId}

Table 1-581 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

urlId Yes string 1 to - Floating IP "00000004-000


128 address ID. 0-3333-0000-0
charac 00000000001"
ters.

Request Parameters
N/A

Sample Request
HTTP
DELETE /restconf/data/huawei-ac-neutron:neutron-cfg/floatingips/floatingip/
00000004-0000-3333-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 760


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.8 Qos

1.9.5.8.1 Create a QoS Policy

Typical Scenarios
A QoS policy needs to be created.

Functions
Create a QoS policy.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies

Request Parameters

Table 1-582 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table QoS -


NCE 1-583. entity to
be
created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 761


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-583 qos-policies parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

qos- No ARRAY For details, see qos-policy -


policy _REFER Table 1-584.
ENCE

Table 1-584 qos-policy parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - QoS policy ID. "8938f538-200


charac 6-4dde-8902-6
ters. d3f676d3790"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - QoS policy "qosName"


255 name.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 762


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

update No string 0 to - Update time. "2017-01-13T0


d-at 128 5:30:31"
charac
ters.

create No string 0 to - Creation time. "2017-01-13T0


d-at 128 5:30:31"
charac
ters.

cloud- Yes string 0 to - Cloud platform "openstack"


name 255 name.
charac
ters.

tenant Yes string 0 to - Tenant ID. "8938f538-200


-id 128 6-4dde-8902-6
charac d3f676d3790"
ters.

qos- No REFER For details, see - -


bandw ENCE Table 1-585.
idth-
limit-
rules

qos- No REFER For details, see - -


dscp- ENCE Table 1-587.
limit-
rules

qos- No REFER For details, see - -


cos- ENCE Table 1-589.
markin
g-rules

Table 1-585 qos-bandwidth-limit-rules parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

qos- No ARRAY For details, see qos- -


bandw _REFER Table 1-586. bandwidth-
idth- ENCE limit-rule
limit-
rule

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 763


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-586 qos-bandwidth-limit-rule-attributes parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

directi No string ● inb - Direction. The "inbound"


on oun value can be
d inbound or
● out outbound.
bou
nd

max- No int64 - - - 10000


kbps

uuid Yes string 36 - ID of a "8938f538-200


charac bandwidth 6-4dde-8902-6
ters. limit rule. d3f676d3790"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

max- No int64 - - - 20000


burst-
kbps

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 764


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

qos- Yes string 36 - QoS policy ID. "8938f538-200


policy- charac 6-4dde-8902-6
id ters. d3f676d3790"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Table 1-587 qos-dscp-limit-rules parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

qos- No ARRAY For details, see DSCP rule set. -


dscp- _REFER Table 1-588.
limit- ENCE
rule

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 765


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-588 qos-dscp-limit-rule-attributes parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - DSCP rule ID. "8938f538-200


charac 6-4dde-8902-6
ters. d3f676d3790"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

dscp- Yes int64 - - The value can 8


mark be 0, an even
number
between 8 and
56 except 42,
44, 50, 52, and
54.

Table 1-589 qos-cos-marking-rules parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

qos- No ARRAY For details, see CoS marking -


cos- _REFER Table 1-590. rule set.
markin ENCE
g-rule

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 766


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-590 qos-cos-marking-rule-attributes parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - VLAN priority "8938f538-200


charac rule ID. 6-4dde-8902-6
ters. d3f676d3790"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

cos- Yes int64 - - 0 or 7. 0


mark

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"qos-policy" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"name" : "qosName",
"updated-at" : "2017-01-13T05:30:31",
"created-at" : "2017-01-13T05:30:31",
"cloud-name" : "openstack",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 767


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"tenant-id" : "8938f538-2006-4dde-8902-6d3f676d3790",
"qos-bandwidth-limit-rules" : {
"qos-bandwidth-limit-rule" : [
{
"direction" : "inbound",
"max-kbps" : 10000,
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"max-burst-kbps" : 20000,
"qos-policy-id" : "8938f538-2006-4dde-8902-6d3f676d3790"
}
]
},
"qos-dscp-limit-rules" : {
"qos-dscp-limit-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"dscp-mark" : 8
}
]
},
"qos-cos-marking-rules" : {
"qos-cos-marking-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"cos-mark" : 0
}
]
}
}
]
}

Response Parameters
Response status code 201: QoS entity to be created.

Response status code 400: QoS entity to be created.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: QoS entity to be created.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: QoS entity to be created.


HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 768


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.8.2 Query the QoS List

Typical Scenarios
QoS information needs to be queried.

Functions
Query all QoSs.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 769


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-591 qos-policies parameters


Param Type Value Range Defaul Description Example
eter t Value

qos- ARRAY For details, see Table qos-policy -


policy _REFER 1-592.
ENCE

Table 1-592 qos-policy parameters


Param Type Value Range Defaul Description Example
eter t Value

uuid string 36 characters. - QoS policy ID. "8938f538-200


The value must 6-4dde-8902-6
meet the d3f676d3790"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - QoS policy "qosName"


characters. name.

update string 0 to 128 - Update time. "2017-01-13T0


d-at characters. 5:30:31"

create string 0 to 128 - Creation time. "2017-01-13T0


d-at characters. 5:30:31"

cloud- string 0 to 255 - Cloud platform "openstack"


name characters. name.

tenant string 0 to 128 - Tenant ID. "8938f538-200


-id characters. 6-4dde-8902-6
d3f676d3790"

qos- REFER For details, see Table - -


bandw ENCE 1-593.
idth-
limit-
rules

qos- REFER For details, see Table - -


dscp- ENCE 1-595.
limit-
rules

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 770


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

qos- REFER For details, see Table - -


cos- ENCE 1-597.
markin
g-rules

Table 1-593 qos-bandwidth-limit-rules parameters


Param Type Value Range Defaul Description Example
eter t Value

qos- ARRAY For details, see Table qos- -


bandw _REFER 1-594. bandwidth-
idth- ENCE limit-rule
limit-
rule

Table 1-594 qos-bandwidth-limit-rule-attributes parameters


Param Type Value Range Defaul Description Example
eter t Value

directi string ● inbound - Direction. The "inbound"


on value can be
● outbound
inbound or
outbound.

max- int64 - - - 10000


kbps

uuid string 36 characters. - ID of a "8938f538-200


The value must bandwidth 6-4dde-8902-6
meet the limit rule. d3f676d3790"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

max- int64 - - - 20000


burst-
kbps

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 771


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

qos- string 36 characters. - QoS policy ID. "8938f538-200


policy- The value must 6-4dde-8902-6
id meet the d3f676d3790"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-595 qos-dscp-limit-rules parameters


Param Type Value Range Defaul Description Example
eter t Value

qos- ARRAY For details, see Table DSCP rule set. -


dscp- _REFER 1-596.
limit- ENCE
rule

Table 1-596 qos-dscp-limit-rule-attributes parameters


Param Type Value Range Defaul Description Example
eter t Value

uuid string 36 characters. - DSCP rule ID. "8938f538-200


The value must 6-4dde-8902-6
meet the d3f676d3790"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 772


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

dscp- int64 - - The value can 8


mark be 0, an even
number
between 8 and
56 except 42,
44, 50, 52, and
54.

Table 1-597 qos-cos-marking-rules parameters

Param Type Value Range Defaul Description Example


eter t Value

qos- ARRAY For details, see Table CoS marking -


cos- _REFER 1-598. rule set.
markin ENCE
g-rule

Table 1-598 qos-cos-marking-rule-attributes parameters

Param Type Value Range Defaul Description Example


eter t Value

uuid string 36 characters. - VLAN priority "8938f538-200


The value must rule ID. 6-4dde-8902-6
meet the d3f676d3790"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

cos- int64 - - 0 or 7. 0
mark

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 773


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"qos-policy" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"name" : "qosName",
"updated-at" : "2017-01-13T05:30:31",
"created-at" : "2017-01-13T05:30:31",
"cloud-name" : "openstack",
"tenant-id" : "8938f538-2006-4dde-8902-6d3f676d3790",
"qos-bandwidth-limit-rules" : {
"qos-bandwidth-limit-rule" : [
{
"direction" : "inbound",
"max-kbps" : 10000,
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"max-burst-kbps" : 20000,
"qos-policy-id" : "8938f538-2006-4dde-8902-6d3f676d3790"
}
]
},
"qos-dscp-limit-rules" : {
"qos-dscp-limit-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"dscp-mark" : 8
}
]
},
"qos-cos-marking-rules" : {
"qos-cos-marking-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"cos-mark" : 0
}
]
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 774


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.5.8.3 Query QoS by Name

Typical Scenarios
The QoS needs to be queried by name.

Functions
Query QoS by name.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies/qos-policy/{id}

Table 1-599 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - QoS ID. "8938f538-200


128 6-4dde-8902-6
charac d3f676d3790"
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies/qos-policy/
8938f538-2006-4dde-8902-6d3f676d3790 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 775


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Succeeded.
qos-policies parameters, For details, see Table 1-591.
Response status code 400: The parameter format is incorrect. For example, the
parameter type is incorrect or the value range is incorrect.
For details, see the response message body.
Response status code 500: The internal processing mechanism is defective.
For details, see the response message body.

Sample Response
Response status code 200: Succeeded.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"qos-policy" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"name" : "qosName",
"updated-at" : "2017-01-13T05:30:31",
"created-at" : "2017-01-13T05:30:31",
"cloud-name" : "openstack",
"tenant-id" : "8938f538-2006-4dde-8902-6d3f676d3790",
"qos-bandwidth-limit-rules" : {
"qos-bandwidth-limit-rule" : [
{
"direction" : "inbound",
"max-kbps" : 10000,
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"max-burst-kbps" : 20000,
"qos-policy-id" : "8938f538-2006-4dde-8902-6d3f676d3790"
}
]
},
"qos-dscp-limit-rules" : {
"qos-dscp-limit-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"dscp-mark" : 8
}
]
},
"qos-cos-marking-rules" : {
"qos-cos-marking-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"cos-mark" : 0
}
]
}
}
]
}

Response status code 400: The parameter format is incorrect. For example, the
parameter type is incorrect or the value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 776


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: The internal processing mechanism is defective.


HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.8.4 Update QoS by Name

Typical Scenarios
The QoS needs to be updated.

Functions
Update the QoS.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies/qos-policy/{id}

Table 1-600 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - QoS ID. "8938f538-200


128 6-4dde-8902-6
charac d3f676d3790"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 777


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-601 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table QoS -


NCE 1-583. entity to
be
updated.

Sample Request
HTTP
PUT /restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies/qos-policy/
8938f538-2006-4dde-8902-6d3f676d3790 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"qos-policy" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"name" : "qosName",
"updated-at" : "2017-01-13T05:30:31",
"created-at" : "2017-01-13T05:30:31",
"cloud-name" : "openstack",
"tenant-id" : "8938f538-2006-4dde-8902-6d3f676d3790",
"qos-bandwidth-limit-rules" : {
"qos-bandwidth-limit-rule" : [
{
"direction" : "inbound",
"max-kbps" : 10000,
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"max-burst-kbps" : 20000,
"qos-policy-id" : "8938f538-2006-4dde-8902-6d3f676d3790"
}
]
},
"qos-dscp-limit-rules" : {
"qos-dscp-limit-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"dscp-mark" : 8
}
]
},
"qos-cos-marking-rules" : {
"qos-cos-marking-rule" : [
{
"uuid" : "8938f538-2006-4dde-8902-6d3f676d3790",
"cos-mark" : 0
}
]
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 778


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Update QoS by Name

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Update QoS by Name
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.8.5 Delete a QoS Policy by Name

Typical Scenarios
A QoS needs to be deleted.

Functions
Delete a QoS policy by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 2000 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 779


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
DELETE

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies/qos-policy/{id}

Table 1-602 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - QoS ID. "8938f538-200


128 6-4dde-8902-6
charac d3f676d3790"
ters.

Request Parameters
N/A

Sample Request
HTTP
DELETE /restconf/data/huawei-ac-neutron:neutron-cfg/qos-policies/qos-policy/
8938f538-2006-4dde-8902-6d3f676d3790 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 780


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.9 Security Group

1.9.5.9.1 Create a Security Group

Typical Scenarios
A security rule needs to be created.

Functions
Create a security group.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-groups

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 781


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-603 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

cloud Yes REFER For details, see Security group -


ENCE Table 1-604. entity to be
created.

Table 1-604 security-groups parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

securit No ARRAY For details, see List of -


y- _REFER Table 1-605. Metering
group ENCE Labels.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 782


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-605 security-group parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - Security group "00000000-000


charac ID 0-1111-2222-0
ters. 00000000008"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - Security group "name"


255 name.
charac
ters.

update No string 0 to - Update time. "2017-06-24T1


d-at 128 2:30:30"
charac
ters.

create No string 0 to - Creation time. "2017-06-24T1


d-at 128 2:30:30"
charac
ters.

cloud- Yes string 0 to - Cloud platform "openstack"


name 255 name
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 783


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string 0 to - Tenant ID. "00000000-000


-id 128 0-1111-2222-0
charac 00000000008"
ters.

descrip No string 0 to - Security group "this is a discr"


tion 256 description.
charac
ters.

securit No array< - - Security group ["00000000-00


y-rules string> rule list. 00-1111-2220-
000000000008
"]

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/security-groups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"security-group" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "name",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"description" : "this is a discr",
"security-rules" : ["00000000-0000-1111-2220-000000000008"]
}
]
}

Response Parameters
Response status code 201: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 784


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.9.2 Query Security Groups

Typical Scenarios
A security group needs to be queried.

Functions
Query all security groups.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-groups

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 785


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/security-groups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-606 security-groups parameters


Param Type Value Range Defaul Description Example
eter t Value

securit ARRAY For details, see Table List of -


y- _REFER 1-607. Metering
group ENCE Labels.

Table 1-607 security-group parameters


Param Type Value Range Defaul Description Example
eter t Value

uuid string 36 characters. - Security group "00000000-000


The value must ID 0-1111-2222-0
meet the 00000000008"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - Security group "name"


characters. name.

update string 0 to 128 - Update time. "2017-06-24T1


d-at characters. 2:30:30"

create string 0 to 128 - Creation time. "2017-06-24T1


d-at characters. 2:30:30"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 786


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

cloud- string 0 to 255 - Cloud platform "openstack"


name characters. name

tenant string 0 to 128 - Tenant ID. "00000000-000


-id characters. 0-1111-2222-0
00000000008"

descrip string 0 to 256 - Security group "this is a discr"


tion characters. description.

securit array< - - Security group ["00000000-00


y-rules string> rule list. 00-1111-2220-
000000000008
"]

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"security-group" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "name",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"description" : "this is a discr",
"security-rules" : ["00000000-0000-1111-2220-000000000008"]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 787


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.9.3 Query a Security Group by Name

Typical Scenarios
A security group needs to be queried by name.

Functions
Query a security group by name.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-groups/security-group/{id}

Table 1-608 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - Security group "00000000-000


128 ID. 0-1111-2222-0
charac 00000000008"
ters.

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 788


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /restconf/data/huawei-ac-neutron:neutron-cfg/security-groups/security-group/
00000000-0000-1111-2222-000000000008 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
security-groups parameters, For details, see Table 1-606.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"security-group" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "name",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"description" : "this is a discr",
"security-rules" : ["00000000-0000-1111-2220-000000000008"]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 789


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.5.9.4 Update a Security Group by Name

Typical Scenarios
A security group needs to be updated.

Functions
Update a security group.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-groups/security-group/{id}

Table 1-609 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - Security group "00000000-000


128 ID. 0-1111-2222-0
charac 00000000008"
ters.

Request Parameters

Table 1-610 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cloud Yes REFER For details, see Security group -


ENCE Table 1-604. entity to be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 790


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /restconf/data/huawei-ac-neutron:neutron-cfg/security-groups/security-group/
00000000-0000-1111-2222-000000000008 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"security-group" : [
{
"uuid" : "00000000-0000-1111-2222-000000000008",
"name" : "name",
"updated-at" : "2017-06-24T12:30:30",
"created-at" : "2017-06-24T12:30:30",
"cloud-name" : "openstack",
"tenant-id" : "00000000-0000-1111-2222-000000000008",
"description" : "this is a discr",
"security-rules" : ["00000000-0000-1111-2220-000000000008"]
}
]
}

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 791


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.9.5 Deleting a Security Group by Name

Typical Scenarios
A security group needs to be deleted.

Functions
Delete a security group by name.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-groups/security-group/{id}

Table 1-611 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - Security group "00000000-000


128 ID. 0-1111-2222-0
charac 00000000008"
ters.

Request Parameters
N/A

Sample Request
HTTP
DELETE /restconf/data/huawei-ac-neutron:neutron-cfg/security-groups/security-group/
00000000-0000-1111-2222-000000000008 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 792


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.10 Security Group Rules

1.9.5.10.1 Create a Security Rule

Typical Scenarios
A security rule needs to be created.

Functions
Create a security rule.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 793


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-rules

Request Parameters

Table 1-612 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cloud Yes REFER For details, see Security rule -


ENCE Table 1-613. entity.

Table 1-613 security-rules parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

securit No ARRAY For details, see Security group -


y-rule _REFER Table 1-614. rule list.
ENCE

Table 1-614 security-rule-attributes parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

remote No string - - Peer IP prefix. "10.10.10.0/8"


-ip-
prefix

directi Yes string 0 to - Security group "this is a discr"


on 128 rule
charac description.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 794


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

protoc No string 0 to 8 - Security group "5"


ol charac rule protocol.
ters.

etherty No string 0 to - IP address "huawei-ac-


pe 128 version neutron-
charac corresponding constants:ether
ters. to the security type-v4"
group rule.

update No string 0 to - Update time. "2017-01-13T0


d-at 128 5:30:31"
charac
ters.

create No string 0 to - Creation time. "2017-01-13T0


d-at 128 5:30:31"
charac
ters.

port- No int32 - - Maximum 100


range- value of the
max port range.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 795


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

securit Yes string 36 - ID of the "11000000-200


y- charac security group. 0-0000-0000-0
group- ters. 00000000020"
id The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

port- No int32 - - Minimum 10


range- value of the
min port range.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 796


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

remote No string 36 - Remote "11000000-200


- charac security group 0-0000-0000-0
group- ters. ID. 00000000020"
id The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 797


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Security group "11000000-200


charac ID. 0-0000-0000-0
ters. 00000000020"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

tenant Yes string 0 to - UUID of the "11000000-200


-id 128 tenant. 0-0000-0000-0
charac 00000000020"
ters.

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/security-rules HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"security-rule" : [
{
"remote-ip-prefix" : "10.10.10.0/8",
"direction" : "this is a discr",
"protocol" : "5",
"ethertype" : "huawei-ac-neutron-constants:ethertype-v4",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 798


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"updated-at" : "2017-01-13T05:30:31",
"created-at" : "2017-01-13T05:30:31",
"port-range-max" : 100,
"security-group-id" : "11000000-2000-0000-0000-000000000020",
"port-range-min" : 10,
"remote-group-id" : "11000000-2000-0000-0000-000000000020",
"id" : "11000000-2000-0000-0000-000000000020",
"tenant-id" : "11000000-2000-0000-0000-000000000020"
}
]
}

Response Parameters
Response status code 201: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.10.2 Query Security Rules

Typical Scenarios
Security rules need to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 799


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query all security rules.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-rules

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/security-rules HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-615 security-rules parameters

Param Type Value Range Defaul Description Example


eter t Value

securit ARRAY For details, see Table Security group -


y-rule _REFER 1-616. rule list.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 800


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-616 security-rule-attributes parameters


Param Type Value Range Defaul Description Example
eter t Value

remote string - - Peer IP prefix. "10.10.10.0/8"


-ip-
prefix

directi string 0 to 128 - Security group "this is a discr"


on characters. rule
description.

protoc string 0 to 8 - Security group "5"


ol characters. rule protocol.

etherty string 0 to 128 - IP address "huawei-ac-


pe characters. version neutron-
corresponding constants:ether
to the security type-v4"
group rule.

update string 0 to 128 - Update time. "2017-01-13T0


d-at characters. 5:30:31"

create string 0 to 128 - Creation time. "2017-01-13T0


d-at characters. 5:30:31"

port- int32 - - Maximum 100


range- value of the
max port range.

securit string 36 characters. - ID of the "11000000-200


y- The value must security group. 0-0000-0000-0
group- meet the 00000000020"
id following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

port- int32 - - Minimum 10


range- value of the
min port range.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 801


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

remote string 36 characters. - Remote "11000000-200


- The value must security group 0-0000-0000-0
group- meet the ID. 00000000020"
id following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

id string 36 characters. - Security group "11000000-200


The value must ID. 0-0000-0000-0
meet the 00000000020"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

tenant string 0 to 128 - UUID of the "11000000-200


-id characters. tenant. 0-0000-0000-0
00000000020"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"security-rule" : [
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 802


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"remote-ip-prefix" : "10.10.10.0/8",
"direction" : "this is a discr",
"protocol" : "5",
"ethertype" : "huawei-ac-neutron-constants:ethertype-v4",
"updated-at" : "2017-01-13T05:30:31",
"created-at" : "2017-01-13T05:30:31",
"port-range-max" : 100,
"security-group-id" : "11000000-2000-0000-0000-000000000020",
"port-range-min" : 10,
"remote-group-id" : "11000000-2000-0000-0000-000000000020",
"id" : "11000000-2000-0000-0000-000000000020",
"tenant-id" : "11000000-2000-0000-0000-000000000020"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.10.3 Query a Security Rule by Name

Typical Scenarios
A security rule needs to be queried by name.

Functions
Query a security rule by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-rules/security-rule/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 803


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-617 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - Security rule -


128 ID.
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/security-rules/security-rule/{id} HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
security-rules parameters, For details, see Table 1-615.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"security-rule" : [
{
"remote-ip-prefix" : "10.10.10.0/8",
"direction" : "this is a discr",
"protocol" : "5",
"ethertype" : "huawei-ac-neutron-constants:ethertype-v4",
"updated-at" : "2017-01-13T05:30:31",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 804


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"created-at" : "2017-01-13T05:30:31",
"port-range-max" : 100,
"security-group-id" : "11000000-2000-0000-0000-000000000020",
"port-range-min" : 10,
"remote-group-id" : "11000000-2000-0000-0000-000000000020",
"id" : "11000000-2000-0000-0000-000000000020",
"tenant-id" : "11000000-2000-0000-0000-000000000020"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.10.4 Delete a Security Rule by Name

Typical Scenarios
A security rule needs to be created.

Functions
Delete a security rule by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/security-rules/security-rule/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 805


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-618 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - Security rule -


128 ID.
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
DELETE /restconf/data/huawei-ac-neutron:neutron-cfg/security-rules/security-rule/{id} HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 806


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.11 Firewall
# Firewall operation APIs

1.9.5.11.1 Create a Firewall Rule

Typical Scenarios
A firewall needs to be created.

Functions
Create a firewall.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/fw/firewalls

Request Parameters

Table 1-619 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

firewal Yes REFER For details, see Parameters for -


lDtoWr ENCE Table 1-620. creating a
apper firewall.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 807


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-620 FirewallDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

firewal Yes REFER For details, see Firewall object. -


l ENCE Table 1-621.

Table 1-621 FirewallDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

id Yes string 36 - UUID of a "ff000000-


charac firewall. This ff00-0000-
ters. field cannot be abce-00000000
The updated. 0001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 808


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

descrip No string 0 to - Firewall "firewall


tion 1024 description. description"
charac
ters.

name No string 0 to - Firewall name. "test_fw1"


255
charac
ters.

status No string 0 to - Router status. "ACTIVE"


255
charac
ters.

admin No string 0 to - Administrative "true"


_state_ 255 status.
up charac
ters.

shared No string 0 to - Whether a "false"


255 firewall policy
charac can be shared.
ters.

firewal Yes string 0 to 36 - UUID of a "9951b5fd-


l_polic charac firewall policy. d187-4ab6-
y_id ters. b71f-397dd193
2027"

router_ No array< 0-255 - UUID list of ["00000000-00


ids string> items. routers 00-0000-1234-
Each associated with 000000000003
item firewalls. The "]
has 0 firewalls will
to 36 be applied to
charac the associated
ters. routers.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/fw/firewalls HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 809


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"firewall" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",
"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-622 FirewallDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

firewal REFER For details, see Table Firewall object. -


l ENCE 1-623.

Table 1-623 FirewallDto parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

id string 36 characters. - UUID of a "ff000000-


The value must firewall. This ff00-0000-
meet the field cannot be abce-00000000
following updated. 0001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

descrip string 0 to 1024 - Firewall "firewall


tion characters. description. description"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 810


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

name string 0 to 255 - Firewall name. "test_fw1"


characters.

status string 0 to 255 - Router status. "ACTIVE"


characters.

admin string 0 to 255 - Administrative "true"


_state_ characters. status.
up

shared string 0 to 255 - Whether a "false"


characters. firewall policy
can be shared.

firewal string 0 to 36 - UUID of a "9951b5fd-


l_polic characters. firewall policy. d187-4ab6-
y_id b71f-397dd193
2027"

router_ array< 0-255 items. - UUID list of ["00000000-00


ids string> Each item has 0 routers 00-0000-1234-
to 36 associated with 000000000003
characters. firewalls. The "]
firewalls will
be applied to
the associated
routers.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewall" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 811


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.11.2 Query All Firewalls

Typical Scenarios
All firewalls need to be queried.

Functions
Query all firewalls.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/fw/firewalls

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 812


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-624 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/fw/firewalls?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-625 FirewallQueryOutputDto parameters

Param Type Value Range Defaul Description Example


eter t Value

firewal ARRAY 0-255 items. For details, Firewall list. -


ls _REFER see Table 1-623.
ENCE

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 813


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"firewalls" : [
{
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",
"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
],
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.11.3 Query a Firewall Rule by ID

Typical Scenarios
A firewall needs to be queried by ID.

Functions
Query a firewall by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 814


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/fw/firewalls/{id}

Table 1-626 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID for querying "ff000000-


charac a firewall. ff00-0000-
ters. abce-00000000
The 0001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/fw/firewalls/ff000000-ff00-0000-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 815


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

FirewallDtoWrapper parameters, For details, see Table 1-622.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewall" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",
"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 816


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.11.4 Update a Firewall Rule by ID

Typical Scenarios
A firewall needs to be updated by ID.

Functions
Update a firewall by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/fw/firewalls/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 817


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-627 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID for updating "ff000000-


charac a firewall. ff00-0000-
ters. abce-00000000
The 0001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-628 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

firewal Yes REFER For details, see Firewall entity. -


lDtoWr ENCE Table 1-620.
apper

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/fw/firewalls/ff000000-ff00-0000-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 818


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"firewall" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",
"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
FirewallDtoWrapper parameters, For details, see Table 1-622.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewall" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",
"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 819


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.11.5 Delete a Firewall Rule by ID

Typical Scenarios
A firewall needs to be deleted by ID.

Functions
Delete a firewall by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/fw/firewalls/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 820


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-629 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - ID for deleting "ff000000-


charac a firewall. ff00-0000-
ters. abce-00000000
The 0001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/fw/firewalls/ff000000-ff00-0000-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 821


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

FirewallDtoWrapper parameters, For details, see Table 1-622.


Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewall" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-ff00-0000-abce-000000000001",
"description" : "firewall description",
"name" : "test_fw1",
"status" : "ACTIVE",
"admin_state_up" : "true",
"shared" : "false",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"router_ids" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.12 Firewall Policies


# Firewall policy operation APIs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 822


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.12.1 Create a Firewall Policy

Typical Scenarios
A firewall policy needs to be created. This operation can be performed only after
firewall rules are created.

Functions
Create a firewall policy.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/fw/firewall_policies

Request Parameters

Table 1-630 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

firewal Yes REFER For details, see Parameters for -


lPolicy ENCE Table 1-631. creating a
DtoWr firewall policy.
apper

Table 1-631 FirewallPolicyDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

firewal Yes REFER For details, see - -


lPolicy ENCE Table 1-632.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 823


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-632 FirewallPolicyDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string - - Tenant ID. This "00000000-000


_id field cannot be 0-0000-
updated. abce-00000000
0001"

id Yes uuid - - UUID of a "ff000000-0000


firewall policy. -0002-
This field abce-00000000
cannot be 0001"
updated.

descrip No string 0 to - Firewall policy "a firewall rule


tion 1024 description. description"
charac
ters.

name No string 0 to - Firewall policy "a firewall


255 name. rule"
charac
ters.

firewal No array< 0-255 - UUID list of ["00000000-00


l_rules string> items. firewall rules. 00-0000-
Each abce-00000000
item 0002","000000
has 0 00-0000-0000-
to 36 abce-00000000
charac 0003"]
ters.

shared No string 0 to - Whether a "false"


255 firewall policy
charac can be shared.
ters.

audite No string 0 to - Whether a "false"


d 255 firewall policy
charac is approved.
ters.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/fw/firewall_policies HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 824


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"firewallPolicy" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-0000-0002-abce-000000000001",
"description" : "a firewall rule description",
"name" : "a firewall rule",
"firewall_rules" : ["00000000-0000-0000-abce-000000000002","00000000-0000-0000-
abce-000000000003"],
"shared" : "false",
"audited" : "false"
}
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-633 FirewallPolicyDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

firewal REFER For details, see Table - -


lPolicy ENCE 1-634.

Table 1-634 FirewallPolicyDto parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant string - - Tenant ID. This "00000000-000


_id field cannot be 0-0000-
updated. abce-00000000
0001"

id uuid - - UUID of a "ff000000-0000


firewall policy. -0002-
This field abce-00000000
cannot be 0001"
updated.

descrip string 0 to 1024 - Firewall policy "a firewall rule


tion characters. description. description"

name string 0 to 255 - Firewall policy "a firewall


characters. name. rule"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 825


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

firewal array< 0-255 items. - UUID list of ["00000000-00


l_rules string> Each item has 0 firewall rules. 00-0000-
to 36 abce-00000000
characters. 0002","000000
00-0000-0000-
abce-00000000
0003"]

shared string 0 to 255 - Whether a "false"


characters. firewall policy
can be shared.

audite string 0 to 255 - Whether a "false"


d characters. firewall policy
is approved.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewallPolicy" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-0000-0002-abce-000000000001",
"description" : "a firewall rule description",
"name" : "a firewall rule",
"firewall_rules" : ["00000000-0000-0000-abce-000000000002","00000000-0000-0000-
abce-000000000003"],
"shared" : "false",
"audited" : "false"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 826


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.12.2 Query All Firewall Policies

Typical Scenarios
All firewall policies need to be queried.

Functions
Query all firewall policies.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/fw/firewall_policies

Table 1-635 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 827


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/fw/firewall_policies?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-636 FirewallPolicyQueryOutputDto parameters

Param Type Value Range Defaul Description Example


eter t Value

firewal ARRAY 0-255 items. For details, List of firewall -


lPolicy _REFER see Table 1-634. policy objects.
s ENCE

service string 0 to 255 - Cloud platform "physnet"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"firewallPolicys" : [
{
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-0000-0002-abce-000000000001",
"description" : "a firewall rule description",
"name" : "a firewall rule",
"firewall_rules" : ["00000000-0000-0000-abce-000000000002","00000000-0000-0000-
abce-000000000003"],
"shared" : "false",
"audited" : "false"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 828


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"service_name" : "physnet"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.12.3 Query a Firewall Policy by ID

Typical Scenarios
A firewall policy needs to be queried by ID.

Functions
Query a firewall policy by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/fw/firewall_policies/{id}

Table 1-637 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - ID for querying "ff000000-0000


a firewall -0002-
policy. abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 829


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/fw/firewall_policies/ff000000-0000-0002-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.
FirewallPolicyDtoWrapper parameters, For details, see Table 1-633.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewallPolicy" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-0000-0002-abce-000000000001",
"description" : "a firewall rule description",
"name" : "a firewall rule",
"firewall_rules" : ["00000000-0000-0000-abce-000000000002","00000000-0000-0000-
abce-000000000003"],
"shared" : "false",
"audited" : "false"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 830


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.12.4 Update a Firewall Policy by ID

Typical Scenarios
A firewall policy needs to be updated by ID.

Functions
Update a firewall policy by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/fw/firewall_policies/{id}

Table 1-638 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - ID for updating "ff000000-0000


a firewall -0002-
policy. abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 831


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-639 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

firewal Yes REFER For details, see Parameters for -


lPolicy ENCE Table 1-631. updating a
DtoWr firewall policy.
apper

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/fw/firewall_policies/ff000000-0000-0002-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"firewallPolicy" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-0000-0002-abce-000000000001",
"description" : "a firewall rule description",
"name" : "a firewall rule",
"firewall_rules" : ["00000000-0000-0000-abce-000000000002","00000000-0000-0000-
abce-000000000003"],
"shared" : "false",
"audited" : "false"
}
}

Response Parameters
Response status code 200: Response status code 201: OK.
FirewallPolicyDtoWrapper parameters, For details, see Table 1-633.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 832


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewallPolicy" : {
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"id" : "ff000000-0000-0002-abce-000000000001",
"description" : "a firewall rule description",
"name" : "a firewall rule",
"firewall_rules" : ["00000000-0000-0000-abce-000000000002","00000000-0000-0000-
abce-000000000003"],
"shared" : "false",
"audited" : "false"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.12.5 Delete a Firewall Policy by ID

Typical Scenarios
A firewall policy needs to be deleted by ID.

Functions
Delete a firewall policy by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/fw/firewall_policies/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 833


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-640 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - ID for deleting "ff000000-0000


a firewall -0002-
policy. abce-00000000
0001"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/fw/firewall_policies/ff000000-0000-0002-abce-000000000001 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 834


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.12.6 Bind a Firewall Rule to a Firewall Policy

Typical Scenarios
A firewall rule needs to be bound to a firewall policy.

Functions
Bind a Firewall Rule to a Firewall Policy.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/fw/firewall_policies/{id}/insert_rule

Table 1-641 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - ID for updating "ff000000-0000


a firewall -0002-
policy. abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 835


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-642 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

firewal Yes REFER For details, see Parameters for -


lPolicy ENCE Table 1-643. updating a
Updat firewall policy.
eDto

Table 1-643 FirewallPolicyUpdateDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - UUID of a "00000000-000


charac firewall policy. 0-1111-2222-0
ters. 00000000001"

firewal Yes string 0 to 36 - UUID of a "00000000-000


l_rule_i charac firewall rule. 0-1111-2222-0
d ters. 00000000002"

insert_ No string 0 to 36 - UUID of the "00000000-000


after charac rule after the 0-1111-2222-0
ters. inserted 00000000003"
firewall rule.

insert_ No string 0 to 36 - UUID of the "00000000-000


before charac rule before the 0-1111-2222-0
ters. inserted 00000000002"
firewall rule.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/fw/firewall_policies/ff000000-0000-0002-abce-000000000001/insert_rule
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "00000000-0000-1111-2222-000000000001",
"firewall_rule_id" : "00000000-0000-1111-2222-000000000002",
"insert_after" : "00000000-0000-1111-2222-000000000003",
"insert_before" : "00000000-0000-1111-2222-000000000002"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 836


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-644 FirewallPolicyUpdateDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 36 - UUID of a "00000000-000


characters. firewall policy. 0-1111-2222-0
00000000001"

firewal string 0 to 36 - UUID of a "00000000-000


l_rule_i characters. firewall rule. 0-1111-2222-0
d 00000000002"

insert_ string 0 to 36 - UUID of the "00000000-000


after characters. rule after the 0-1111-2222-0
inserted 00000000003"
firewall rule.

insert_ string 0 to 36 - UUID of the "00000000-000


before characters. rule before the 0-1111-2222-0
inserted 00000000002"
firewall rule.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"id" : "00000000-0000-1111-2222-000000000001",
"firewall_rule_id" : "00000000-0000-1111-2222-000000000002",
"insert_after" : "00000000-0000-1111-2222-000000000003",
"insert_before" : "00000000-0000-1111-2222-000000000002"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 837


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.12.7 Unbind a Firewall Rule from a Firewall Policy

Typical Scenarios
A firewall rule needs to be unbound from a firewall policy.

Functions
Unbind a firewall rule from a firewall policy.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/fw/firewall_policies/{id}/remove_rule

Table 1-645 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string - - ID for updating "ff000000-0000


a firewall -0002-
policy. abce-00000000
0001"

Request Parameters

Table 1-646 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

firewal Yes REFER For details, see Parameters for -


lPolicy ENCE Table 1-643. updating a
Updat firewall policy.
eDto

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 838


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/fw/firewall_policies/ff000000-0000-0002-abce-000000000001/
remove_rule HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "00000000-0000-1111-2222-000000000001",
"firewall_rule_id" : "00000000-0000-1111-2222-000000000002",
"insert_after" : "00000000-0000-1111-2222-000000000003",
"insert_before" : "00000000-0000-1111-2222-000000000002"
}

Response Parameters
Response status code 200: Response status code 201: OK.

FirewallPolicyUpdateDto parameters, For details, see Table 1-644.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"id" : "00000000-0000-1111-2222-000000000001",
"firewall_rule_id" : "00000000-0000-1111-2222-000000000002",
"insert_after" : "00000000-0000-1111-2222-000000000003",
"insert_before" : "00000000-0000-1111-2222-000000000002"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.13 FirewallRule
# Firewall rule operation APIs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 839


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.13.1 Create a Firewall Rule

Typical Scenarios
A firewall rule needs to be created.

Functions
Create a firewall rule.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/fw/firewall_rules

Request Parameters

Table 1-647 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

firewal Yes REFER For details, see Firewall rule. -


lRuleD ENCE Table 1-648.
toWra
pper

Table 1-648 FirewallRuleDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

firewal Yes REFER For details, see - -


lRule ENCE Table 1-649.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 840


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-649 FirewallRuleDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - Firewall rule "ffee0000-0000


ID. This field -0000-
cannot be abce-00000000
updated. 0001"

name No string 0 to - Firewall rule "a firewall


255 name. rule"
charac
ters.

descrip No string 0 to - Firewall rule "this is firewall


tion 1024 description. rule
charac description"
ters.

firewal No string 0 to 36 - ID of a policy "9951b5fd-


l_polic charac to which a d187-4ab6-
y_id ters. firewall rule b71f-397dd193
belongs. This 2027"
field cannot be
updated.

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

shared No string 0 to - Whether a "false"


255 firewall rule is
charac shared.
ters.

protoc Yes string 0 to 40 - Protocol. The "tcp"


ol charac value must be
ters. none, tcp, udp,
icmp, or a
integer from 1
to 255. The
value contains
a maximum of
40 bytes.

ip_vers No int32 [1-255 - IP version. 4


ion ]

source No string 0 to 64 - Source IP "192.168.9.0/24


_ip_ad charac address or "
dress ters. CIDR of a rule.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 841


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

destina No string 0 to 64 - Destination IP "192.168.10.0/2


tion_ip charac address or 4"
_addre ters. CIDR of a rule.
ss

source No string 0 to - Source IP "192.168.9.0/24


_ip_ad 26214 address or ,
dresses 4 CIDR list of a 192.168.20.0/2
charac rule. 4"
ters.

destina No string 0 to - Destination IP "192.168.10.0/2


tion_ip 26214 address or 4,192.168.20.0/
_addre 4 CIDR list of a 24"
sses charac rule.
ters.

source No string 0 to 46 - Source port. "43"


_port charac This parameter
ters. is valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

destina No string 0 to 46 - Destination "34"


tion_p charac port. This
ort ters. parameter is
valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 842


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

source No string 0 to - Source port. "43"


_ports 256 This parameter
charac is valid only
ters. when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

destina No string 0 to - Destination "34"


tion_p 256 port. This
orts charac parameter is
ters. valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

positio No int32 [0-255 - Position of a 56


n ] rule in a policy.
The value
starts from 1. If
no policy is
bound, the
value is 0.

action No string 0 to - Rule action. "deny"


255
charac
ters.

enable No string 0 to - Whether to "true"


d 255 enable a rule.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 843


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/fw/firewall_rules HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"firewallRule" : {
"id" : "ffee0000-0000-0000-abce-000000000001",
"name" : "a firewall rule",
"description" : "this is firewall rule description",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"shared" : "false",
"protocol" : "tcp",
"ip_version" : 4,
"source_ip_address" : "192.168.9.0/24",
"destination_ip_address" : "192.168.10.0/24",
"source_ip_addresses" : "192.168.9.0/24,192.168.20.0/24",
"destination_ip_addresses" : "192.168.10.0/24,192.168.20.0/24",
"source_port" : "43",
"destination_port" : "34",
"source_ports" : "43",
"destination_ports" : "34",
"position" : 56,
"action" : "deny",
"enabled" : "true"
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-650 FirewallRuleDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

firewal REFER For details, see Table - -


lRule ENCE 1-651.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 844


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-651 FirewallRuleDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id uuid - - Firewall rule "ffee0000-0000


ID. This field -0000-
cannot be abce-00000000
updated. 0001"

name string 0 to 255 - Firewall rule "a firewall


characters. name. rule"

descrip string 0 to 1024 - Firewall rule "this is firewall


tion characters. description. rule
description"

firewal string 0 to 36 - ID of a policy "9951b5fd-


l_polic characters. to which a d187-4ab6-
y_id firewall rule b71f-397dd193
belongs. This 2027"
field cannot be
updated.

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

shared string 0 to 255 - Whether a "false"


characters. firewall rule is
shared.

protoc string 0 to 40 - Protocol. The "tcp"


ol characters. value must be
none, tcp, udp,
icmp, or a
integer from 1
to 255. The
value contains
a maximum of
40 bytes.

ip_vers int32 [1-255] - IP version. 4


ion

source string 0 to 64 - Source IP "192.168.9.0/24


_ip_ad characters. address or "
dress CIDR of a rule.

destina string 0 to 64 - Destination IP "192.168.10.0/2


tion_ip characters. address or 4"
_addre CIDR of a rule.
ss

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 845


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

source string 0 to 262144 - Source IP "192.168.9.0/24


_ip_ad characters. address or ,
dresses CIDR list of a 192.168.20.0/2
rule. 4"

destina string 0 to 262144 - Destination IP "192.168.10.0/2


tion_ip characters. address or 4,192.168.20.0/
_addre CIDR list of a 24"
sses rule.

source string 0 to 46 - Source port. "43"


_port characters. This parameter
is valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

destina string 0 to 46 - Destination "34"


tion_p characters. port. This
ort parameter is
valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 846


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

source string 0 to 256 - Source port. "43"


_ports characters. This parameter
is valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

destina string 0 to 256 - Destination "34"


tion_p characters. port. This
orts parameter is
valid only
when the
protocol is set
to tcp or udp.
Otherwise, this
parameter
must be set to
null or empty.
The type is
Integer for a
single port.

positio int32 [0-255] - Position of a 56


n rule in a policy.
The value
starts from 1. If
no policy is
bound, the
value is 0.

action string 0 to 255 - Rule action. "deny"


characters.

enable string 0 to 255 - Whether to "true"


d characters. enable a rule.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 847


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewallRule" : {
"id" : "ffee0000-0000-0000-abce-000000000001",
"name" : "a firewall rule",
"description" : "this is firewall rule description",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"shared" : "false",
"protocol" : "tcp",
"ip_version" : 4,
"source_ip_address" : "192.168.9.0/24",
"destination_ip_address" : "192.168.10.0/24",
"source_ip_addresses" : "192.168.9.0/24,192.168.20.0/24",
"destination_ip_addresses" : "192.168.10.0/24,192.168.20.0/24",
"source_port" : "43",
"destination_port" : "34",
"source_ports" : "43",
"destination_ports" : "34",
"position" : 56,
"action" : "deny",
"enabled" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.13.2 Query All Firewall Rules

Typical Scenarios
All firewall rules need to be queried.

Functions
Query all firewall rules.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 848


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/fw/firewall_rules

Table 1-652 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/fw/firewall_rules?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 849


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-653 FirewallRuleQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

firewal ARRAY 0-255 items. For details, - -


lRule _REFER see Table 1-651.
ENCE

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"firewallRule" : [
{
"id" : "ffee0000-0000-0000-abce-000000000001",
"name" : "a firewall rule",
"description" : "this is firewall rule description",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"shared" : "false",
"protocol" : "tcp",
"ip_version" : 4,
"source_ip_address" : "192.168.9.0/24",
"destination_ip_address" : "192.168.10.0/24",
"source_ip_addresses" : "192.168.9.0/24,192.168.20.0/24",
"destination_ip_addresses" : "192.168.10.0/24,192.168.20.0/24",
"source_port" : "43",
"destination_port" : "34",
"source_ports" : "43",
"destination_ports" : "34",
"position" : 56,
"action" : "deny",
"enabled" : "true"
}
],
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 850


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.13.3 Query a Firewall Rule by ID

Typical Scenarios
A firewall rule needs to be queried by ID.

Functions
Query a firewall rule by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/fw/firewall_rules/{id}

Table 1-654 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - ID for querying "ffee0000-0000


a firewall rule. -0000-
abce-00000000
0001"

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 851


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/fw/firewall_rules/ffee0000-0000-0000-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

FirewallRuleDtoWrapper parameters, For details, see Table 1-650.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewallRule" : {
"id" : "ffee0000-0000-0000-abce-000000000001",
"name" : "a firewall rule",
"description" : "this is firewall rule description",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"shared" : "false",
"protocol" : "tcp",
"ip_version" : 4,
"source_ip_address" : "192.168.9.0/24",
"destination_ip_address" : "192.168.10.0/24",
"source_ip_addresses" : "192.168.9.0/24,192.168.20.0/24",
"destination_ip_addresses" : "192.168.10.0/24,192.168.20.0/24",
"source_port" : "43",
"destination_port" : "34",
"source_ports" : "43",
"destination_ports" : "34",
"position" : 56,
"action" : "deny",
"enabled" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 852


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.13.4 Update a Firewall Rule by ID

Typical Scenarios
A firewall rule needs to be updated by ID.

Functions
Update a firewall rule by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/fw/firewall_rules/{id}

Table 1-655 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - ID for updating "ffee0000-0000


a firewall rule. -0000-
abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 853


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-656 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

firewal Yes REFER For details, see Firewall rule. -


lRuleD ENCE Table 1-648.
toWra
pper

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/fw/firewall_rules/ffee0000-0000-0000-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"firewallRule" : {
"id" : "ffee0000-0000-0000-abce-000000000001",
"name" : "a firewall rule",
"description" : "this is firewall rule description",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"shared" : "false",
"protocol" : "tcp",
"ip_version" : 4,
"source_ip_address" : "192.168.9.0/24",
"destination_ip_address" : "192.168.10.0/24",
"source_ip_addresses" : "192.168.9.0/24,192.168.20.0/24",
"destination_ip_addresses" : "192.168.10.0/24,192.168.20.0/24",
"source_port" : "43",
"destination_port" : "34",
"source_ports" : "43",
"destination_ports" : "34",
"position" : 56,
"action" : "deny",
"enabled" : "true"
}
}

Response Parameters
Response status code 200: Response status code 201: Created.

FirewallRuleDtoWrapper parameters, For details, see Table 1-650.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 854


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: Created.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"firewallRule" : {
"id" : "ffee0000-0000-0000-abce-000000000001",
"name" : "a firewall rule",
"description" : "this is firewall rule description",
"firewall_policy_id" : "9951b5fd-d187-4ab6-b71f-397dd1932027",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"shared" : "false",
"protocol" : "tcp",
"ip_version" : 4,
"source_ip_address" : "192.168.9.0/24",
"destination_ip_address" : "192.168.10.0/24",
"source_ip_addresses" : "192.168.9.0/24,192.168.20.0/24",
"destination_ip_addresses" : "192.168.10.0/24,192.168.20.0/24",
"source_port" : "43",
"destination_port" : "34",
"source_ports" : "43",
"destination_ports" : "34",
"position" : 56,
"action" : "deny",
"enabled" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.13.5 Delete a Firewall Rule by ID

Typical Scenarios
A firewall rule needs to be deleted by ID.

Functions
Delete a firewall rule by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 855


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/fw/firewall_rules/{id}

Table 1-657 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - ID for deleting "ffee0000-0000


a firewall rule. -0000-
abce-00000000
0001"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/fw/firewall_rules/ffee0000-0000-0000-abce-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 856


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.14 VPN Service


# VPN service operation APIs

1.9.5.14.1 Create a VPN Service

Typical Scenarios
A VPN service needs to be created.

Functions
Create a VPN service.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/vpn/vpnservices

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 857


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-658 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpnser Yes REFER For details, see Parameters for -


viceDt ENCE Table 1-659. creating a VPN
oWrap service.
per

Table 1-659 VPNServiceDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name. This
charac field cannot be
ters. updated.

vpnser Yes REFER For details, see - -


vice ENCE Table 1-660.

Table 1-660 VPNServiceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - VPN service ID. "90000000-000


This field 0-0000-0000-0
cannot be 00000000001"
updated.

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

name No string 0 to - VPN service "vpn_001"


255 name.
charac
ters.

descrip No string 0 to - VPN service "vpn


tion 255 description. description"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 858


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

local_a No string 0 to - Huawei "192.168.200.2


ddress 255 proprietary "
charac field. It
ters. specifies the
public IP
address of the
local VPN
gateway.
Before creating
a VPN service,
add the
corresponding
port (specified
IP address).
This is a
backfilling
attribute. The
system queries
the value of
this parameter
based on the
router ID and
fills the value
in the
response.

subnet Yes array< 0-255 - Local subnet ID ["20000000-00


_ids string> items. list of the VPN 00-0000-0000-
Each service tunnel. 000000000021
item IDs of all "]
has 0 subnets
to 255 associated with
charac the router are
ters. included by
default. This
field cannot be
updated.

router_ Yes uuid - - ID of the "30000000-000


id router used by 0-0000-0000-0
a VPN service. 00000000001"
This field
cannot be
updated.

status No string 0 to - VPN service "true"


255 status.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 859


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

admin No string 0 to - Administrative "true"


_state_ 255 status of a VPN
up charac service. If the
ters. value is false,
the port does
not forward
data packets.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/vpn/vpnservices HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"vpnservice" : {
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-661 VPNServiceDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name. This
field cannot be
updated.

vpnser REFER For details, see Table - -


vice ENCE 1-662.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 860


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-662 VPNServiceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id uuid - - VPN service ID. "90000000-000


This field 0-0000-0000-0
cannot be 00000000001"
updated.

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

name string 0 to 255 - VPN service "vpn_001"


characters. name.

descrip string 0 to 255 - VPN service "vpn


tion characters. description. description"

local_a string 0 to 255 - Huawei "192.168.200.2


ddress characters. proprietary "
field. It
specifies the
public IP
address of the
local VPN
gateway.
Before creating
a VPN service,
add the
corresponding
port (specified
IP address).
This is a
backfilling
attribute. The
system queries
the value of
this parameter
based on the
router ID and
fills the value
in the
response.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 861


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

subnet array< 0-255 items. - Local subnet ID ["20000000-00


_ids string> Each item has 0 list of the VPN 00-0000-0000-
to 255 service tunnel. 000000000021
characters. IDs of all "]
subnets
associated with
the router are
included by
default. This
field cannot be
updated.

router_ uuid - - ID of the "30000000-000


id router used by 0-0000-0000-0
a VPN service. 00000000001"
This field
cannot be
updated.

status string 0 to 255 - VPN service "true"


characters. status.

admin string 0 to 255 - Administrative "true"


_state_ characters. status of a VPN
up service. If the
value is false,
the port does
not forward
data packets.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 862


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vpnservice" : {
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.14.2 Query All VPN Services

Typical Scenarios
All VPN services need to be queried.

Functions
Query all VPN services.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/vpn/vpnservices

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 863


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-663 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/vpnservices?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-664 VPNServiceQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

vpnser ARRAY 0-255 items. For details, VPN service. -


vice _REFER see Table 1-662.
ENCE

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

numbe int32 [0-2147483647 - Number. 1


r ]

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 864


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpnservice" : [
{
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
],
"service_name" : "physnet1",
"number" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.14.3 Query a VPN Service by ID

Typical Scenarios
A VPN service needs to be queried by ID.

Functions
Query a VPN service by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 865


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/vpn/vpnservices/{id}

Table 1-665 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - ID for querying "90000000-000


a VPN service. 0-0000-0000-0
00000000001"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/vpnservices/90000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
VPNServiceDtoWrapper parameters, For details, see Table 1-661.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 866


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Connection: keep-alive
{
"service_name" : "physnet1",
"vpnservice" : {
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.14.4 Update a VPN Service by ID

Typical Scenarios
A VPN service needs to be updated by ID.

Functions
Update a VPN service by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/vpn/vpnservices/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 867


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-666 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - ID for updating "90000000-000


a VPN service. 0-0000-0000-0
00000000001"

Request Parameters

Table 1-667 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vpnser Yes REFER For details, see Parameters for -


viceDt ENCE Table 1-659. updating a
oWrap VPN service.
per

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/vpn/vpnservices/90000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"vpnservice" : {
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
}

Response Parameters
Response status code 200: Response status code 200: OK.

VPNServiceDtoWrapper parameters, For details, see Table 1-661.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 868


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.


Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"vpnservice" : {
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.14.5 Delete a VPN Service by ID

Typical Scenarios
A VPN service needs to be deleted by ID.

Functions
Delete a VPN service by ID.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 869


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 500 times/minute.


Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/vpn/vpnservices/{id}

Table 1-668 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - Parameters for "90000000-000


deleting a VPN 0-0000-0000-0
service. 00000000001"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/vpn/vpnservices/90000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.
VPNServiceDtoWrapper parameters, For details, see Table 1-661.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 870


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 204 No Content


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"vpnservice" : {
"id" : "90000000-0000-0000-0000-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "vpn_001",
"description" : "vpn description",
"local_address" : "192.168.200.2",
"subnet_ids" : ["20000000-0000-0000-0000-000000000021"],
"router_id" : "30000000-0000-0000-0000-000000000001",
"status" : "true",
"admin_state_up" : "true"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.15 IkePolicy
# IKE policy operation APIs

1.9.5.15.1 Create an IKE Policy

Typical Scenarios
An IKE policy needs to be created.

Functions
Create an IKE policy.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 871


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/vpn/ikepolicies

Request Parameters

Table 1-669 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ikePoli Yes REFER For details, see IKE policy. -


cyDto ENCE Table 1-670.
Wrapp
er

Table 1-670 IkePolicyDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name. This
charac field cannot be
ters. updated.

ikepoli Yes REFER For details, see IKE policy -


cy ENCE Table 1-671. object.

Table 1-671 IkePolicyDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string - - UUID. This field "00000000-000


cannot be 0-0000-1234-0
updated. 00000000001"

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 872


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

name No string 0 to - IKE policy "IkePolicy"


255 name.
charac
ters.

descrip No string 0 to - IKE policy "description


tion 256 description. info"
charac
ters.

shared No string 0 to - Whether the "true"


255 key exchange
charac policy supports
ters. cross-tenant
● true sharing.
● fals
e

auth_a Yes string 0 to - Hash algorithm "sha2"


lgorith 255 for
m charac authentication.
ters. This field
cannot be
updated.

encryp Yes string 0 to - Encryption "aes-128"


tion_al 255 algorithm.
gorith charac
m ters.

phase_ Yes string 0 to - IKE negotiation "main"


negoti 255 mode. This
ation_ charac field cannot be
mode ters. updated.

pfs Yes string 0 to - Perfect forward "group1"


255 secrecy (PFS)
charac used in the IKE
ters. negotiation
phase.

ike_ver Yes string 0 to - IKE version. "v1"


sion 255
charac
ters.

lifetim Yes REFER For details, see Lifecycle. -


e ENCE Table 1-672.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 873


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-672 IKEPolicyLifetimeDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

units No string 0 to - SA lifetime "second"


255 unit. This field
charac cannot be
ters. updated.

value No int32 [60-60 - SA lifetime. 60


4800] This field
cannot be
updated.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/vpn/ikepolicies HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"ikepolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",
"value" : 60
}
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 874


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-673 IkePolicyDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name. This
field cannot be
updated.

ikepoli REFER For details, see Table IKE policy -


cy ENCE 1-674. object.

Table 1-674 IkePolicyDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - UUID. This field "00000000-000


cannot be 0-0000-1234-0
updated. 00000000001"

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

name string 0 to 255 - IKE policy "IkePolicy"


characters. name.

descrip string 0 to 256 - IKE policy "description


tion characters. description. info"

shared string 0 to 255 - Whether the "true"


characters. key exchange
● true policy supports
● false cross-tenant
sharing.

auth_a string 0 to 255 - Hash algorithm "sha2"


lgorith characters. for
m authentication.
This field
cannot be
updated.

encryp string 0 to 255 - Encryption "aes-128"


tion_al characters. algorithm.
gorith
m

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 875


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

phase_ string 0 to 255 - IKE negotiation "main"


negoti characters. mode. This
ation_ field cannot be
mode updated.

pfs string 0 to 255 - Perfect forward "group1"


characters. secrecy (PFS)
used in the IKE
negotiation
phase.

ike_ver string 0 to 255 - IKE version. "v1"


sion characters.

lifetim REFER For details, see Table Lifecycle. -


e ENCE 1-675.

Table 1-675 IKEPolicyLifetimeDto parameters


Param Type Value Range Defaul Description Example
eter t Value

units string 0 to 255 - SA lifetime "second"


characters. unit. This field
cannot be
updated.

value int32 [60-604800] - SA lifetime. 60


This field
cannot be
updated.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 876


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ikepolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.15.2 Query All IKE Policies

Typical Scenarios
All IKE polices need to be queried.

Functions
Query all IKE policies.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 877


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/neutronapi/vpn/ikepolicies

Table 1-676 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/ikepolicies?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-677 IkePolicyQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ikepoli ARRAY 0-255 items. For details, IKE policy. -


cy _REFER see Table 1-674.
ENCE

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 878


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ikepolicy" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",
"value" : 60
}
}
],
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.15.3 Query an IKE Policy by ID

Typical Scenarios
An IKE policy needs to be queried by ID.

Functions
Query an IKE policy by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 879


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/vpn/ikepolicies/{id}

Table 1-678 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - IKE policy ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000111"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/ikepolicies/00000000-0000-0000-1234-000000000111 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

IkePolicyDtoWrapper parameters, For details, see Table 1-673.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 880


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ikepolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.15.4 Update an IKE Policy by ID

Typical Scenarios
An IKE policy needs to be updated by ID.

Functions
Update an IKE policy.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 881


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/vpn/ikepolicies/{id}

Table 1-679 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - IKE policy ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000111"

Request Parameters

Table 1-680 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see IKE policy. -


ENCE Table 1-670.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/vpn/ikepolicies/00000000-0000-0000-1234-000000000111 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"ikepolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 882


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"value" : 60
}
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
IkePolicyDtoWrapper parameters, For details, see Table 1-673.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ikepolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 883


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.5.15.5 Delete an IKE Policy by ID

Typical Scenarios
An IKE policy needs to be deleted by ID.

Functions
Delete an IKE policy by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/vpn/ikepolicies/{id}

Table 1-681 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - IKE policy ID. "00000000-000


charac 0-0000-1234-0
ters. 00000000111"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/vpn/ikepolicies/00000000-0000-0000-1234-000000000111 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 884


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 200: OK.

IkePolicyDtoWrapper parameters, For details, see Table 1-673.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ikepolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IkePolicy",
"description" : "description info",
"shared" : "true",
"auth_algorithm" : "sha2",
"encryption_algorithm" : "aes-128",
"phase_negotiation_mode" : "main",
"pfs" : "group1",
"ike_version" : "v1",
"lifetime" : {
"units" : "second",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 885


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.16 IPsecPolicy
# IPsec policy operation APIs

1.9.5.16.1 Create an IPsec Policy by ID

Typical Scenarios
An IPsec policy needs to be created by ID.

Functions
Create an IPSec policy by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/vpn/ipsecpolicies

Request Parameters

Table 1-682 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipsecP Yes REFER For details, see IPsec policy. -


olicyDt ENCE Table 1-683.
oWrap
per

Table 1-683 IpsecPolicyDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name. This
charac field cannot be
ters. updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 886


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipsecp Yes REFER For details, see IPsec policy -


olicy ENCE Table 1-684. object.

Table 1-684 IpsecPolicyDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - IPsec policy ID. "00000000-000


charac This field 0-0000-1234-0
ters. cannot be 00000000001"
updated.

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

name No string 0 to - IPsec policy "IPSec Policy1"


255 name.
charac
ters.

descrip No string 0 to - Description. "description"


tion 255
charac
ters.

shared No string 0 to - Whether cross- "true"


255 tenant sharing
charac is supported.
ters.
● true
● fals
e

transfo Yes string 0 to - Transmission "esp"


rm_pro 255 protocol.
tocol charac
ters.

encaps Yes string 0 to - Encapsulation "transport"


ulation 255 mode.
_mode charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 887


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

auth_a Yes string 0 to - Hash algorithm "sha2-256"


lgorith 255 for
m charac authentication.
ters. This field
cannot be
updated.

encryp Yes string 0 to - Encryption "aes-128"


tion_al 255 algorithm.
gorith charac
m ters.

pfs Yes string 0 to - Perfect forward "group1"


255 secrecy (PFS)
charac used in the IKE
ters. negotiation
phase.

lifetim Yes REFER For details, see Lifecycle. -


e ENCE Table 1-685.

Table 1-685 IpsecPolicyLifetimeDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

units Yes string 0 to - SA lifetime "seconds"


255 unit. This field
charac cannot be
ters. updated.

value Yes int32 [60-60 - SA lifetime. 60


4800] This field
cannot be
updated.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/vpn/ipsecpolicies HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 888


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ipsecpolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IPSec Policy1",
"description" : "description",
"shared" : "true",
"transform_protocol" : "esp",
"encapsulation_mode" : "transport",
"auth_algorithm" : "sha2-256",
"encryption_algorithm" : "aes-128",
"pfs" : "group1",
"lifetime" : {
"units" : "seconds",
"value" : 60
}
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-686 IpsecPolicyDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name. This
field cannot be
updated.

ipsecp REFER For details, see Table IPsec policy -


olicy ENCE 1-687. object.

Table 1-687 IpsecPolicyDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 36 - IPsec policy ID. "00000000-000


characters. This field 0-0000-1234-0
cannot be 00000000001"
updated.

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

name string 0 to 255 - IPsec policy "IPSec Policy1"


characters. name.

descrip string 0 to 255 - Description. "description"


tion characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 889


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

shared string 0 to 255 - Whether cross- "true"


characters. tenant sharing
● true is supported.
● false

transfo string 0 to 255 - Transmission "esp"


rm_pro characters. protocol.
tocol

encaps string 0 to 255 - Encapsulation "transport"


ulation characters. mode.
_mode

auth_a string 0 to 255 - Hash algorithm "sha2-256"


lgorith characters. for
m authentication.
This field
cannot be
updated.

encryp string 0 to 255 - Encryption "aes-128"


tion_al characters. algorithm.
gorith
m

pfs string 0 to 255 - Perfect forward "group1"


characters. secrecy (PFS)
used in the IKE
negotiation
phase.

lifetim REFER For details, see Table Lifecycle. -


e ENCE 1-688.

Table 1-688 IpsecPolicyLifetimeDto parameters


Param Type Value Range Defaul Description Example
eter t Value

units string 0 to 255 - SA lifetime "seconds"


characters. unit. This field
cannot be
updated.

value int32 [60-604800] - SA lifetime. 60


This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 890


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ipsecpolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IPSec Policy1",
"description" : "description",
"shared" : "true",
"transform_protocol" : "esp",
"encapsulation_mode" : "transport",
"auth_algorithm" : "sha2-256",
"encryption_algorithm" : "aes-128",
"pfs" : "group1",
"lifetime" : {
"units" : "seconds",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.16.2 Query All IPsec Policies

Typical Scenarios
All IPsec policies need to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 891


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query all IPSec policies.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/vpn/ipsecpolicies

Table 1-689 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/ipsecpolicies?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 892


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-690 IpsecPolicyQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipsecp ARRAY 0-255 items. For details, IPsec policy. -


olicy _REFER see Table 1-687.
ENCE

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ipsecpolicy" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IPSec Policy1",
"description" : "description",
"shared" : "true",
"transform_protocol" : "esp",
"encapsulation_mode" : "transport",
"auth_algorithm" : "sha2-256",
"encryption_algorithm" : "aes-128",
"pfs" : "group1",
"lifetime" : {
"units" : "seconds",
"value" : 60
}
}
],
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 893


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.16.3 Query an IPsec Policy by ID

Typical Scenarios
An IPsec policy needs to be queried by ID.

Functions
Query an IPSec policy by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/vpn/ipsecpolicies/{id}

Table 1-691 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - IPsec policy ID. "00000000-000


0-0000-1234-0
00000000001"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/ipsecpolicies/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 894


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 204: OK.
IpsecPolicyDtoWrapper parameters, For details, see Table 1-686.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 204: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ipsecpolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IPSec Policy1",
"description" : "description",
"shared" : "true",
"transform_protocol" : "esp",
"encapsulation_mode" : "transport",
"auth_algorithm" : "sha2-256",
"encryption_algorithm" : "aes-128",
"pfs" : "group1",
"lifetime" : {
"units" : "seconds",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 895


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.5.16.4 Update an IPsec Policy by ID

Typical Scenarios
An IPsec policy needs to be updated by name.

Functions
Update an IPsec policy by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/vpn/ipsecpolicies/{id}

Table 1-692 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - IPsec policy ID. "00000000-000


0-0000-1234-0
00000000001"

Request Parameters

Table 1-693 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipsecP Yes REFER For details, see IPsec policy. -


olicyDt ENCE Table 1-683.
oWrap
per

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 896


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/vpn/ipsecpolicies/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"ipsecpolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IPSec Policy1",
"description" : "description",
"shared" : "true",
"transform_protocol" : "esp",
"encapsulation_mode" : "transport",
"auth_algorithm" : "sha2-256",
"encryption_algorithm" : "aes-128",
"pfs" : "group1",
"lifetime" : {
"units" : "seconds",
"value" : 60
}
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
IpsecPolicyDtoWrapper parameters, For details, see Table 1-686.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ipsecpolicy" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IPSec Policy1",
"description" : "description",
"shared" : "true",
"transform_protocol" : "esp",
"encapsulation_mode" : "transport",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 897


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"auth_algorithm" : "sha2-256",
"encryption_algorithm" : "aes-128",
"pfs" : "group1",
"lifetime" : {
"units" : "seconds",
"value" : 60
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.16.5 Delete an IPsec Policy by ID

Typical Scenarios
An IPsec policy needs to be deleted by ID.

Functions
Delete an IPSec policy by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/vpn/ipsecpolicies/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 898


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-694 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - IPsec policy ID. "00000000-000


0-0000-1234-0
00000000001"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/vpn/ipsecpolicies/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 899


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.17 Ipsec Site Connection


# IPsec site connection operation APIs

1.9.5.17.1 Create an IPsec Site Connection

Typical Scenarios
An IPsec site connection needs to be created by ID after the IKE policies, IPsec
policies, and VPN services are created.

Functions
Create an IPSec site connection.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/vpn/ipsec-site-connections

Request Parameters

Table 1-695 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipsecC Yes REFER For details, see IPsec site -


onnect ENCE Table 1-696. connection.
ionDto
Wrapp
er

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 900


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-696 IpsecConnectionDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name. This
charac field cannot be
ters. updated.

ipsec_s Yes REFER For details, see IPSec site -


ite_con ENCE Table 1-697. connection
nectio object.
n

Table 1-697 IpsecConnectionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to 36 - IPsec site "00000000-000


charac connection ID. 0-0000-1234-0
ters. This field 00000000001"
cannot be
updated.

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

name No string 0 to - IPsec site "IpSecConnecti


255 connection on1"
charac name.
ters.

descrip No string 0 to - Description. "This is an


tion 256 IpsecConnectio
charac n."
ters.

peer_a Yes string 0 to - Public IP "192.168.1.1"


ddress 255 address or
charac FQDN of the
ters. peer VPN
gateway.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 901


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peer_id Yes string 0 to - Peer VPN ID, "00000000-000


255 which can be a 0-0000-1111-0
charac name, 00000000001"
ters. character
string, or
FQDN.

peer_ci Yes array< 0-255 - Peer private ["192.168.2.0/2


drs string> items. CIDR list. 4"]

route_ Yes string 0 to - Route mode. "static"


mode 255 This field
charac cannot be
ters. updated.

mtu Yes int32 68 to - Maximum 100


1500 transmission
charac unit.
ters.
[68-15
00]

auth_ Yes string 0 to - Authentication "psk"


mode 255 mode. This
charac field cannot be
ters. updated.

psk Yes string 0 to - This field may "psk123"


255 contain
charac sensitive or
ters. personal data.
Keep it secure.
Pre-shared key
(PSK).

initiato Yes string 0 to - Interaction "bi-directional"


r 255 mode between
charac the VPN and
ters. IPsec
connection.

admin No string 0 to - VPN "true"


_state_ 255 connection
up charac administrative
ters. status.
● true
● fals
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 902


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

status No string 0 to - Connectivity "ACTIVE"


255 status.
charac
ters.

ikepoli Yes string 0 to 36 - IKE policy ID. "00000000-000


cy_id charac This field 0-0000-1234-0
ters. cannot be 00000000010"
updated.

ipsecp Yes string 0 to 36 - IPsec policy ID. "00000000-000


olicy_i charac This field 0-0000-1234-0
d ters. cannot be 00000000011"
updated.

vpnser Yes string 0 to 36 - VPN service ID. "00000000-000


vice_id charac This field 0-0000-1234-0
ters. cannot be 00000000012"
updated.

dpd Yes REFER For details, see DPD object. -


ENCE Table 1-698.

Table 1-698 DpdDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

action Yes string 0 to - DPD detection "hold"


255 type.
charac
ters.

interva Yes int32 [1-655 - Interval for 60


l 35] triggering DPD.

timeou Yes int32 [1-655 - Interval for 70


t 35] retransmitting
DPD packets.
The value must
be greater than
the interval
value.

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 903


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

POST /controller/dc/v2/neutronapi/vpn/ipsec-site-connections HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"ipsec_site_connection" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IpSecConnection1",
"description" : "This is an IpsecConnection.",
"peer_address" : "192.168.1.1",
"peer_id" : "00000000-0000-0000-1111-000000000001",
"peer_cidrs" : ["192.168.2.0/24"],
"route_mode" : "static",
"mtu" : 100,
"auth_mode" : "psk",
"psk" : "psk123",
"initiator" : "bi-directional",
"admin_state_up" : "true",
"status" : "ACTIVE",
"ikepolicy_id" : "00000000-0000-0000-1234-000000000010",
"ipsecpolicy_id" : "00000000-0000-0000-1234-000000000011",
"vpnservice_id" : "00000000-0000-0000-1234-000000000012",
"dpd" : {
"action" : "hold",
"interval" : 60,
"timeout" : 70
}
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-699 IpsecConnectionDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name. This
field cannot be
updated.

ipsec_s REFER For details, see Table IPSec site -


ite_con ENCE 1-700. connection
nectio object.
n

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 904


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-700 IpsecConnectionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 36 - IPsec site "00000000-000


characters. connection ID. 0-0000-1234-0
This field 00000000001"
cannot be
updated.

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

name string 0 to 255 - IPsec site "IpSecConnecti


characters. connection on1"
name.

descrip string 0 to 256 - Description. "This is an


tion characters. IpsecConnectio
n."

peer_a string 0 to 255 - Public IP "192.168.1.1"


ddress characters. address or
FQDN of the
peer VPN
gateway.

peer_id string 0 to 255 - Peer VPN ID, "00000000-000


characters. which can be a 0-0000-1111-0
name, 00000000001"
character
string, or
FQDN.

peer_ci array< 0-255 items. - Peer private ["192.168.2.0/2


drs string> CIDR list. 4"]

route_ string 0 to 255 - Route mode. "static"


mode characters. This field
cannot be
updated.

mtu int32 68 to 1500 - Maximum 100


characters. transmission
[68-1500] unit.

auth_ string 0 to 255 - Authentication "psk"


mode characters. mode. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 905


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

psk string 0 to 255 - This field may "psk123"


characters. contain
sensitive or
personal data.
Keep it secure.
Pre-shared key
(PSK).

initiato string 0 to 255 - Interaction "bi-directional"


r characters. mode between
the VPN and
IPsec
connection.

admin string 0 to 255 - VPN "true"


_state_ characters. connection
up ● true administrative
● false status.

status string 0 to 255 - Connectivity "ACTIVE"


characters. status.

ikepoli string 0 to 36 - IKE policy ID. "00000000-000


cy_id characters. This field 0-0000-1234-0
cannot be 00000000010"
updated.

ipsecp string 0 to 36 - IPsec policy ID. "00000000-000


olicy_i characters. This field 0-0000-1234-0
d cannot be 00000000011"
updated.

vpnser string 0 to 36 - VPN service ID. "00000000-000


vice_id characters. This field 0-0000-1234-0
cannot be 00000000012"
updated.

dpd REFER For details, see Table DPD object. -


ENCE 1-701.

Table 1-701 DpdDto parameters

Param Type Value Range Defaul Description Example


eter t Value

action string 0 to 255 - DPD detection "hold"


characters. type.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 906


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

interva int32 [1-65535] - Interval for 60


l triggering DPD.

timeou int32 [1-65535] - Interval for 70


t retransmitting
DPD packets.
The value must
be greater than
the interval
value.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ipsec_site_connection" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IpSecConnection1",
"description" : "This is an IpsecConnection.",
"peer_address" : "192.168.1.1",
"peer_id" : "00000000-0000-0000-1111-000000000001",
"peer_cidrs" : ["192.168.2.0/24"],
"route_mode" : "static",
"mtu" : 100,
"auth_mode" : "psk",
"psk" : "psk123",
"initiator" : "bi-directional",
"admin_state_up" : "true",
"status" : "ACTIVE",
"ikepolicy_id" : "00000000-0000-0000-1234-000000000010",
"ipsecpolicy_id" : "00000000-0000-0000-1234-000000000011",
"vpnservice_id" : "00000000-0000-0000-1234-000000000012",
"dpd" : {
"action" : "hold",
"interval" : 60,
"timeout" : 70
}
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 907


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.17.2 Query All IPsec Site Connections

Typical Scenarios
All IPsec connections need to be queried.

Functions
Query all IPSec site connections.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/vpn/ipsec-site-connections

Table 1-702 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 908


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/ipsec-site-connections?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-703 IpsecConnectionQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipsec_s ARRAY 0-255 items. For details, List of IPSec -


ite_con _REFER see Table 1-700. site connection
nectio ENCE objects.
n

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ipsec_site_connection" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IpSecConnection1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 909


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"description" : "This is an IpsecConnection.",


"peer_address" : "192.168.1.1",
"peer_id" : "00000000-0000-0000-1111-000000000001",
"peer_cidrs" : ["192.168.2.0/24"],
"route_mode" : "static",
"mtu" : 100,
"auth_mode" : "psk",
"psk" : "psk123",
"initiator" : "bi-directional",
"admin_state_up" : "true",
"status" : "ACTIVE",
"ikepolicy_id" : "00000000-0000-0000-1234-000000000010",
"ipsecpolicy_id" : "00000000-0000-0000-1234-000000000011",
"vpnservice_id" : "00000000-0000-0000-1234-000000000012",
"dpd" : {
"action" : "hold",
"interval" : 60,
"timeout" : 70
}
}
],
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.17.3 Query an IPsec Site Connection by ID

Typical Scenarios
An IPsec site connection needs to be queried by ID.

Functions
Query an IPSec site connection.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 910


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/neutronapi/vpn/ipsec-site-connections/{id}

Table 1-704 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - IPsec site "00000000-000


connection ID. 0-0000-1234-0
00000000001"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/vpn/ipsec-site-connections/00000000-0000-0000-1234-000000000001
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
IpsecConnectionDtoWrapper parameters, For details, see Table 1-699.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ipsec_site_connection" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 911


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IpSecConnection1",
"description" : "This is an IpsecConnection.",
"peer_address" : "192.168.1.1",
"peer_id" : "00000000-0000-0000-1111-000000000001",
"peer_cidrs" : ["192.168.2.0/24"],
"route_mode" : "static",
"mtu" : 100,
"auth_mode" : "psk",
"psk" : "psk123",
"initiator" : "bi-directional",
"admin_state_up" : "true",
"status" : "ACTIVE",
"ikepolicy_id" : "00000000-0000-0000-1234-000000000010",
"ipsecpolicy_id" : "00000000-0000-0000-1234-000000000011",
"vpnservice_id" : "00000000-0000-0000-1234-000000000012",
"dpd" : {
"action" : "hold",
"interval" : 60,
"timeout" : 70
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.17.4 Update an IPsec Site Connection by ID

Typical Scenarios
An IPsec site connection needs to be updated by ID.

Functions
Update an IPSec site connection by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 912


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/vpn/ipsec-site-connections/{id}

Table 1-705 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - ID of a new "00000000-000


IPsec site. 0-0000-1234-0
00000000001"

Request Parameters

Table 1-706 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ipsecC Yes REFER For details, see IPsec site -


onnect ENCE Table 1-696. connection.
ionDto
Wrapp
er

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/vpn/ipsec-site-connections/00000000-0000-0000-1234-000000000001
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"ipsec_site_connection" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IpSecConnection1",
"description" : "This is an IpsecConnection.",
"peer_address" : "192.168.1.1",
"peer_id" : "00000000-0000-0000-1111-000000000001",
"peer_cidrs" : ["192.168.2.0/24"],
"route_mode" : "static",
"mtu" : 100,
"auth_mode" : "psk",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 913


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"psk" : "psk123",
"initiator" : "bi-directional",
"admin_state_up" : "true",
"status" : "ACTIVE",
"ikepolicy_id" : "00000000-0000-0000-1234-000000000010",
"ipsecpolicy_id" : "00000000-0000-0000-1234-000000000011",
"vpnservice_id" : "00000000-0000-0000-1234-000000000012",
"dpd" : {
"action" : "hold",
"interval" : 60,
"timeout" : 70
}
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
IpsecConnectionDtoWrapper parameters, For details, see Table 1-699.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"ipsec_site_connection" : {
"id" : "00000000-0000-0000-1234-000000000001",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"name" : "IpSecConnection1",
"description" : "This is an IpsecConnection.",
"peer_address" : "192.168.1.1",
"peer_id" : "00000000-0000-0000-1111-000000000001",
"peer_cidrs" : ["192.168.2.0/24"],
"route_mode" : "static",
"mtu" : 100,
"auth_mode" : "psk",
"psk" : "psk123",
"initiator" : "bi-directional",
"admin_state_up" : "true",
"status" : "ACTIVE",
"ikepolicy_id" : "00000000-0000-0000-1234-000000000010",
"ipsecpolicy_id" : "00000000-0000-0000-1234-000000000011",
"vpnservice_id" : "00000000-0000-0000-1234-000000000012",
"dpd" : {
"action" : "hold",
"interval" : 60,
"timeout" : 70
}
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 914


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.17.5 Delete an IPsec Site Connection by ID

Typical Scenarios
An IPsec site connection needs to be deleted by ID.

Functions
Delete an IPSec site connection by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/vpn/ipsec-site-connections/{id}

Table 1-707 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes uuid - - IPsec site "00000000-000


connection ID. 0-0000-1234-0
00000000001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 915


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/vpn/ipsec-site-connections/00000000-0000-0000-1234-000000000001
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.18 L2BR
# L2BR operation APIs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 916


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.5.18.1 Create L2BRs in Batches

Typical Scenarios
L2BRs need to be created in batches.

Functions
Create L2BRs in batches.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/l2brs/action/batch-create

Request Parameters

Table 1-708 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l2brBat Yes REFER For details, see L2BR list. -


chReq ENCE Table 1-709.
uest

Table 1-709 L2brBatchRequest parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

l2br Yes ARRAY 0-255 items. For L2BR list. -


_REFER details, see
ENCE Table 1-710.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 917


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-710 L2brDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - UUID. This field "00000000-000


cannot be 0-0000-1234-0
updated. 00000000001"

name No string 0 to - L2BR name. "l2br1"


255
charac
ters.

tenant Yes string 0 to 36 - Tenant ID. This "00000000-000


_id charac field cannot be 0-0000-
ters. updated. abce-00000000
0001"

device_ Yes REFER For details, see Device -


info ENCE Table 1-711. information.

service Yes REFER For details, see Service -


_info ENCE Table 1-712. information.

Table 1-711 L2BRDeviceInfoDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

interfa No string 0 to - Interface "10GE1/0/21"


ce_na 255 name.
me charac
ters.

device_ No string 0 to - Device name. "CE6850_37.12


name 255 Only one of "
charac the device
ters. name, device IP
address, and
device MAC
address can
and must be
set.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 918


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device_ No string 0 to - Device IP "10.6.54.60"


ip 255 address. Only
charac one of the
ters. device name,
device IP
address, and
device MAC
address can
and must be
set.

device_ No string 0 to - Device MAC "00:50:56:84:7D


mac 255 address. Only :91"
charac one of the
ters. device name,
device IP
address, and
device MAC
address can
and must be
set.

host No string 0 to - Host name. "192.168.62.1"


255
charac
ters.

Table 1-712 ServiceInfoDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ No string 0 to 36 - Network ID. "00000000-000


k_id charac Either vni or 0-0000-1234-0
ters. network must 00000000010"
be set.

vni No int32 [1-160 - VNI value. 15000


00000] Either vni or
network must
be set.

vlan_id Yes int32 [0-409 - VLAN ID. 16


4]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 919


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/l2brs/action/batch-create HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l2br" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
]
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-713 L2brBatchResponse parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

success ARRAY 0-255 items. For details, Success list. -


_REFER see Table 1-714.
ENCE

fail ARRAY 0-255 items. For details, List of failed -


_REFER see Table 1-717. issues.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 920


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-714 L2brDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id uuid - - UUID. This field "00000000-000


cannot be 0-0000-1234-0
updated. 00000000001"

name string 0 to 255 - L2BR name. "l2br1"


characters.

tenant string 0 to 36 - Tenant ID. This "00000000-000


_id characters. field cannot be 0-0000-
updated. abce-00000000
0001"

device_ REFER For details, see Table Device -


info ENCE 1-715. information.

service REFER For details, see Table Service -


_info ENCE 1-716. information.

Table 1-715 L2BRDeviceInfoDto parameters

Param Type Value Range Defaul Description Example


eter t Value

interfa string 0 to 255 - Interface "10GE1/0/21"


ce_na characters. name.
me

device_ string 0 to 255 - Device name. "CE6850_37.12


name characters. Only one of "
the device
name, device IP
address, and
device MAC
address can
and must be
set.

device_ string 0 to 255 - Device IP "10.6.54.60"


ip characters. address. Only
one of the
device name,
device IP
address, and
device MAC
address can
and must be
set.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 921


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device_ string 0 to 255 - Device MAC "00:50:56:84:7D


mac characters. address. Only :91"
one of the
device name,
device IP
address, and
device MAC
address can
and must be
set.

host string 0 to 255 - Host name. "192.168.62.1"


characters.

Table 1-716 ServiceInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

networ string 0 to 36 - Network ID. "00000000-000


k_id characters. Either vni or 0-0000-1234-0
network must 00000000010"
be set.

vni int32 [1-16000000] - VNI value. 15000


Either vni or
network must
be set.

vlan_id int32 [0-4094] - VLAN ID. 16

Table 1-717 L2brFailReason parameters


Param Type Value Range Defaul Description Example
eter t Value

id uuid - - L2BR ID. "00000000-000


0-0000-1234-0
00000000004"

error- REFER For details, see Table Error -


info ENCE 1-718. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 922


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-718 ExceptionInfo parameters

Param Type Value Range Defaul Description Example


eter t Value

error- string 0 to 36 - Error code. "0x00320026"


code characters.

error- string 0 to 1024 - Error message. "Invalid or


msg characters. unavaliable
format"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
L2brBatchResponse parameters, For details, see Table 1-713.
Response status code 500: Response status code 500: Internal server error.
L2brBatchResponse parameters, For details, see Table 1-713.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"success" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
],
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 923


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"success" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
],
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"success" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 924


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

1.9.5.18.2 Update L2BRs in Batches

Typical Scenarios
L2BRs need to be updated in batches.

Functions
Update L2BRs in batches.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/l2brs/action/batch-update

Request Parameters

Table 1-719 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l2brBat Yes REFER For details, see L2BR list. -


chReq ENCE Table 1-709.
uest

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/l2brs/action/batch-update HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 925


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l2br" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.
L2brBatchResponse parameters, For details, see Table 1-713.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
L2brBatchResponse parameters, For details, see Table 1-713.
Response status code 500: Response status code 500: Internal server error.
L2brBatchResponse parameters, For details, see Table 1-713.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"success" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 926


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
],
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"success" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
],
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"success" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 927


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
],
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

1.9.5.18.3 Delete L2BRs in Batches

Typical Scenarios
Delete L2BRs in Batches.

Functions
Delete L2BRs in batches.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/l2brs/action/batch-delete

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 928


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-720 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l2brBat Yes REFER For details, see L2BR key value -


chDele ENCE Table 1-721. list.
teRequ
est

Table 1-721 L2brBatchDeleteRequest parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l2br Yes ARRAY 0-255 items. For L2BR ID list. -


_REFER details, see
ENCE Table 1-722.

Table 1-722 L2brIdDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - uuid "00000000-000


0-0000-1234-0
00000000002"

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/l2brs/action/batch-delete HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"l2br" : [
{
"id" : "00000000-0000-0000-1234-000000000002"
}
]
}

Response Parameters
Response status code 204: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 929


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Table 1-723 L2brBatchFailResponse parameters


Param Type Value Range Defaul Description Example
eter t Value

fail ARRAY 0-255 items. For details, List of failed -


_REFER see Table 1-717. issues.
ENCE

Response status code 500: Response status code 500: Internal server error.
L2brBatchFailResponse parameters, For details, see Table 1-723.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 930


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

1.9.5.18.4 Create an L2BR

Typical Scenarios
An L2BR needs to be created.

Functions
Create an L2BR.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/l2brs

Request Parameters

Table 1-724 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l2brDt Yes REFER For details, see Parameters for -


oWrap ENCE Table 1-725. creating an
per L2BR.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 931


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-725 L2brDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

l2br Yes REFER For details, see L2BR object. -


ENCE Table 1-710.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/l2brs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l2br" : {
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-726 L2brDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 932


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

l2br REFER For details, see Table L2BR object. -


ENCE 1-714.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l2br" : {
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 933


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.5.18.5 Query All L2BRs

Typical Scenarios
All L2BRs need to be queried.

Functions
Query all L2BRs.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/l2brs

Table 1-727 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/l2brs?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 934


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-728 L2brQueryOutputDto parameters


Param Type Value Range Defaul Description Example
eter t Value

l2brs ARRAY 0-255 items. For details, L2BR list. -


_REFER see Table 1-714.
ENCE

numbe int32 [1-2147483647 - Number of 1


r ] query entries.

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
L2brBatchFailResponse parameters, For details, see Table 1-723.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"l2brs" : [
{
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 935


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
],
"number" : 1,
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"fail" : [
{
"id" : "00000000-0000-0000-1234-000000000004",
"error-info" : {
"error-code" : "0x00320026",
"error-msg" : "Invalid or unavaliable format"
}
}
]
}

1.9.5.18.6 Query an L2BR by ID

Typical Scenarios
An L2BR needs to be queried by ID.

Functions
Query an L2BR by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/l2brs/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 936


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-729 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - L2BR ID. "00000000-000


0-0000-1234-0
00000000001"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/l2brs/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
L2brDtoWrapper parameters, For details, see Table 1-726.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l2br" : {
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 937


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.18.7 Update an L2BR by ID

Typical Scenarios
An L2BR policy needs to be updated by name.

Functions
Update an L2BR by name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/l2brs/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 938


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-730 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - L2BR ID. "00000000-000


0-0000-1234-0
00000000001"

Request Parameters

Table 1-731 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l2brDt Yes REFER For details, see L2BR. -


oWrap ENCE Table 1-725.
per

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/l2brs/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l2br" : {
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
L2brDtoWrapper parameters, For details, see Table 1-726.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 939


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l2br" : {
"id" : "00000000-0000-0000-1234-000000000001",
"name" : "l2br1",
"tenant_id" : "00000000-0000-0000-abce-000000000001",
"device_info" : {
"interface_name" : "10GE1/0/21",
"device_name" : "CE6850_37.12",
"device_ip" : "10.6.54.60",
"device_mac" : "00:50:56:84:7D:91",
"host" : "192.168.62.1"
},
"service_info" : {
"network_id" : "00000000-0000-0000-1234-000000000010",
"vni" : 15000,
"vlan_id" : 16
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.18.8 Delete an L2BR by ID

Typical Scenarios
An L2BR needs to be deleted by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 940


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Delete an L2BR by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/l2brs/{id}

Table 1-732 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - L2BR ID. "00000000-000


0-0000-1234-0
00000000001"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/l2brs/00000000-0000-0000-1234-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 941


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.19 VpcConnection
# VPC connection operation APIs

1.9.5.19.1 Create a VPC Communication Instance

Typical Scenarios
A VPC connection needs to be created.

Functions
Create a VPC connection.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 942


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/servicenetwork/vpc-connects

Request Parameters

Table 1-733 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vpccon Yes REFER For details, see Input -


nect ENCE Table 1-734. parameter for
creating a VPC
communication
instance.

Table 1-734 VpcConnectDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vpc- Yes ARRAY For details, see VPC connection -


connec _REFER Table 1-735. instance.
t ENCE

totalN No int32 - - Total number 100


um of results.

Table 1-735 VpcConnectDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

name Yes string 1 to - VPC connection "vpc001"


255 name.
charac
ters.

descrip No string 0 to - VPC connection "This is vpc"


tion 255 description.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 943


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

localLo Yes UUID 1 to - Source VPC ID. "a915f8c1-


gicRou 255 d06f-46cd-
terId charac a968-38328e0a
ters. b2d3"

localLo No string 1 to - Source VPC "vpc002"


gicRou 255 name.
terNa charac
me ters.

localLo No UUID 0 to - Logical firewall "a915f8c1-


gicVasI 255 ID of the d06f-46cd-
d charac source VPC. a968-38328e0a
ters. This parameter b2d3"
is optional. If
localFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the source
VPC.

localLo No string 1 to - Logical firewall "vas002"


gicVas 255 name of the
Name charac source VPC.
ters.

localCr No ARRAY For details, see Local -


ossLink _REFER Table 1-736. interconnection
ENCE link
information.

localIn No ARRAY For details, see Local internal -


ternalL _REFER Table 1-737. link
ink ENCE information.

localCi No array< - - Source network -


drs string> segment list.
The value is a
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 944


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peerLo Yes UUID 1 to - ID of the "a915f8c1-


gicRou 255 destination d06f-46cd-
terId charac VPC. a968-38328e0a
ters. b2d3"

peerLo No string 1 to - Name of the "router002"


gicRou 255 destination
terNa charac VPC.
me ters.

peerLo No UUID 1 to - Logical firewall "a915f8c1-


gicVasI 250 ID of the d06f-46cd-
d charac destination a968-38328e0a
ters. VPC. This b2d3"
parameter is
optional. If
peerFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the
destination
VPC.

peerLo No string 1 to - Name of the "vas003"


gicVas 255 logical firewall
Name charac for the
ters. destination
VPC.

peerCr No ARRAY For details, see Peer -


ossLink _REFER Table 1-736. interconnection
ENCE link
information.

peerInt No ARRAY For details, see Peer internal -


ernalLi _REFER Table 1-737. link
nk ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 945


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peerCi No array< - - List of -


drs string> destination
network
segments. The
value is a
string.

tenantI No UUID 0 to - Tenant ID. "DBB702C3-77


d 255 19-4FE6-
charac A5AD-3A9C9E2
ters. 6530"

tenant No string 1 to - Name of the "tenant1"


Name 255 tenant to
charac which the local
ters. router belongs.

peerTe No UUID 0 to - Tenant to "a915f8c1-


nantId 255 which the peer d06f-46cd-
charac router belongs. a968-38328e0a
ters. b2d3"

peerTe No string 1 to - Name of the "tenant1"


nantN 255 tenant to
ame charac which the peer
ters. router belongs.

additio No REFER For details, see - -


nal ENCE Table 1-738.

localFir No boolea - false Whether the false


ewallE n firewall is
nable enabled on the
source VPC. It
is disabled by
default.

peerFir No boolea - false Whether the true


ewallE n destination
nable VPC is
protected by a
firewall. By
default, this
function is
disabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 946


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

isLocal No boolea - false Whether to false


All n enable
dynamic
routing on the
local end in the
MDC scenario.

isPeer No boolea - false Whether to true


All n enable
dynamic
routing on the
peer end in the
MDC scenario.

priority No int32 - - Priority of a 60


static route.

localPr No int32 - - Local 50


eferenc preference of
e BGP routes in a
routing policy.

dciGat No array< 0-2147 - DCI gateway -


ewayId string> 48364 device group
s 7 ID.
items.

connec No string 0 to - Route target "1:3,65537:3,0.


tRt 255 for VPC 0:3,192.168.122
charac communication .15:1."
ters. .

srcGw No array< 0-2147 - ID list of source -


DeviceI string> 48364 egress
ds 7 gateways for
items. VPC
communication
.

dstGw No array< 0-2147 - ID list of -


DeviceI string> 48364 destination
ds 7 egress
items. gateways for
VPC
communication
.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 947


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

localR No string 1 to - Type of the "LogicRouter/


outerT 255 local router. ExternalTransit
ype charac Router/
ters. ExternalGatew
ay"

peerRo No string 1 to - Type of the "LogicRouter/


uterTy 255 peer router. ExternalTransit
pe charac Router/
ters. ExternalGatew
ay"

isAssoc No boolea - true Whether to true


iatedV n modify the VPC
pcCon interworking
nPolicy policy.

Table 1-736 CrossLinkParam parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routerI No string 0 to - Interconnection "10.1.1.1"


p 255 IP address on a
charac router.
ters.

vasIp No string 0 to - Interconnection "10.1.1.1"


255 IP address on
charac the logical VAS
ters. device.

vlan No string 0 to 64 - Interconnection "100"


charac VLAN.
ters.

routerI No string 0 to - IPv6 "FE80:0000:000


pv6 255 interconnection 0:0000:0000:00
charac address on a 44:0000:0032"
ters. router.

vasIpv No string 0 to - IPv6 "FE80:0000:000


6 255 interconnection 0:0000:0000:00
charac address on a 44:0000:0032"
ters. VAS device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 948


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI No string 0 to 36 - Unique ID of a "DBB702C3-77


d charac fabric. 19-4FE6-4488-
ters. 3A9C9E265322
"

Table 1-737 InternalLinkParam parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routerI No string 0 to - IP address of "10.1.1.1"


p 255 the router.
charac
ters.

vasIp No string 0 to - IP address of "10.1.1.1"


255 the logical VAS
charac device.
ters.

vlan No string 0 to 64 - VLAN. "100"


charac
ters.

routerI No string 0 to - IPv6 address of "FE80:0000:000


pv6 255 the router. 0:0000:0000:00
charac 44:0000:0032"
ters.

vasIpv No string 0 to - IPv6 address of "FE80:0000:000


6 255 the logical VAS 0:0000:0000:00
charac device. 44:0000:0032"
ters.

Table 1-738 AdditionalDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

create No string 0 to - Creation time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 949


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

update No string 0 to - Update time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/vpc-connects HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 950


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 951


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.19.2 Query VPC Connections

Typical Scenarios
Use this API to query the VPC communication instance list.

Functions
This API is used to query the VPC communication instance list based on the
producer or the tenant ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vpc-connects

Table 1-739 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

isTrans No boolea - false Whether to -


it n query all
transit VPC
connections.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 952


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenantI No UUID - - ID of the "a915f8c1-


d tenant to d06f-46cd-
which the SFC a968-38328e0a
template b2d3"
belongs.

pageIn No string - - Page index. "1"


dex

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vpc-connects?producer=CloudPlatform1&tenantId=a915f8c1-
d06f-46cd-a968-38328e0ab2d3&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-740 VpcConnectDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

vpc- ARRAY For details, see Table VPC connection -


connec _REFER 1-741. instance.
t ENCE

totalN int32 - - Total number 100


um of results.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 953


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-741 VpcConnectDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

name string 1 to 255 - VPC connection "vpc001"


characters. name.

descrip string 0 to 255 - VPC connection "This is vpc"


tion characters. description.

localLo UUID 1 to 255 - Source VPC ID. "a915f8c1-


gicRou characters. d06f-46cd-
terId a968-38328e0a
b2d3"

localLo string 1 to 255 - Source VPC "vpc002"


gicRou characters. name.
terNa
me

localLo UUID 0 to 255 - Logical firewall "a915f8c1-


gicVasI characters. ID of the d06f-46cd-
d source VPC. a968-38328e0a
This parameter b2d3"
is optional. If
localFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the source
VPC.

localLo string 1 to 255 - Logical firewall "vas002"


gicVas characters. name of the
Name source VPC.

localCr ARRAY For details, see Table Local -


ossLink _REFER 1-742. interconnection
ENCE link
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 954


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

localIn ARRAY For details, see Table Local internal -


ternalL _REFER 1-743. link
ink ENCE information.

localCi array< - - Source network -


drs string> segment list.
The value is a
string.

peerLo UUID 1 to 255 - ID of the "a915f8c1-


gicRou characters. destination d06f-46cd-
terId VPC. a968-38328e0a
b2d3"

peerLo string 1 to 255 - Name of the "router002"


gicRou characters. destination
terNa VPC.
me

peerLo UUID 1 to 250 - Logical firewall "a915f8c1-


gicVasI characters. ID of the d06f-46cd-
d destination a968-38328e0a
VPC. This b2d3"
parameter is
optional. If
peerFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the
destination
VPC.

peerLo string 1 to 255 - Name of the "vas003"


gicVas characters. logical firewall
Name for the
destination
VPC.

peerCr ARRAY For details, see Table Peer -


ossLink _REFER 1-742. interconnection
ENCE link
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 955


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peerInt ARRAY For details, see Table Peer internal -


ernalLi _REFER 1-743. link
nk ENCE information.

peerCi array< - - List of -


drs string> destination
network
segments. The
value is a
string.

tenantI UUID 0 to 255 - Tenant ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
6530"

tenant string 1 to 255 - Name of the "tenant1"


Name characters. tenant to
which the local
router belongs.

peerTe UUID 0 to 255 - Tenant to "a915f8c1-


nantId characters. which the peer d06f-46cd-
router belongs. a968-38328e0a
b2d3"

peerTe string 1 to 255 - Name of the "tenant1"


nantN characters. tenant to
ame which the peer
router belongs.

additio REFER For details, see Table - -


nal ENCE 1-744.

localFir boolea - false Whether the false


ewallE n firewall is
nable enabled on the
source VPC. It
is disabled by
default.

peerFir boolea - false Whether the true


ewallE n destination
nable VPC is
protected by a
firewall. By
default, this
function is
disabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 956


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

isLocal boolea - false Whether to false


All n enable
dynamic
routing on the
local end in the
MDC scenario.

isPeer boolea - false Whether to true


All n enable
dynamic
routing on the
peer end in the
MDC scenario.

priority int32 - - Priority of a 60


static route.

localPr int32 - - Local 50


eferenc preference of
e BGP routes in a
routing policy.

dciGat array< 0-2147483647 - DCI gateway -


ewayId string> items. device group
s ID.

connec string 0 to 255 - Route target "1:3,65537:3,0.


tRt characters. for VPC 0:3,192.168.122
communication .15:1."
.

srcGw array< 0-2147483647 - ID list of source -


DeviceI string> items. egress
ds gateways for
VPC
communication
.

dstGw array< 0-2147483647 - ID list of -


DeviceI string> items. destination
ds egress
gateways for
VPC
communication
.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 957


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

localR string 1 to 255 - Type of the "LogicRouter/


outerT characters. local router. ExternalTransit
ype Router/
ExternalGatew
ay"

peerRo string 1 to 255 - Type of the "LogicRouter/


uterTy characters. peer router. ExternalTransit
pe Router/
ExternalGatew
ay"

isAssoc boolea - true Whether to true


iatedV n modify the VPC
pcCon interworking
nPolicy policy.

Table 1-742 CrossLinkParam parameters


Param Type Value Range Defaul Description Example
eter t Value

routerI string 0 to 255 - Interconnection "10.1.1.1"


p characters. IP address on a
router.

vasIp string 0 to 255 - Interconnection "10.1.1.1"


characters. IP address on
the logical VAS
device.

vlan string 0 to 64 - Interconnection "100"


characters. VLAN.

routerI string 0 to 255 - IPv6 "FE80:0000:000


pv6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032"
router.

vasIpv string 0 to 255 - IPv6 "FE80:0000:000


6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032"
VAS device.

fabricI string 0 to 36 - Unique ID of a "DBB702C3-77


d characters. fabric. 19-4FE6-4488-
3A9C9E265322
"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 958


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-743 InternalLinkParam parameters

Param Type Value Range Defaul Description Example


eter t Value

routerI string 0 to 255 - IP address of "10.1.1.1"


p characters. the router.

vasIp string 0 to 255 - IP address of "10.1.1.1"


characters. the logical VAS
device.

vlan string 0 to 64 - VLAN. "100"


characters.

routerI string 0 to 255 - IPv6 address of "FE80:0000:000


pv6 characters. the router. 0:0000:0000:00
44:0000:0032"

vasIpv string 0 to 255 - IPv6 address of "FE80:0000:000


6 characters. the logical VAS 0:0000:0000:00
device. 44:0000:0032"

Table 1-744 AdditionalDto parameters

Param Type Value Range Defaul Description Example


eter t Value

produc string 0 to 36 - Parameters for "CloudPlatform


er characters. configuring a 1"
condition.

create string 0 to 255 - Creation time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

update string 0 to 255 - Update time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 959


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 960


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.19.3 Query a VPC Communication Instance

Typical Scenarios
Use this API to query a VPC communication instance.

Functions
Query a VPC connection by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 961


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-745 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

Request Parameters

Table 1-746 header parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dtId No string 0 to - distribution "G2021110115


256 transaction ID. 2812691_b34d
charac 98a-57f9-49b2
ters. -910c-010bcfcc
97bcd"

N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/a915f8c1-d06f-46cd-a968-38328e0ab2d3
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20211101152812691_b34d98a-57f9-49b2-910c-010bcfcc97bcd"

Response Parameters
Response status code 200: successfully

VpcConnectDtoWrapper parameters, For details, see Table 1-740.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 962


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 963


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.19.4 Update a VPC Communication Instance

Typical Scenarios
A VPC connection needs to be updated by ID.

Functions
Update a VPC connection by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
PUT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 964


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/{id}

Table 1-747 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

Request Parameters

Table 1-748 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpccon Yes REFER For details, see Input -


nect ENCE Table 1-734. parameter for
creating a VPC
communication
instance.

Sample Request
HTTP
PUT /controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/a915f8c1-d06f-46cd-a968-38328e0ab2d3
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 965


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 966


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response Parameters
Response status code 200: successfully
VpcConnectDtoWrapper parameters, For details, see Table 1-740.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 967


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.19.5 Delete a VPC Communication Instance

Typical Scenarios
A VPC connection needs to be deleted by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 968


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Delete a VPC connection by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/{id}

Table 1-749 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

Table 1-750 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string - - Provider. "Agile-


er Controller-
MDC"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/a915f8c1-d06f-46cd-
a968-38328e0ab2d3?producer=Agile-Controller-MDC HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 969


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.20 L2 DC/POD Interconnection


# Layer 2 DC/POD interconnection operation APIs

1.9.5.20.1 Create a Layer 2 DC/POD Interconnection Instance

Typical Scenarios
Create a Layer 2 DC/POD Interconnection Instance.

Functions
Create a Layer 2 DC/POD interconnection instance.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 970


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/neutronapi/v2.0/l2-dci-connects

Request Parameters

Table 1-751 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dciL2C Yes REFER For details, see Parameters for -


onnect ENCE Table 1-752. creating a
DtoWr Layer 2
apper DC/POD
interconnection
instance.

Table 1-752 DciL2ConnectDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

service No string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

l2-dci- Yes REFER For details, see Layer 2 DCI -


connec ENCE Table 1-753. connection
t object.

Table 1-753 DciL2Dto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Layer 2 DCI "DBB702C3-77


256 instance ID. 19-4FE6-
charac This field A5AD-3A9C9E2
ters. cannot be 65309"
updated.

name Yes string 0 to - Layer 2 DCI "nameofDciL2"


255 instance name.
charac This field
ters. cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 971


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

descrip No string 0 to - Layer 2 DCI "L2 Dci object


tion 1024 instance description"
charac description.
ters.

networ Yes string 0 to - Local logical "DBB702C3-77


k_id 256 switch. This 19-4FE6-
charac field cannot be A5AD-3A9C9E2
ters. updated. 65310"

vni Yes int32 [1-160 - Layer 2 100


00000] DC/POD
interconnection
mapping VNI.

export Yes array< 0-255 - Export RT of ["1:1"]


_rts string> items. the EVPN for
Each Layer 2
item DC/POD
has 0 interconnection
to 255 .
charac
ters.

import Yes array< 0-255 - Import RT of ["1:1"]


_rts string> items. the EVPN for
Each Layer 2
item DC/POD
has 0 interconnection
to 255 .
charac
ters.

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/v2.0/l2-dci-connects HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l2-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL2",
"description" : "L2 Dci object description",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"vni" : 100,
"export_rts" : ["1:1"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 972


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"import_rts" : ["1:1"]
}
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-754 DciL2ConnectDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

l2-dci- REFER For details, see Table Layer 2 DCI -


connec ENCE 1-755. connection
t object.

Table 1-755 DciL2Dto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Layer 2 DCI "DBB702C3-77


characters. instance ID. 19-4FE6-
This field A5AD-3A9C9E2
cannot be 65309"
updated.

name string 0 to 255 - Layer 2 DCI "nameofDciL2"


characters. instance name.
This field
cannot be
updated.

descrip string 0 to 1024 - Layer 2 DCI "L2 Dci object


tion characters. instance description"
description.

networ string 0 to 256 - Local logical "DBB702C3-77


k_id characters. switch. This 19-4FE6-
field cannot be A5AD-3A9C9E2
updated. 65310"

vni int32 [1-16000000] - Layer 2 100


DC/POD
interconnection
mapping VNI.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 973


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

export array< 0-255 items. - Export RT of ["1:1"]


_rts string> Each item has 0 the EVPN for
to 255 Layer 2
characters. DC/POD
interconnection
.

import array< 0-255 items. - Import RT of ["1:1"]


_rts string> Each item has 0 the EVPN for
to 255 Layer 2
characters. DC/POD
interconnection
.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l2-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL2",
"description" : "L2 Dci object description",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"vni" : 100,
"export_rts" : ["1:1"],
"import_rts" : ["1:1"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 974


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.20.2 L2 DC/POD Interconnection

Typical Scenarios
All Layer 2 DC/POD interconnection instances need to be queried.

Functions
Query all Layer 2 DC/POD interconnection instances.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/v2.0/l2-dci-connects

Table 1-756 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 975


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v2/neutronapi/v2.0/l2-dci-connects?pageIndex=1&pageSize=10 HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-757 DciL2QueryOutputDto parameters

Param Type Value Range Defaul Description Example


eter t Value

l2-dci- ARRAY 0-255 items. For details, Layer 2 DCI -


connec _REFER see Table 1-755. connection
ts ENCE object.

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"l2-dci-connects" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL2",
"description" : "L2 Dci object description",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"vni" : 100,
"export_rts" : ["1:1"],
"import_rts" : ["1:1"]
}
],
"service_name" : "physnet1"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 976


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.20.3 Query a Layer 2 DC/POD Interconnection Instance by ID

Typical Scenarios
A Layer 2 DC/POD interconnection instance needs to be queried by ID.

Functions
Query a Layer 2 DC/POD interconnection instance.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/v2.0/l2-dci-connects/{id}

Table 1-758 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Parameters for "DBB702C3-77


256 querying a 19-4FE6-
charac Layer 2 A5AD-3A9C9E2
ters. DC/POD 60001"
interconnection
instance.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 977


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/v2.0/l2-dci-connects/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.
DciL2ConnectDtoWrapper parameters, For details, see Table 1-754.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l2-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL2",
"description" : "L2 Dci object description",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"vni" : 100,
"export_rts" : ["1:1"],
"import_rts" : ["1:1"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 978


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.20.4 Update a Layer 2 DC/POD Interconnection Instance

Typical Scenarios
A Layer 2 DC/POD interconnection instance needs to be updated.

Functions
Update a Layer 2 DC/POD interconnection instance.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/v2.0/l2-dci-connects/{id}

Table 1-759 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 a Layer 2 19-4FE6-
charac DC/POD A5AD-3A9C9E2
ters. interconnection 60001"
instance.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 979


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-760 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router Yes REFER For details, see Parameters for -


DtoWr ENCE Table 1-752. updating a
apper Layer 2
DC/POD
interconnection
instance.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/v2.0/l2-dci-connects/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l2-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL2",
"description" : "L2 Dci object description",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"vni" : 100,
"export_rts" : ["1:1"],
"import_rts" : ["1:1"]
}
}

Response Parameters
Response status code 200: Response status code 201: OK.

DciL2ConnectDtoWrapper parameters, For details, see Table 1-754.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 980


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l2-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL2",
"description" : "L2 Dci object description",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"vni" : 100,
"export_rts" : ["1:1"],
"import_rts" : ["1:1"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.20.5 Delete a Router DCI

Typical Scenarios
A Layer 2 DC/POD interconnection instance needs to be deleted.

Functions
Delete a Layer 2 DC/POD interconnection instance.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/v2.0/l2-dci-connects/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 981


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-761 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Parameters for "DBB702C3-77


256 deleting a 19-4FE6-
charac Layer 2 A5AD-3A9C9E2
ters. DC/POD 60001"
interconnection
instance.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/v2.0/l2-dci-connects/DBB702C3-7719-4FE6-A5AD-3A9C9E260001
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 982


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.21 DCI L3

1.9.5.21.1 L3 DC/POD Interconnection


# Layer 3 DC/POD interconnection operation APIs

Create a Layer 3 DC/POD Interconnection Instance

Typical Scenarios
A Layer 3 DC/POD interconnection instance needs to be created.

Functions
Create a Layer 3 DC/POD interconnection instance.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/v2.0/l3-dci-connects

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 983


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-762 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-763. creating a
Layer 3
DC/POD
interconnection
instance.

Table 1-763 DciL3ConnectDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service No string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

l3-dci- Yes REFER For details, see Layer 3 DCI -


connec ENCE Table 1-764. object.
t

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 984


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-764 DciL3Dto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - L3DCI ID. This "DBB702C3-77


charac field cannot be 19-4FE6-
ters. updated. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 0 to - L3DCI name. "nameofDciL3"


255 This field
charac cannot be
ters. updated.

descrip No string 0 to - L3DCI "L3 Dci object


tion 1024 description. description"
charac
ters.

router_ Yes string 0 to 36 - Local logical "DBB702C3-77


id charac router ID. This 19-4FE6-
ters. field cannot be A5AD-3A9C9E2
updated. 65310"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 985


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fw_ena Yes boolea - - Whether to false


ble n enable the
firewall. This
field cannot be
updated.

logic_f No string 0 to 36 - Logical firewall "DBB702C3-77


w_id charac bound to a 19-4FE6-
ters. logical router A5AD-3A9C9E2
for DCI. 65311"

local_s Yes array< 0-255 - List of subnets ["DBB702C3-7


ubnets string> items. that can be 719-4FE6-
interconnected A5AD-3A9C9E2
across DCs on 55300"]
the local
router.

peer_ci No array< 0-255 - Remote CIDRs ["10.1.0.0/16"]


drs string> items. that can be
accessed across
DCs. This
parameter is
available only
when the
firewall is
enabled.

import Yes array< 0-255 - Import RT of ["1:1"]


_rts string> items. the BGP EVPN
for L3DCI.

export Yes array< 0-255 - Export RT of ["1:1"]


_rts string> items. the BGP EVPN
for L3DCI.

data_ No int32 [0-255 - Packet 1


mode ] encapsulation
type. The value
1 indicates
VXLAN, and
the value 2
indicates MPLS.
The packet
encapsulation
type can be
extended.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 986


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l3_vni No int32 [1-160 - L3VNI for DCI. 1


00000]

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/v2.0/l3-dci-connects HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l3-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL3",
"description" : "L3 Dci object description",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"fw_enable" : false,
"logic_fw_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"local_subnets" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E255300"],
"peer_cidrs" : ["10.1.0.0/16"],
"import_rts" : ["1:1"],
"export_rts" : ["1:1"],
"data_mode" : 1,
"l3_vni" : 1
}
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-765 DciL3ConnectDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

l3-dci- REFER For details, see Table Layer 3 DCI -


connec ENCE 1-766. object.
t

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 987


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-766 DciL3Dto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - L3DCI ID. This "DBB702C3-77


The value must field cannot be 19-4FE6-
meet the updated. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - L3DCI name. "nameofDciL3"


characters. This field
cannot be
updated.

descrip string 0 to 1024 - L3DCI "L3 Dci object


tion characters. description. description"

router_ string 0 to 36 - Local logical "DBB702C3-77


id characters. router ID. This 19-4FE6-
field cannot be A5AD-3A9C9E2
updated. 65310"

fw_ena boolea - - Whether to false


ble n enable the
firewall. This
field cannot be
updated.

logic_f string 0 to 36 - Logical firewall "DBB702C3-77


w_id characters. bound to a 19-4FE6-
logical router A5AD-3A9C9E2
for DCI. 65311"

local_s array< 0-255 items. - List of subnets ["DBB702C3-7


ubnets string> that can be 719-4FE6-
interconnected A5AD-3A9C9E2
across DCs on 55300"]
the local
router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 988


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peer_ci array< 0-255 items. - Remote CIDRs ["10.1.0.0/16"]


drs string> that can be
accessed across
DCs. This
parameter is
available only
when the
firewall is
enabled.

import array< 0-255 items. - Import RT of ["1:1"]


_rts string> the BGP EVPN
for L3DCI.

export array< 0-255 items. - Export RT of ["1:1"]


_rts string> the BGP EVPN
for L3DCI.

data_ int32 [0-255] - Packet 1


mode encapsulation
type. The value
1 indicates
VXLAN, and
the value 2
indicates MPLS.
The packet
encapsulation
type can be
extended.

l3_vni int32 [1-16000000] - L3VNI for DCI. 1

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 989


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"service_name" : "physnet1",
"l3-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL3",
"description" : "L3 Dci object description",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"fw_enable" : false,
"logic_fw_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"local_subnets" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E255300"],
"peer_cidrs" : ["10.1.0.0/16"],
"import_rts" : ["1:1"],
"export_rts" : ["1:1"],
"data_mode" : 1,
"l3_vni" : 1
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

L3 DC/POD Interconnection

Typical Scenarios
All Layer 3 DC/POD interconnection instances need to be queried.

Functions
Query all Layer 3 DC/POD interconnection instances.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/v2.0/l3-dci-connects

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 990


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-767 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/v2.0/l3-dci-connects?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-768 DciL3QueryOutputDto parameters

Param Type Value Range Defaul Description Example


eter t Value

l3-dci- ARRAY 0-255 items. For details, List of Layer 3 -


connec _REFER see Table 1-766. DCI objects.
ts ENCE

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 991


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"l3-dci-connects" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL3",
"description" : "L3 Dci object description",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"fw_enable" : false,
"logic_fw_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"local_subnets" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E255300"],
"peer_cidrs" : ["10.1.0.0/16"],
"import_rts" : ["1:1"],
"export_rts" : ["1:1"],
"data_mode" : 1,
"l3_vni" : 1
}
],
"service_name" : "physnet1"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Query a Layer 3 DC/POD Interconnection Instance by ID

Typical Scenarios
A Layer 3 DC/POD interconnection instance needs to be queried by ID.

Functions
Query a Layer 3 DC/POD interconnection instance by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 992


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/neutronapi/v2.0/l3-dci-connects/{id}

Table 1-769 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Parameters for "DBB702C3-77


charac querying a 19-4FE6-
ters. Layer 3 A5AD-3A9C9E2
The DC/POD 60001"
value interconnection
must instance.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 993


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v2/neutronapi/v2.0/l3-dci-connects/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/


1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
DciL3ConnectDtoWrapper parameters, For details, see Table 1-765.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l3-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL3",
"description" : "L3 Dci object description",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"fw_enable" : false,
"logic_fw_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"local_subnets" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E255300"],
"peer_cidrs" : ["10.1.0.0/16"],
"import_rts" : ["1:1"],
"export_rts" : ["1:1"],
"data_mode" : 1,
"l3_vni" : 1
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 994


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Update a Layer 3 DC/POD Interconnection Instance by ID

Typical Scenarios
A Layer 3 DC/POD interconnection instance needs to be updated by ID.

Functions
Update a Layer 3 DC/POD interconnection instance by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/v2.0/l3-dci-connects/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 995


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-770 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Parameters for "DBB702C3-77


charac updating a 19-4FE6-
ters. Layer 3 A5AD-3A9C9E2
The DC/POD 60001"
value interconnection
must instance.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-771 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router Yes REFER For details, see Parameters for -


DtoWr ENCE Table 1-763. updating a
apper Layer 3
DC/POD
interconnection
instance.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 996


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/v2.0/l3-dci-connects/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l3-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL3",
"description" : "L3 Dci object description",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"fw_enable" : false,
"logic_fw_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"local_subnets" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E255300"],
"peer_cidrs" : ["10.1.0.0/16"],
"import_rts" : ["1:1"],
"export_rts" : ["1:1"],
"data_mode" : 1,
"l3_vni" : 1
}
}

Response Parameters
Response status code 200: Response status code 200: OK.
DciL3ConnectDtoWrapper parameters, For details, see Table 1-765.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l3-dci-connect" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "nameofDciL3",
"description" : "L3 Dci object description",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310",
"fw_enable" : false,
"logic_fw_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"local_subnets" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E255300"],
"peer_cidrs" : ["10.1.0.0/16"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 997


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"import_rts" : ["1:1"],
"export_rts" : ["1:1"],
"data_mode" : 1,
"l3_vni" : 1
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Delete a Router DCI

Typical Scenarios
A Layer 3 DC/POD interconnection instance needs to be deleted by ID.

Functions
Delete a Layer 3 DC/POD interconnection instance by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/neutronapi/v2.0/l3-dci-connects/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 998


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-772 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Parameters for "DBB702C3-77


charac deleting a 19-4FE6-
ters. Layer 3 A5AD-3A9C9E2
The DC/POD 60001"
value interconnection
must instance.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/neutronapi/v2.0/l3-dci-connects/DBB702C3-7719-4FE6-A5AD-3A9C9E260001
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 999


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.21.2 L3Dci Subnet


# Operation API for adding a L3DCI subnet

Create an L3DCI Subnet

Typical Scenarios
An L3DCI subnet needs to be created.

Functions
Create an L3DCI subnet.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/v2.0/l3-add-dci-subnet

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1000


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-773 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dciL3A Yes REFER For details, see Parameters for -


ddSub ENCE Table 1-774. creating an
netDto L3DCI subnet.
Wrapp
er

Table 1-774 DciL3AddSubnetDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service No string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

l3- Yes REFER For details, see - -


add- ENCE Table 1-775.
dci-
subnet

Table 1-775 DciL3AddSubnetDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - L3DCI instance "DBB702C3-77


ID. 19-4FE6-
A5AD-3A9C9E2
65308"

router_ Yes uuid - - Local logical "DBB702C3-77


id router. 19-4FE6-
A5AD-3A9C9E2
65309"

subnet Yes uuid - - Local "DBB702C3-77


_id interconnection 19-4FE6-
subnet ID to be A5AD-3A9C9E2
added. 65310"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1001


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/v2.0/l3-add-dci-subnet HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l3-add-dci-subnet" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265308",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310"
}
}

Response Parameters
Response status code 201: Response status code 204: OK.

Table 1-776 DciL3AddSubnetDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

l3- REFER For details, see Table - -


add- ENCE 1-777.
dci-
subnet

Table 1-777 DciL3AddSubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id uuid - - L3DCI instance "DBB702C3-77


ID. 19-4FE6-
A5AD-3A9C9E2
65308"

router_ uuid - - Local logical "DBB702C3-77


id router. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1002


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

subnet uuid - - Local "DBB702C3-77


_id interconnection 19-4FE6-
subnet ID to be A5AD-3A9C9E2
added. 65310"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 204: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l3-add-dci-subnet" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265308",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.21.3 Delete L3 Dci Subnet


# L3DCI subnet deletion API

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1003


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Delete an L3DCI Subnet

Typical Scenarios
An L3DCI subnet needs to be deleted.

Functions
Delete an L3DCI subnet.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/neutronapi/v2.0/l3-del-dci-subnet

Request Parameters

Table 1-778 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dciL3D Yes REFER For details, see Parameters for -


elSubn ENCE Table 1-779. deleting an
etDto L3DCI subnet.
Wrapp
er

Table 1-779 DciL3DelSubnetDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

service No string 0 to - Cloud platform "physnet1"


_name 255 name.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1004


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l3-del- Yes REFER For details, see - -


dci- ENCE Table 1-780.
subnet

Table 1-780 DciL3DelSubnetDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes uuid - - L3DCI instance "DBB702C3-77


ID. 19-4FE6-
A5AD-3A9C9E2
65308"

router_ Yes uuid - - Local logical "DBB702C3-77


id router. 19-4FE6-
A5AD-3A9C9E2
65309"

subnet Yes uuid - - Local "DBB702C3-77


_id interconnection 19-4FE6-
subnet ID to be A5AD-3A9C9E2
added. 65310"

Sample Request
HTTP
POST /controller/dc/v2/neutronapi/v2.0/l3-del-dci-subnet HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service_name" : "physnet1",
"l3-del-dci-subnet" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265308",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310"
}
}

Response Parameters
Response status code 201: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1005


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-781 DciL3DelSubnetDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service string 0 to 255 - Cloud platform "physnet1"


_name characters. name.

l3-del- REFER For details, see Table - -


dci- ENCE 1-782.
subnet

Table 1-782 DciL3DelSubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id uuid - - L3DCI instance "DBB702C3-77


ID. 19-4FE6-
A5AD-3A9C9E2
65308"

router_ uuid - - Local logical "DBB702C3-77


id router. 19-4FE6-
A5AD-3A9C9E2
65309"

subnet uuid - - Local "DBB702C3-77


_id interconnection 19-4FE6-
subnet ID to be A5AD-3A9C9E2
added. 65310"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service_name" : "physnet1",
"l3-del-dci-subnet" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1006


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265308",
"router_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265310"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.22 Heartbeat Connectivity of the Cloud Platform


# Interface SLA
| Feature | Indicator |
|---|---|
| Interface | Query interface SLA |
| Request success rate | ≥ 99% |
| Availability | Tier1 |
| Consistency | Strong consistency |
| Throughput | 200 TPS |
| TP50 request delay | 50 ms |
| TP99.9 request delay | 100 ms |

1.9.5.22.1 Detect Heartbeats Between the Cloud Platform and the Controller

Typical Scenarios
The availability of the northbound connection between the cloud platform and
controller needs to be checked.

Functions
Maintain the heartbeat of the northbound connection between the cloud platform
and controller.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1007


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 500 times/minute.


Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/neutronapi/cloud/northheartbeat

Request Parameters

Table 1-783 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cloudN Yes REFER For details, see The cloud -


orthHe ENCE Table 1-784. platform needs
artBea to detect
tDtoW whether the
rapper northbound
interface of the
controller is
available.

Table 1-784 CloudNorthHeartBeatWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cloud_ Yes string 0 to - Cloud platform "physnet1"


name 255 name.
charac
ters.

agent_ Yes string 0 to - IP address of "192.168.3.2"


ip 255 the cloud
charac platform node
ters. that detects
heartbeats.

Sample Request
HTTP
PUT /controller/dc/v2/neutronapi/cloud/northheartbeat HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1008


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"cloud_name" : "physnet1",
"agent_ip" : "192.168.3.2"
}

Response Parameters
Response status code 201: Response status code 201: OK.

Table 1-785 CloudNorthHeartBeatWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

cloud_ string 0 to 255 - Cloud platform "physnet1"


name characters. name.

agent_ string 0 to 255 - IP address of "192.168.3.2"


ip characters. the cloud
platform node
that detects
heartbeats.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"cloud_name" : "physnet1",
"agent_ip" : "192.168.3.2"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1009


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.5.23 Neutron Routing Whitelist


Routing whitelist API description:
1. Create a routing whitelist.
2. Query routing whitelist information by ID.
3. Update routing whitelist information by ID.
4. Delete routing whitelist information by ID.
Interface SLA: (special design for special interfaces)
SLAs for query interfaces
Request success rate: ≥ 99%
Availability: Tier 1
Data consistency: Strong consistency
Throughput: 200 TPS
TP50 request delay: 50 ms
TP99.9 request delay: 100 ms

1.9.5.23.1 Query Routing Whitelist Information

Typical Scenarios
Routing whitelists need to be queried.

Functions
Query routing whitelist information by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1010


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/neutronapi/logicnetwork/external_whitelists/{id}

Table 1-786 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Routing "DBB702C3-77


charac whitelist ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/neutronapi/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1011


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

Table 1-787 RouteWhiteListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

extern REFER For details, see Table Whitelist -


al_whit ENCE 1-788. parameter.
elist

Table 1-788 WhiteListDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Route whitelist "00000000-000


The value must ID. 0-0000-1234-0
meet the 00000000002"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

router_ string 36 characters. - Router ID. "00000000-000


id The value must 0-0000-1234-0
meet the 00000000002"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

routes array< 0-500 items. - Route IP -


string> Each item has 0 address.
to 50
characters.

subnet array< 0-500 items. - Subnet ID. -


s string> Each item has
36 characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1012


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6 K8S

1.9.6.1 Container Platform


Third-party northbound APIs for managing the container platform

1.9.6.1.1 Query All Container Platforms

Typical Scenarios
All container platforms need to be queried.

Functions
Query the container platform list.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1013


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/containerplatform/k8s

Table 1-789 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

name No string - - Fuzzy match of "kk"


container
platform
names.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/k8s?pageIndex=1&pageSize=10&name=kk HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-790 K8sQueryListDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

k8s ARRAY For details, see Table Container -


_REFER 1-791. platform list.
ENCE

total- int32 - - Total number 10


num of K8S nodes.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1014


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-791 K8sQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Container "00000000-000


The value must platform ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 128 - Container "k8s_dev"


characters. platform name.

tenant string 1 to 255 - Tenant name. "tenant"


-name characters.

agent ARRAY For details, see Table Agent object. -


_REFER 1-792.
ENCE

multi- boolea - - Whether multi- false


tenant n tenant is used.

reuse- ARRAY For details, see Table Reused data -


datas _REFER 1-793. list.
ENCE

related array< Each item has - List of -


-fabric string> 36 characters. associated
fabric IDs.

status string 1 to 32 - K8S status. -


characters.

monito int32 - - Listening port. 11111


r-port

net- string - - Network mode "L2"


mode of the
container
platform,
which can be
L2, L3, or L2L3.

related ARRAY For details, see Table Associated -


-datas _REFER 1-794. data list.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1015


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device- string - - Loopback IPv6 -


loopba address of the
ck- device.
ipv6-
ipaddr
ess

device- string - - Loopback IPv4 "192.168.13.2"


loopba address of the
ck- device.
ipv4-
ipaddr
ess

cni- string - - CNI mode of -


type the container
network, which
can be Hwcni
or Calico.

tenant ARRAY For details, see Table Tenant list. -


-list _REFER 1-795.
ENCE

Table 1-792 agent parameters


Param Type Value Range Defaul Description Example
eter t Value

status string ● online - The connection -


● offline status.

ipv4- string - - IP address of "192.168.10.2"


addres the K8s
s monitor.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1016


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-793 ReuseDataDto parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant string 36 characters. - Multiplexed "00000000-000


-id The value must Layer 2/Layer 3 0-0000-0000-0
meet the tenant ID 00000000004"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

router- string 36 characters. - Multiplexed "00000000-000


id The value must Layer 2/Layer 3 0-0000-0000-0
meet the logical router 00000000004"
following ID
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-794 RelatedDataDto parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant string 36 characters. - Multiplexed "00000000-000


-id The value must Layer 2/Layer 3 0-0000-0000-0
meet the tenant ID 00000000004"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1017


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

router- string 36 characters. - Multiplexed "00000000-000


id The value must Layer 2/Layer 3 0-0000-0000-0
meet the logical router 00000000004"
following ID
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-795 TenantDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Tenant ID. "00000000-000


The value must 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Tenant name. "tenant_name"


characters.

l23_te string 36 characters. - Layer 2 or "00000000-000


nant_i The value must Layer 3 tenant 0-0000-0000-0
d meet the ID. 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1018


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"k8s" : [
{
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "k8s_dev",
"tenant-name" : "tenant",
"agent" : [
{
"ipv4-address" : "192.168.10.2"
}
],
"multi-tenant" : false,
"reuse-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"related-fabric" : [
"6eaa2006-0eb2-4395-90d9-e351310a8e2d"
],
"monitor-port" : 11111,
"net-mode" : "L2",
"related-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"device-loopback-ipv4-ipaddress" : "192.168.13.2",
"tenant-list" : [
{
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "tenant_name",
"l23_tenant_id" : "00000000-0000-0000-0000-000000000001"
}
]
}
],
"total-num" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1019


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.1.2 Query a Container Platform by ID

Typical Scenarios
A container platform needs to be queried by ID.

Functions
Query a container platform based on the ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/k8s/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1020


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-796 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Container "00000000-000


charac platform ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/k8s/00000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1021


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-797 K8sQueryDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

k8s REFER For details, see Table K8S object. -


ENCE 1-791.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"k8s" : {
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "k8s_dev",
"tenant-name" : "tenant",
"agent" : [
{
"ipv4-address" : "192.168.10.2"
}
],
"multi-tenant" : false,
"reuse-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"related-fabric" : [
"6eaa2006-0eb2-4395-90d9-e351310a8e2d"
],
"monitor-port" : 11111,
"net-mode" : "L2",
"related-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"device-loopback-ipv4-ipaddress" : "192.168.13.2",
"tenant-list" : [
{
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "tenant_name",
"l23_tenant_id" : "00000000-0000-0000-0000-000000000001"
}
]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1022


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.1.3 Update a Container Platform by ID

Typical Scenarios
A container platform needs to be updated by ID.

Functions
Update a container platform based on the ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/containerplatform/k8s/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1023


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-798 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Container "00000000-000


charac platform ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-799 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-800. updating a
container
platform.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1024


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-800 K8sDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

k8s Yes REFER For details, see K8S object. -


ENCE Table 1-801.

Table 1-801 K8sDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Container "00000000-000


charac platform ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to - Container "k8s_dev"


128 platform name.
charac
ters.

tenant No string 1 to - Tenant name. "tenant"


-name 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1025


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

agent Yes ARRAY For details, see Agent object. -


_REFER Table 1-802.
ENCE

multi- Yes boolea - - Whether multi- false


tenant n tenant is used.

reuse- No ARRAY For details, see Reused data -


datas _REFER Table 1-803. list.
ENCE

related No array< Each - List of -


-fabric string> item associated
has 36 fabric IDs.
charac
ters.

status No string 1 to 32 - K8S status. -


charac
ters.

monito No int32 - - Listening port. 11111


r-port

net- Yes string - - Network mode "L2"


mode of the
container
platform,
which can be
L2, L3, or L2L3.

related No ARRAY For details, see Associated -


-datas _REFER Table 1-804. data list.
ENCE

device- No string - - Loopback IPv6 -


loopba address of the
ck- device.
ipv6-
ipaddr
ess

device- No string - - Loopback IPv4 "192.168.13.2"


loopba address of the
ck- device.
ipv4-
ipaddr
ess

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1026


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cni- No string - - CNI mode of -


type the container
network, which
can be Hwcni
or Calico.

Table 1-802 agent parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

status No string ● onli - The connection -


ne status.
● offli
ne

ipv4- Yes string - - IP address of "192.168.10.2"


addres the K8s
s monitor.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1027


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-803 ReuseDataDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

tenant Yes string 36 - Multiplexed "00000000-000


-id charac Layer 2/Layer 3 0-0000-0000-0
ters. tenant ID 00000000004"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1028


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router- No string 36 - Multiplexed "00000000-000


id charac Layer 2/Layer 3 0-0000-0000-0
ters. logical router 00000000004"
The ID
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1029


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-804 RelatedDataDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

tenant Yes string 36 - Multiplexed "00000000-000


-id charac Layer 2/Layer 3 0-0000-0000-0
ters. tenant ID 00000000004"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1030


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

router- Yes string 36 - Multiplexed "00000000-000


id charac Layer 2/Layer 3 0-0000-0000-0
ters. logical router 00000000004"
The ID
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
PUT /controller/dc/v2/containerplatform/k8s/00000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"k8s" : {
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "k8s_dev",
"tenant-name" : "tenant",
"agent" : [
{
"ipv4-address" : "192.168.10.2"
}
],
"multi-tenant" : false,
"reuse-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1031


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"related-fabric" : [
"6eaa2006-0eb2-4395-90d9-e351310a8e2d"
],
"monitor-port" : 11111,
"net-mode" : "L2",
"related-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"device-loopback-ipv4-ipaddress" : "192.168.13.2"
}
}

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-805 K8sDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

k8s REFER For details, see Table K8S object. -


ENCE 1-806.

Table 1-806 K8sDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Container "00000000-000


The value must platform ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 128 - Container "k8s_dev"


characters. platform name.

tenant string 1 to 255 - Tenant name. "tenant"


-name characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1032


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

agent ARRAY For details, see Table Agent object. -


_REFER 1-792.
ENCE

multi- boolea - - Whether multi- false


tenant n tenant is used.

reuse- ARRAY For details, see Table Reused data -


datas _REFER 1-793. list.
ENCE

related array< Each item has - List of -


-fabric string> 36 characters. associated
fabric IDs.

status string 1 to 32 - K8S status. -


characters.

monito int32 - - Listening port. 11111


r-port

net- string - - Network mode "L2"


mode of the
container
platform,
which can be
L2, L3, or L2L3.

related ARRAY For details, see Table Associated -


-datas _REFER 1-794. data list.
ENCE

device- string - - Loopback IPv6 -


loopba address of the
ck- device.
ipv6-
ipaddr
ess

device- string - - Loopback IPv4 "192.168.13.2"


loopba address of the
ck- device.
ipv4-
ipaddr
ess

cni- string - - CNI mode of -


type the container
network, which
can be Hwcni
or Calico.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1033


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"k8s" : {
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "k8s_dev",
"tenant-name" : "tenant",
"agent" : [
{
"ipv4-address" : "192.168.10.2"
}
],
"multi-tenant" : false,
"reuse-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"related-fabric" : [
"6eaa2006-0eb2-4395-90d9-e351310a8e2d"
],
"monitor-port" : 11111,
"net-mode" : "L2",
"related-datas" : [
{
"tenant-id" : "00000000-0000-0000-0000-000000000004",
"router-id" : "00000000-0000-0000-0000-000000000004"
}
],
"device-loopback-ipv4-ipaddress" : "192.168.13.2"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1034


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.1.4 Check Connectivity Between the Container Platform and the Controller

Typical Scenarios
The availability of the northbound connection between a container platform and
the controller needs to be checked.

Functions
Maintain the heartbeat of the northbound connection between a container
platform and the controller.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/containerplatform/k8s/{id}/northheartbeat

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1035


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-807 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Container "00000000-000


charac platform ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-808 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-809. checking
whether the
northbound
plug-in of the
container
platform is
available.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1036


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-809 K8sHeartBeatWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

agent_ Yes string 1 to - IP address of "192.168.3.2"


ip 255 the container
charac platform node
ters. for checking
the heartbeat.

Sample Request
HTTP
PUT /controller/dc/v2/containerplatform/k8s/00000000-0000-0000-0000-000000000001/northheartbeat
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"agent_ip" : "192.168.3.2"
}

Response Parameters
Response status code 201: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1037


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.2 Container Tenant


Third-party northbound API for managing container tenants

1.9.6.2.1 Create a Tenant

Typical Scenarios
A tenant needs to be created.

Functions
Create a tenant.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/containerplatform/tenants

Request Parameters

Table 1-810 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-811. creating a
tenant.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1038


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-811 TenantDtosWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

tenant Yes ARRAY For details, see Tenant list. -


s _REFER Table 1-812.
ENCE

k8s_id Yes string 36 - K8S platform "00000000-000


charac ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1039


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-812 TenantDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Tenant ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to - Tenant name. "tenant_name"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1040


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l23_te No string 36 - Layer 2 or "00000000-000


nant_i charac Layer 3 tenant 0-0000-0000-0
d ters. ID. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
POST /controller/dc/v2/containerplatform/tenants HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"tenants" : [
{
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "tenant_name",
"l23_tenant_id" : "00000000-0000-0000-0000-000000000001"
}
],
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1041


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-813 TenantDtosWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant ARRAY For details, see Table Tenant list. -


s _REFER 1-814.
ENCE

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-814 TenantDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Tenant ID. "00000000-000


The value must 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Tenant name. "tenant_name"


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1042


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

l23_te string 36 characters. - Layer 2 or "00000000-000


nant_i The value must Layer 3 tenant 0-0000-0000-0
d meet the ID. 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenants" : [
{
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "tenant_name",
"l23_tenant_id" : "00000000-0000-0000-0000-000000000001"
}
],
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1043


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.2.2 Query All Tenants

Typical Scenarios
The tenant list needs to be queried.

Functions
Query the tenant list.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/tenants

Table 1-815 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

queryV No string - - queryValue -


alue

order No string - - Order. -

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1044


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

k8sId No string 36 - K8S platform -


charac ID.
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/tenants?pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1045


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-816 TenantQueryDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant ARRAY For details, see Table Tenant list. -


s _REFER 1-817.
ENCE

total- int32 - - Total number 10


num of tenants.

Table 1-817 TenantQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Tenant ID. "00000000-000


The value must 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Tenant name. "tenant_name"


characters.

l23_te string 36 characters. - Layer 2 or "00000000-000


nant_i The value must Layer 3 tenant 0-0000-0000-0
d meet the ID. 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1046


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenants" : [
{
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "tenant_name",
"l23_tenant_id" : "00000000-0000-0000-0000-000000000001",
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}
],
"total-num" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1047


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.2.3 Query a Tenant by ID

Typical Scenarios
A tenant needs to be queried by ID.

Functions
Query a tenant by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/tenants/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1048


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-818 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Tenant ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/tenants/00000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1049


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-819 TenantDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant REFER For details, see Table Tenant object. -


ENCE 1-814.

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenant" : {
"id" : "00000000-0000-0000-0000-000000000001",
"name" : "tenant_name",
"l23_tenant_id" : "00000000-0000-0000-0000-000000000001"
},
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1050


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 500 Internal Server Error


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.2.4 Delete a Tenant by ID

Typical Scenarios
A tenant needs to be deleted based on the ID.

Functions
Delete a tenant based on the ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/containerplatform/tenants/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1051


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-820 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Tenant ID. "00000000-000


charac 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/containerplatform/tenants/00000000-0000-0000-0000-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1052


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.3 Container Network


Third-party northbound API for creating a container network

1.9.6.3.1 Create a Network

Typical Scenarios
A network needs to be created.

Functions
Create a network.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 150 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1053


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v2/containerplatform/networks

Request Parameters

Table 1-821 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ Yes REFER For details, see Parameters for -


ks ENCE Table 1-822. creating a
network.

Table 1-822 NetworkDtosWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ Yes ARRAY For details, see Network object -


ks _REFER Table 1-823. list.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1054


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

k8s_id Yes string 36 - K8S platform "00000000-000


charac ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Table 1-823 NetworkDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

subnet Yes ARRAY 1-255 items. For List of subnets -


s _REFER details, see on a network.
ENCE Table 1-824.

name Yes string 1 to - Network name. "testNetwork"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1055


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string 36 - Tenant ID. Only "00000000-000


_id charac the 0-0000-0000-0
ters. administrator 00000000005"
The can specify the
value tenant ID of
must other tenants.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1056


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 36 - Network ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

networ Yes string ● vlan - Network type, "vlan"


k_type which can be
● vxla
n VLAN or
VXLAN.

segme Yes int32 [1-167 - Extended 10


ntation 77215] attribute:
_id network
segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1057


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fwdmo No string ● brid - Forwarding "bridge"


de ge type: bridge or
● rout routing.
ing

Table 1-824 SubnetDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Subnet ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

cidr Yes string 1 to 36 - CIDR address, "192.168.1.0/24


charac which can be "
ters. IPv4 or IPv6

gatew Yes string 1 to 64 - Gateway IP "192.168.1.1"


ay_ip charac address.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1058


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ip_vers Yes string ● ipv4 - IP version. "ipv4"


ion
● ipv6

Sample Request
HTTP
POST /controller/dc/v2/containerplatform/networks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"networks" : [
{
"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gateway_ip" : "192.168.1.1",
"ip_version" : "ipv4"
}
],
"name" : "testNetwork",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_type" : "vlan",
"segmentation_id" : 10,
"fwdmode" : "bridge"
}
],
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-825 NetworkDtosWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

networ ARRAY For details, see Table Network object -


ks _REFER 1-826. list.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1059


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-826 NetworkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet ARRAY 1-255 items. For details, List of subnets -


s _REFER see Table 1-827. on a network.
ENCE

name string 1 to 255 - Network name. "testNetwork"


characters.

tenant string 36 characters. - Tenant ID. Only "00000000-000


_id The value must the 0-0000-0000-0
meet the administrator 00000000005"
following can specify the
regular tenant ID of
expression: other tenants.
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1060


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

id string 36 characters. - Network ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

networ string ● vlan - Network type, "vlan"


k_type which can be
● vxlan
VLAN or
VXLAN.

segme int32 [1-16777215] - Extended 10


ntation attribute:
_id network
segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

fwdmo string ● bridge - Forwarding "bridge"


de type: bridge or
● routing
routing.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1061


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-827 SubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Subnet ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

cidr string 1 to 36 - CIDR address, "192.168.1.0/24


characters. which can be "
IPv4 or IPv6

gatew string 1 to 64 - Gateway IP "192.168.1.1"


ay_ip characters. address.

ip_vers string ● ipv4 - IP version. "ipv4"


ion
● ipv6

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"networks" : [
{
"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gateway_ip" : "192.168.1.1",
"ip_version" : "ipv4"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1062


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"name" : "testNetwork",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_type" : "vlan",
"segmentation_id" : 10,
"fwdmode" : "bridge"
}
],
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.3.2 Query All Networks

Typical Scenarios
All networks need to be queried.

Functions
Query all networks.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 150 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/networks

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1063


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-828 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

k8sId No string 36 - K8S platform "DBB702C3-77


charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1064


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenantI No string 36 - Tenant ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65300"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/networks?k8sId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&tenantId=DBB702C3-7719-4FE6-A5AD-3A9C9E265300 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1065


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-829 NetworkQueryDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

networ ARRAY For details, see Table Network object -


ks _REFER 1-830. list.
ENCE

total- int32 - - Total number 10


num of networks.

Table 1-830 NetworkQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet ARRAY 1-255 items. For details, List of subnets -


s _REFER see Table 1-827. on a network.
ENCE

name string 1 to 255 - Network name. "testNetwork"


characters.

tenant string 36 characters. - Tenant ID. Only "00000000-000


_id The value must the 0-0000-0000-0
meet the administrator 00000000005"
following can specify the
regular tenant ID of
expression: other tenants.
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

id string 36 characters. - Network ID. "DBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1066


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

networ string ● vlan - Network type, "vlan"


k_type which can be
● vxlan
VLAN or
VXLAN.

segme int32 [1-16777215] - Extended 10


ntation attribute:
_id network
segment ID.
For a VLAN
network, the
value is the
VLAN ID. For a
VXLAN
network, the
value is the
VNI.

fwdmo string ● bridge - Forwarding "bridge"


de type: bridge or
● routing
routing.

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1067


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"networks" : [
{
"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gateway_ip" : "192.168.1.1",
"ip_version" : "ipv4"
}
],
"name" : "testNetwork",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_type" : "vlan",
"segmentation_id" : 10,
"fwdmode" : "bridge",
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}
],
"total-num" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.3.3 Query a Network by ID

Typical Scenarios
A network needs to be queried by ID.

Functions
Query a network by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 150 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1068


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/networks/{id}

Table 1-831 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Network ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/networks/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1069


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-832 NetworkDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

networ REFER For details, see Table Network -


k ENCE 1-826. object.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"k8s_id" : "00000000-0000-0000-0000-000000000001",
"network" : {
"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gateway_ip" : "192.168.1.1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1070


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ip_version" : "ipv4"
}
],
"name" : "testNetwork",
"tenant_id" : "00000000-0000-0000-0000-000000000005",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_type" : "vlan",
"segmentation_id" : 10,
"fwdmode" : "bridge"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.3.4 Delete a Network by ID

Typical Scenarios
A network needs to be deleted by ID. After a network is deleted, all the
corresponding subnets are deleted.

Functions
Delete a network by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 150 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/containerplatform/networks/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1071


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-833 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Network ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/containerplatform/networks/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1072


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.4 Container Port


Third-party northbound API for creating a container port.

1.9.6.4.1 Create a Port

Typical Scenarios
A port needs to be created.

Functions
Create a port.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 10,000 times/minute.
Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1073


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v2/containerplatform/ports

Request Parameters

Table 1-834 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

portDt Yes REFER For details, see Parameters for -


oWrap ENCE Table 1-835. creating a port.
per

Table 1-835 PortDtosWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ports Yes ARRAY For details, see Total number -


_REFER Table 1-836. of container
ENCE ports.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1074


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

k8s_id Yes string 36 - K8S platform "00000000-000


charac ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Table 1-836 PortDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

name Yes string 1 to - Port name. "test_name"


255
charac
ters.

names No string 0 to - Name space "namespace1"


pace 128
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1075


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 36 - Container port "DBB702C3-77


charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1076


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

networ No string 0 to 36 - Network ID. "DBB702C3-77


k_id charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
([0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12})|
().

mac_a No string 1 to 32 - MAC address "fa:16:3e:9e:ff:


ddress charac of a port. 55"
ters.

fixed_i Yes ARRAY For details, see IP address of a -


ps _REFER Table 1-837. port.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1077


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenant Yes string 36 - Tenant ID. "14c6bc47-5a5


_id charac c-47da-
ters. bff3-7ed2b0ca
The 8c8f"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

status No string 0 to - Port status. -


128
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1078


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

host_id Yes string 1 to - Extended "compute-192.


255 attribute: host 168.8.161"
charac ID. In the
ters. distributed
hybrid overlay
solution, this
parameter is
mandatory and
the value is the
ID of the
CE1800V. In
the network
overlay
solution, this
parameter is
optional and
the value is the
host name of
the compute
node where
the VM is
located.

fwdmo No string ● brid - Forwarding "bridge"


de ge mode: bridge
● rout or routing.
ing

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1079


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-837 FixedIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

subnet No string 0 to 36 - Subnet ID "DBB702C3-77


_id charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
([0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12})|
().

ip_add Yes string 1 to 64 - IP address. "192.168.10.16


ress charac "
ters.

Sample Request
HTTP
POST /controller/dc/v2/containerplatform/ports HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"ports" : [
{
"name" : "test_name",
"namespace" : "namespace1",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1080


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.10.16"
}
],
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"host_id" : "compute-192.168.8.161",
"fwdmode" : "bridge"
}
],
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response Parameters
Response status code 201: Response status code 200: OK.

Table 1-838 PortDtosWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

ports ARRAY For details, see Table Total number -


_REFER 1-839. of container
ENCE ports.

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-839 PortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

name string 1 to 255 - Port name. "test_name"


characters.

names string 0 to 128 - Name space "namespace1"


pace characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1081


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

id string 36 characters. - Container port "DBB702C3-77


The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

networ string 0 to 36 - Network ID. "DBB702C3-77


k_id characters. The 19-4FE6-
value must A5AD-3A9C9E2
meet the 65309"
following
regular
expression:
([0-9a-fA-F]
{8}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{12})|().

mac_a string 1 to 32 - MAC address "fa:16:3e:9e:ff:


ddress characters. of a port. 55"

fixed_i ARRAY For details, see Table IP address of a -


ps _REFER 1-840. port.
ENCE

tenant string 36 characters. - Tenant ID. "14c6bc47-5a5


_id The value must c-47da-
meet the bff3-7ed2b0ca
following 8c8f"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

status string 0 to 128 - Port status. -


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1082


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

host_id string 1 to 255 - Extended "compute-192.


characters. attribute: host 168.8.161"
ID. In the
distributed
hybrid overlay
solution, this
parameter is
mandatory and
the value is the
ID of the
CE1800V. In
the network
overlay
solution, this
parameter is
optional and
the value is the
host name of
the compute
node where
the VM is
located.

fwdmo string ● bridge - Forwarding "bridge"


de mode: bridge
● routing
or routing.

Table 1-840 FixedIpDto parameters

Param Type Value Range Defaul Description Example


eter t Value

subnet string 0 to 36 - Subnet ID "DBB702C3-77


_id characters. The 19-4FE6-
value must A5AD-3A9C9E2
meet the 65309"
following
regular
expression:
([0-9a-fA-F]
{8}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{12})|().

ip_add string 1 to 64 - IP address. "192.168.10.16


ress characters. "

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1083


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 200: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ports" : [
{
"name" : "test_name",
"namespace" : "namespace1",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.10.16"
}
],
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"host_id" : "compute-192.168.8.161",
"fwdmode" : "bridge"
}
],
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1084


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.6.4.2 Query All Ports

Typical Scenarios
A port needs to be created.

Functions
Query all ports.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 10,000 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/ports

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1085


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-841 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

k8sId No string 36 - Container -


charac platform ID.
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1086


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenantI No string 36 - Tenant ID. -


d charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1087


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

networ No string 36 - Network ID. -


kId charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/ports HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1088


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-842 PortQueryDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

ports ARRAY For details, see Table Port list. -


_REFER 1-843.
ENCE

total- int32 - - Total number 10


num of container
ports.

Table 1-843 PortQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

name string 1 to 255 - Port name. "test_name"


characters.

names string 0 to 128 - Name space "namespace1"


pace characters.

id string 36 characters. - Container port "DBB702C3-77


The value must ID. 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

networ string 0 to 36 - Network ID. "DBB702C3-77


k_id characters. The 19-4FE6-
value must A5AD-3A9C9E2
meet the 65309"
following
regular
expression:
([0-9a-fA-F]
{8}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{4}-[0-9a-fA-F]
{12})|().

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1089


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

mac_a string 1 to 32 - MAC address "fa:16:3e:9e:ff:


ddress characters. of a port. 55"

fixed_i ARRAY For details, see Table IP address of a -


ps _REFER 1-840. port.
ENCE

tenant string 36 characters. - Tenant ID. "14c6bc47-5a5


_id The value must c-47da-
meet the bff3-7ed2b0ca
following 8c8f"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

status string 0 to 128 - Port status. -


characters.

host_id string 1 to 255 - Extended "compute-192.


characters. attribute: host 168.8.161"
ID. In the
distributed
hybrid overlay
solution, this
parameter is
mandatory and
the value is the
ID of the
CE1800V. In
the network
overlay
solution, this
parameter is
optional and
the value is the
host name of
the compute
node where
the VM is
located.

fwdmo string ● bridge - Forwarding "bridge"


de mode: bridge
● routing
or routing.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1090


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"ports" : [
{
"name" : "test_name",
"namespace" : "namespace1",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.10.16"
}
],
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"host_id" : "compute-192.168.8.161",
"fwdmode" : "bridge",
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}
],
"total-num" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1091


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.4.3 Query a Port by ID

Typical Scenarios
Query a Port by ID.

Functions
Query a port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 10,000 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/ports/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1092


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-844 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Port ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/ports/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1093


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-845 PortDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

port REFER For details, see Table Port -


ENCE 1-839. information.

k8s_id string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : {
"name" : "test_name",
"namespace" : "namespace1",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.10.16"
}
],
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"host_id" : "compute-192.168.8.161",
"fwdmode" : "bridge"
},
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1094


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.4.4 Update a Port by ID

Typical Scenarios
A port needs to be deleted by ID.

Functions
Update a port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 10,000 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/containerplatform/ports/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1095


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-846 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Port ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-847 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

portDt Yes REFER For details, see Parameters for -


oWrap ENCE Table 1-848. updating a
per port.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1096


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-848 PortDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

port Yes REFER For details, see Port -


ENCE Table 1-836. information.

k8s_id Yes string 36 - K8S platform "00000000-000


charac ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
PUT /controller/dc/v2/containerplatform/ports/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port" : {
"name" : "test_name",
"namespace" : "namespace1",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1097


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.10.16"
}
],
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"host_id" : "compute-192.168.8.161",
"fwdmode" : "bridge"
},
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response Parameters
Response status code 200: Response status code 200: OK.
PortDtoWrapper parameters, For details, see Table 1-845.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : {
"name" : "test_name",
"namespace" : "namespace1",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"network_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"mac_address" : "fa:16:3e:9e:ff:55",
"fixed_ips" : [
{
"subnet_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip_address" : "192.168.10.16"
}
],
"tenant_id" : "14c6bc47-5a5c-47da-bff3-7ed2b0ca8c8f",
"host_id" : "compute-192.168.8.161",
"fwdmode" : "bridge"
},
"k8s_id" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1098


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.4.5 Delete a Port by ID

Typical Scenarios
A port needs to be deleted by ID.

Functions
Update a port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 10,000 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/containerplatform/ports/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1099


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-849 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Port name. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/containerplatform/ports/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1100


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 200: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.5 Container Node


Third-party northbound APIs for managing container nodes

1.9.6.5.1 Create a Container Node

Typical Scenarios
Create a Container Node.

Functions
Create a container node.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1101


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v2/containerplatform/nodes

Request Parameters

Table 1-850 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

nodeD Yes REFER For details, see Parameters for -


toWra ENCE Table 1-851. creating a
pper container node.

Table 1-851 NodeDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

node Yes REFER For details, see - -


ENCE Table 1-852.

Table 1-852 NodeDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

name Yes string 1 to - Node name. "calico_node_n


255 ame"
charac
ters.

k8s_no Yes string 1 to - Name of a K8s "k8s_node_host


de_na 255 node. _name"
me charac
ters.

id No uuid 1 to 36 - Node ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1102


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

k8s_id Yes uuid 1 to 36 - Container "DBB702C3-77


charac platform ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

node_i No string 1 to - Node IP -


pv6_ad 256 address
dress charac version, which
ters. can be IPv4 or
IPv6

node_i Yes string 1 to - Node IP "192.168.73.16


pv4_ad 256 address. "
dress charac
ters.

as_nu Yes string 0 to - Node AS "100"


mber 255 number.
charac
ters.

Sample Request
HTTP
POST /controller/dc/v2/containerplatform/nodes HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"node" : {
"name" : "calico_node_name",
"k8s_node_name" : "k8s_node_host_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"k8s_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"node_ipv4_address" : "192.168.73.16",
"as_number" : "100"
}
}

Response Parameters
Response status code 201: Response status code 204: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1103


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-853 NodeQueryDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

node REFER - - node -


ENCE

Table 1-854 NodeQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

name string 1 to 255 - Node name. "calico_node_n


characters. ame"

k8s_no string 1 to 255 - Name of a K8s "k8s_node_host


de_na characters. node. _name"
me

id uuid 1 to 36 - Node ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

k8s_id uuid 1 to 36 - Container "DBB702C3-77


characters. platform ID. 19-4FE6-
A5AD-3A9C9E2
65309"

node_i string 1 to 256 - Node IP -


pv6_ad characters. address
dress version, which
can be IPv4 or
IPv6

node_i string 1 to 256 - Node IP "192.168.73.16


pv4_ad characters. address. "
dress

as_nu string 0 to 255 - Node AS "100"


mber characters. number.

peer_in ARRAY For details, see Table Peer -


fo _REFER 1-855. information of
ENCE a node

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1104


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-855 PeerDto parameters


Param Type Value Range Defaul Description Example
eter t Value

peer_ip string 1 to 256 - Peer IP address "192.168.83.16


v4_add characters. of a node. "
ress

peer_ip string 1 to 256 - Peer IP address -


v6_add characters. of a node.
ress

peer_a string 0 to 128 - AS number of "101"


s characters. a TOR switch.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 201: Response status code 204: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"node" : [
{
"name" : "calico_node_name",
"k8s_node_name" : "k8s_node_host_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"k8s_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"node_ipv4_address" : "192.168.73.16",
"as_number" : "100",
"peer_info" : [
{
"peer_ipv4_address" : "192.168.83.16",
"peer_as" : "101"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1105


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.5.2 Query All Container Nodes

Typical Scenarios
All container nodes need to be queried.

Functions
Query all container nodes.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/nodes

Table 1-856 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

k8sId No UUID - - k8s ID -

name No string - - Node name. -

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1106


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v2/containerplatform/nodes HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-857 NodeQueryListDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

nodes ARRAY For details, see Table Node list. -


_REFER 1-858.
ENCE

total- int32 - - - 1
num

Table 1-858 NodeQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

name string 1 to 255 - Node name. "calico_node_n


characters. ame"

k8s_no string 1 to 255 - Name of a K8s "k8s_node_host


de_na characters. node. _name"
me

id uuid 1 to 36 - Node ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

k8s_id uuid 1 to 36 - Container "DBB702C3-77


characters. platform ID. 19-4FE6-
A5AD-3A9C9E2
65309"

node_i string 1 to 256 - Node IP -


pv6_ad characters. address
dress version, which
can be IPv4 or
IPv6

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1107


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

node_i string 1 to 256 - Node IP "192.168.73.16


pv4_ad characters. address. "
dress

as_nu string 0 to 255 - Node AS "100"


mber characters. number.

peer_in ARRAY For details, see Table Peer -


fo _REFER 1-855. information of
ENCE a node

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"nodes" : [
{
"name" : "calico_node_name",
"k8s_node_name" : "k8s_node_host_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"k8s_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"node_ipv4_address" : "192.168.73.16",
"as_number" : "100",
"peer_info" : [
{
"peer_ipv4_address" : "192.168.83.16",
"peer_as" : "101"
}
]
}
],
"total-num" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1108


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.5.3 Query a Container Node by ID

Typical Scenarios
A container node needs to be queried by ID.

Functions
Query a container node based on the ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/nodes/{id}

Table 1-859 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Node ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
60001"

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1109


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v2/containerplatform/nodes/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 204: OK.
NodeQueryDtoWrapper parameters, For details, see Table 1-853.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 204: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"node" : [
{
"name" : "calico_node_name",
"k8s_node_name" : "k8s_node_host_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"k8s_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"node_ipv4_address" : "192.168.73.16",
"as_number" : "100",
"peer_info" : [
{
"peer_ipv4_address" : "192.168.83.16",
"peer_as" : "101"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1110


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.5.4 Update a Container Node by ID

Typical Scenarios
A container node needs to be updated by ID.

Functions
Update a container node by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/containerplatform/nodes/{id}

Table 1-860 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID 1 to 36 - Node ID. -


charac
ters.

Request Parameters

Table 1-861 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

body Yes REFER For details, see Parameters for -


ENCE Table 1-851. updating a
container node.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1111


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v2/containerplatform/nodes/{id} HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"node" : {
"name" : "calico_node_name",
"k8s_node_name" : "k8s_node_host_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"k8s_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"node_ipv4_address" : "192.168.73.16",
"as_number" : "100"
}
}

Response Parameters
Response status code 200: Response status code 200: OK.

NodeQueryDtoWrapper parameters, For details, see Table 1-853.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"node" : [
{
"name" : "calico_node_name",
"k8s_node_name" : "k8s_node_host_name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"k8s_id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"node_ipv4_address" : "192.168.73.16",
"as_number" : "100",
"peer_info" : [
{
"peer_ipv4_address" : "192.168.83.16",
"peer_as" : "101"
}
]
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1112


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.5.5 Delete a Container Node by ID

Typical Scenarios
A container node needs to be deleted by ID.

Functions
Delete a container node based on the ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/containerplatform/nodes/{id}

Table 1-862 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID 1 to 36 - Node ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
60001"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1113


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/containerplatform/nodes/DBB702C3-7719-4FE6-A5AD-3A9C9E260001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 201: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.6 Container Services


Third-party northbound APIs for managing the container platform

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1114


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.6.6.1 Create a container service.

Typical Scenarios
A container service needs to be created.

Functions
Create a container service.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/controller/dc/v2/containerplatform/services

Request Parameters

Table 1-863 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes REFER For details, see Request body -


ENCE Table 1-864. for creating a
service.

Table 1-864 ServiceDtosWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes ARRAY For details, see service -


s _REFER Table 1-865.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1115


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

k8sId Yes string 36 - K8S platform "00000000-000


charac ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1116


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-865 ServiceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 36 - Service ID. "ABB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string - - name -

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1117


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenantI No string 36 - Tenant ID. "CDB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

names No string - - namespace -


pace

type No string - - type -

clusterI No string - - clusterIp -


p

service No string - - serviceStatus -


Status

ports No ARRAY For details, see Port list. -


_REFER Table 1-866.
ENCE

endpoi No REFER For details, see Endpoint list -


nts ENCE Table 1-867. instance.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1118


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-866 ServicePortDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

portId No string 36 - PORT ID "CBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60001"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

nodeP No int32 [1-214 - Node port 10


ort 74836 number.
47]

port No int32 [1-214 - Port number. 10


74836
47]

protoc No string - - Network -


ol protocol.

targetP No int32 [1-214 - Destination 10


ort 74836 port number.
47]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1119


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-867 EndpointsDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

endpoi No ARRAY For details, see Endpoint list. -


ntList _REFER Table 1-868.
ENCE

Table 1-868 EndPointDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string - - epID -

kind No string - - Category. -

ip No string - - IP address. -

Sample Request
HTTP
POST /controller/dc/v2/containerplatform/services HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"services" : [
{
"id" : "ABB702C3-7719-4FE6-A5AD-3A9C9E260001",
"tenantId" : "CDB702C3-7719-4FE6-A5AD-3A9C9E260001",
"ports" : [
{
"portId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"nodePort" : 10,
"port" : 10,
"targetPort" : 10
}
]
}
],
"k8sId" : "00000000-0000-0000-0000-000000000001"
}

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1120


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-869 ServiceDtosWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service ARRAY For details, see Table service -


s _REFER 1-870.
ENCE

k8sId string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Table 1-870 ServiceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Service ID. "ABB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string - - name -

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1121


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenantI string 36 characters. - Tenant ID. "CDB702C3-77


d The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

names string - - namespace -


pace

type string - - type -

clusterI string - - clusterIp -


p

service string - - serviceStatus -


Status

ports ARRAY For details, see Table Port list. -


_REFER 1-871.
ENCE

endpoi REFER For details, see Table Endpoint list -


nts ENCE 1-872. instance.

Table 1-871 ServicePortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

portId string 36 characters. - PORT ID "CBB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1122


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

nodeP int32 [1-2147483647 - Node port 10


ort ] number.

port int32 [1-2147483647 - Port number. 10


]

protoc string - - Network -


ol protocol.

targetP int32 [1-2147483647 - Destination 10


ort ] port number.

Table 1-872 EndpointsDto parameters


Param Type Value Range Defaul Description Example
eter t Value

endpoi ARRAY For details, see Table Endpoint list. -


ntList _REFER 1-873.
ENCE

Table 1-873 EndPointDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - epID -

kind string - - Category. -

ip string - - IP address. -

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1123


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"services" : [
{
"id" : "ABB702C3-7719-4FE6-A5AD-3A9C9E260001",
"tenantId" : "CDB702C3-7719-4FE6-A5AD-3A9C9E260001",
"ports" : [
{
"portId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"nodePort" : 10,
"port" : 10,
"targetPort" : 10
}
]
}
],
"k8sId" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.6.2 Query Container Services

Typical Scenarios
The container service list needs to be queried.

Functions
Query the container service list.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1124


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v2/containerplatform/services

Table 1-874 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "10"


ze

queryV No string - - Service name. "servicename"


alue

order No string - - Order. "true"

tenantI No string 36 - Tenant ID. "CBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60008"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1125


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/services?
pageIndex=1&pageSize=10&queryValue=servicename&order=true&tenantId=CBB702C3-7719-4FE6-
A5AD-3A9C9E260008 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-875 ServiceQueryDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service ARRAY For details, see Table Service list. -


s _REFER 1-876.
ENCE

totalN int32 - - Statistics. 10


um

Table 1-876 ServiceQueryDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Service ID. "ABB702C3-77


The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string - - name -

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1126


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenantI string 36 characters. - Tenant ID. "CDB702C3-77


d The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 60001"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

names string - - namespace -


pace

type string - - type -

clusterI string - - clusterIp -


p

service string - - serviceStatus -


Status

ports ARRAY For details, see Table Port list. -


_REFER 1-871.
ENCE

endpoi REFER For details, see Table Endpoint list -


nts ENCE 1-872. instance.

k8sId string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1127


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"services" : [
{
"id" : "ABB702C3-7719-4FE6-A5AD-3A9C9E260001",
"tenantId" : "CDB702C3-7719-4FE6-A5AD-3A9C9E260001",
"ports" : [
{
"portId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"nodePort" : 10,
"port" : 10,
"targetPort" : 10
}
],
"k8sId" : "00000000-0000-0000-0000-000000000001"
}
],
"totalNum" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.6.3 Query a Container Service by ID

Typical Scenarios
The container service with a specified ID needs to be queried.

Functions
Query a container service.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1128


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/controller/dc/v2/containerplatform/services/service/{id}

Table 1-877 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Service ID. "CBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
The 60005"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1129


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v2/containerplatform/services/service/CBB702C3-7719-4FE6-A5AD-3A9C9E260005 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Table 1-878 ServiceDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

service REFER For details, see Table service -


ENCE 1-870.

k8sId string 36 characters. - K8S platform "00000000-000


The value must ID. 0-0000-0000-0
meet the 00000000001"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1130


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"service" : {
"id" : "ABB702C3-7719-4FE6-A5AD-3A9C9E260001",
"tenantId" : "CDB702C3-7719-4FE6-A5AD-3A9C9E260001",
"ports" : [
{
"portId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"nodePort" : 10,
"port" : 10,
"targetPort" : 10
}
]
},
"k8sId" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.6.6.4 Modify a Container Service

Typical Scenarios
A container service needs to be modified.

Functions
Modify a container service.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/controller/dc/v2/containerplatform/services/service/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1131


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-879 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Container "CBB702C3-77


charac service ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 60004"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-880 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes REFER For details, see Request body -


ENCE Table 1-881. for updating a
service.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1132


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-881 ServiceDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

service Yes REFER For details, see service -


ENCE Table 1-865.

k8sId Yes string 36 - K8S platform "00000000-000


charac ID. 0-0000-0000-0
ters. 00000000001"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Sample Request
HTTP
PUT /controller/dc/v2/containerplatform/services/service/CBB702C3-7719-4FE6-A5AD-3A9C9E260004 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"service" : {
"id" : "ABB702C3-7719-4FE6-A5AD-3A9C9E260001",
"tenantId" : "CDB702C3-7719-4FE6-A5AD-3A9C9E260001",
"ports" : [
{
"portId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E260001",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1133


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"nodePort" : 10,
"port" : 10,
"targetPort" : 10
}
]
},
"k8sId" : "00000000-0000-0000-0000-000000000001"
}

Response Parameters
Response status code 200: Response status code 201: OK.
ServiceDtoWrapper parameters, For details, see Table 1-878.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"service" : {
"id" : "ABB702C3-7719-4FE6-A5AD-3A9C9E260001",
"tenantId" : "CDB702C3-7719-4FE6-A5AD-3A9C9E260001",
"ports" : [
{
"portId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E260001",
"nodePort" : 10,
"port" : 10,
"targetPort" : 10
}
]
},
"k8sId" : "00000000-0000-0000-0000-000000000001"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1134


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.6.6.5 Delete a container service.

Typical Scenarios
A container service needs to be deleted.

Functions
Delete a container service.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/controller/dc/v2/containerplatform/services/service/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1135


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-882 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Container "CBB702C3-77


charac service ID. 19-4FE6-
ters. A5AD-3A9C9E2
The 60002"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v2/containerplatform/services/service/CBB702C3-7719-4FE6-A5AD-3A9C9E260002
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 201: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1136


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 201: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7 VPC

1.9.7.1 Logical Network Management


Description of asset synchronization interface provided
for the vulnerability awareness system to query device information in the
CloudSOP inventory table.
**SLA**

|SLA Item|Definition|
|-----|-----|
|Request success rate| ≥ 99.9%|
|Availability|Tier 1|
|Data consistency|Eventual consistency, inconsistency duration &lt; 1 minute|
|Throughput|4000 TPS|

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1137


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

|TP50 request delay | 50 ms |


|TP99.9 request delay | 100 ms |

1.9.7.1.1 Create a Logical Network

Typical Scenarios
A logical network needs to be created.

Functions
Create a logical network. The following fields are mandatory: id, name, and
fabricId.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/networks

Request Parameters

Table 1-883 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-884. s for
creating a
logical
network.

Table 1-884 LogicNetworkDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

networ Yes REFER For details, see Logical -


k ENCE Table 1-885. network
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1138


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-885 NetworkDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Logical "DBB702C3-77


charac network ID. 19-4FE6-
ters. This field A5AD-3A9C9E2
The cannot be 65309"
value updated.
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 1 to - Tenant to "vpcName"


255 which a logical
charac network (VPC)
ters. belongs. If this
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1139


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

descrip No string 0 to - ID of the fabric "description"


tion 255 associated with
charac the logical
ters. network. If the
VPC is not a
public VPC, the
fabric must
have been
added by the
tenant. This
field can be
updated.

tenantI No string 0 to - Tenant to "DBB702C3-77


d 256 which a logical 19-4FE6-
charac network (VPC) A5AD-3A9C9E2
ters. belongs. If this 65309"
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

fabricI No array< 0-4000 - ID of the fabric -


d string> items. associated with
the logical
network. If the
VPC is not a
public VPC, the
fabric must
have been
added by the
tenant. This
field can be
updated.

multic No boolea - - Multicast false


astCap n capability. This
ability field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1140


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

type No string 0 to 36 - Logical "Transit"


charac network type,
ters. which can be
Instance or
Transit. If this
parameter is
left empty, the
default value is
Instance.

additio No REFER For details, see "" -


nal ENCE Table 1-886.

Table 1-886 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1141


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

POST /controller/dc/v3/logicnetwork/networks HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"network" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vpcName",
"description" : "description",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"multicastCapability" : false,
"type" : "Transit",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.1.2 Query All Logical Networks

Typical Scenarios
All logical networks need to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1142


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query all logical networks.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/networks

Table 1-887 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

type No string 0 to 36 - Logical "Transit"


charac network type,
ters. which can be
Instance or
Transit.

tenantI No string 0 to - Tenant ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

filterTe No boolea - true Default tenant false


nant n filtering.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1143


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/networks?
producer=default&type=Transit&tenantId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&filterTenant=false&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-888 LogicNetworkPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

networ ARRAY For details, see Table Logical -


k _REFER 1-889. network
ENCE information
list.

totalN int64 [1-2147483647 - Total number 200


um ] of logical
networks.

pageIn int32 [1-2147483647 - Current page 1


dex ] number.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1144


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-889 QueryNetworkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Logical "DBB702C3-77


The value must network ID. 19-4FE6-
meet the This field A5AD-3A9C9E2
following cannot be 65309"
regular updated.
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Tenant to "vpcName"


characters. which a logical
network (VPC)
belongs. If this
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

descrip string 0 to 255 - ID of the fabric "description"


tion characters. associated with
the logical
network. If the
VPC is not a
public VPC, the
fabric must
have been
added by the
tenant. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1145


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenantI string 0 to 256 - Tenant to "DBB702C3-77


d characters. which a logical 19-4FE6-
network (VPC) A5AD-3A9C9E2
belongs. If this 65309"
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

fabricI array< 0-4000 items. - ID of the fabric -


d string> associated with
the logical
network. If the
VPC is not a
public VPC, the
fabric must
have been
added by the
tenant. This
field can be
updated.

multic boolea - - Multicast false


astCap n capability. This
ability field can be
updated.

type string 0 to 36 - Logical "Transit"


characters. network type,
which can be
Instance or
Transit. If this
parameter is
left empty, the
default value is
Instance.

additio REFER For details, see Table "" -


nal ENCE 1-890.

isVpcD boolea - - Whether the true


eploye n logical network
d (VPC) is
deployed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1146


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-890 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"network" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vpcName",
"description" : "description",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"multicastCapability" : false,
"type" : "Transit",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1147


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

},
"isVpcDeployed" : true
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.1.3 Query All Logical Networks

Typical Scenarios
A logical network needs to be queried by ID.

Functions
Query a logical network by ID.

The name, description, fabircId, and multicastCapability fields can be updated.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/networks/network/{id}

Table 1-891 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Logical "DBB702C3-77


256 network ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1148


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/networks/network/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-892 LogicNetworkRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

networ ARRAY For details, see Table Logical -


k _REFER 1-889. network
ENCE information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"network" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vpcName",
"description" : "description",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"multicastCapability" : false,
"type" : "Transit",
"additional" : {
"producer" : "default",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1149


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"createAt" : "2017-08-10 16:30:40",


"updateAt" : "2017-08-10 16:30:40"
},
"isVpcDeployed" : true
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.1.4 Update a Logical Network by ID

Typical Scenarios
A logical network needs to be updated by ID.

Functions
Modify a logical network based on the logical network ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/networks/network/{id}

Table 1-893 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 a logical 19-4FE6-
charac network. This A5AD-3A9C9E2
ters. field cannot be 65309"
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1150


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-894 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-884. s for
updating
a logical
network.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/networks/network/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"network" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vpcName",
"description" : "description",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricId" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"multicastCapability" : false,
"type" : "Transit",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 200: successfully

Table 1-895 LogicNetworkDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

networ REFER For details, see Table Logical -


k ENCE 1-896. network
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1151


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-896 NetworkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Logical "DBB702C3-77


The value must network ID. 19-4FE6-
meet the This field A5AD-3A9C9E2
following cannot be 65309"
regular updated.
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Tenant to "vpcName"


characters. which a logical
network (VPC)
belongs. If this
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

descrip string 0 to 255 - ID of the fabric "description"


tion characters. associated with
the logical
network. If the
VPC is not a
public VPC, the
fabric must
have been
added by the
tenant. This
field can be
updated.

tenantI string 0 to 256 - Tenant to "DBB702C3-77


d characters. which a logical 19-4FE6-
network (VPC) A5AD-3A9C9E2
belongs. If this 65309"
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1152


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

fabricI array< 0-4000 items. - ID of the fabric -


d string> associated with
the logical
network. If the
VPC is not a
public VPC, the
fabric must
have been
added by the
tenant. This
field can be
updated.

multic boolea - - Multicast false


astCap n capability. This
ability field can be
updated.

type string 0 to 36 - Logical "Transit"


characters. network type,
which can be
Instance or
Transit. If this
parameter is
left empty, the
default value is
Instance.

additio REFER For details, see Table "" -


nal ENCE 1-890.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"network" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "vpcName",
"description" : "description",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1153


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"fabricId" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"multicastCapability" : false,
"type" : "Transit",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.1.5 Delete a Logical Network by ID

Typical Scenarios
A logical network needs to be deleted by ID.

Functions
Delete a logical network based by ID. All related services on the logical network
will be deleted.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/networks/network/{id}

Table 1-897 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 an observing 19-4FE6-
charac port. A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1154


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-898 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/networks/network/DBB702C3-7719-4FE6-A5AD-3A9C9E265309?
producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1155


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.2 Logical Subnet Management


Subnet management APIs: 1. Query subnet information. 2. Create subnet
information. 3. Query a subnet by ID. 4. Update a subnet by ID. 5. Delete a subnet
by ID.

1.9.7.2.1 Create a Subnet

Typical Scenarios
A subnet needs to be created.

Functions
Create a subnet.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/subnets

Request Parameters

Table 1-899 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-900. s for
creating a
subnet.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1156


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-900 SubnetDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

subnet Yes ARRAY For details, see Subnet -


_REFER Table 1-901. information.
ENCE

Table 1-901 SubnetDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

logicS No string 0 to - Subnet "DBB702C3-77


witchId 256 broadcast 19-4FE6-
charac domain. A5AD-3A9C9E2
ters. Reserved 65309"
parameter.

cidr Yes string 1 to - Subnet "192.168.1.0/24


255 segment. This "
charac parameter
ters. cannot be
updated if the
subnet is
associated with
a logical
switch.

gatew No string 1 to - Subnet "192.168.1.1"


ayIp 255 gateway IP
charac address. This
ters. parameter is
optional when
Logical router
type is set to
Multi-active.
This field
cannot be
updated

allocPo No REFER For details, see Reserved -


ol ENCE Table 1-902. parameter.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1157


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

reserve No REFER For details, see Reserved -


Pool ENCE Table 1-903. parameter.

tenantI No string 0 to - Tenant. This "DBB702C3-77


d 256 field cannot be 19-4FE6-
charac updated. If a A5AD-3A9C9E2
ters. new value is 65309"
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. This field is 19-4FE6-
charac mandatory A5AD-3A9C9E2
ters. during the 65309"
creation and
optional during
the update.
This field
cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

device No ARRAY For details, see Parameter -


Gatew _REFER Table 1-904. required when
ayIps ENCE the logical
router type is
Multi-active.

vrrpCo No ARRAY For details, see Parameter -


nfig _REFER Table 1-905. required when
ENCE the logical
router type is
Multi-active.

additio No REFER For details, see Additional -


nal ENCE Table 1-906. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1158


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-902 AllocPoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ipBegi Yes string 1 to - Start IP "192.168.1.1"


n 255 address.
charac
ters.

ipEnd Yes string 1 to - End IP address. "192.168.1.2"


255
charac
ters.

Table 1-903 ReservePoolDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ipBegi Yes string 1 to - Start IP "192.168.1.1"


n 255 address.
charac
ters.

ipEnd Yes string 1 to - End IP address. "192.168.1.2"


255
charac
ters.

Table 1-904 DeviceGroupGatewayIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device No string 0 to - Device group "DBB702C3-77


GroupI 256 ID. This field 19-4FE6-
d charac cannot be A5AD-3A9C9E2
ters. update 65309"

gatew No string - - Only IPv4 "192.168.1.1"


ayIp addresses are
supported. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1159


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-905 DeviceGroupVrrpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

device No string 0 to - Device group "DBB702C3-77


GroupI 256 ID. This field 19-4FE6-
d charac cannot be A5AD-3A9C9E2
ters. update 65309"

vrrpVri No string 1 to - VRRP VRID. "10"


d 255 This field can
charac be updated.
ters.

virtualI No string - - Only IPv4 "192.168.1.1"


p addresses are
supported. This
field can be
updated.

vrrpPri No string 1 to - Priority. This "10"


ority 254 field can be
charac updated.
ters.

preem No boolea - - Whether to false


ptEnab n enable
le preemption.
This field can
be updated.

preem No string 0 to - Preemption "10"


pt 3600 time. This field
charac can be
ters. updated.

recover No string 0 to - Delay before a "10"


yDelay 3600 VRRP group
charac recovers. The
ters. value can be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1160


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-906 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2016-03-08T2


At 255 0:19:41.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-03-08T2


At 255 0:19:41.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/subnets HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"subnet" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1",
"allocPool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"reservePool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1161


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGatewayIps" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"gatewayIp" : "192.168.1.1"
}
],
"vrrpConfig" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrrpVrid" : "10",
"virtualIp" : "192.168.1.1",
"vrrpPriority" : "10",
"preemptEnable" : false,
"preempt" : "10",
"recoveryDelay" : "10"
}
],
"additional" : {
"producer" : "default",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.2.2 Query Subnets

Typical Scenarios
Subnet information needs to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1162


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query subnets based on certain conditions.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/subnets

Table 1-907 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to - Producer. This "default"


er 255 parameter is
charac optional. If it is
ters. specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

tenantI No string 0 to - Tenant ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicS No string 0 to - Subnet "DBB702C3-77


witchId 256 broadcast 19-4FE6-
charac domain. A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1163


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR No string 0 to - Logical router. "DBB702C3-77


outerId 6044 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309;DBB702
C3-7719-4FE6-
A5AD-3A9C9E2
65310"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/subnets?producer=default&tenantId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicSwitchId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicRouterId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309;DBB702C3-7719-4FE6-
A5AD-3A9C9E265310&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-908 SubnetPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

subnet ARRAY For details, see Table Subnet -


_REFER 1-909. information.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1164


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

totalN int64 [1-2147483647 - Total number 200


um ] of subnets.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-909 QuerySubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

logicS string 0 to 256 - Subnet "DBB702C3-77


witchId characters. broadcast 19-4FE6-
domain. A5AD-3A9C9E2
Reserved 65309"
parameter.

cidr string 1 to 255 - Subnet "192.168.1.0/24


characters. segment. This "
parameter
cannot be
updated if the
subnet is
associated with
a logical
switch.

gatew string 1 to 255 - Subnet "192.168.1.1"


ayIp characters. gateway IP
address. This
parameter is
optional when
Logical router
type is set to
Multi-active.
This field
cannot be
updated

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1165


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

allocPo REFER For details, see Table Reserved -


ol ENCE 1-910. parameter.

reserve REFER For details, see Table Reserved -


Pool ENCE 1-911. parameter.

tenantI string 0 to 256 - Tenant. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. If a A5AD-3A9C9E2
new value is 65309"
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

logicR string 0 to 256 - Logical router "DBB702C3-77


outerId characters. ID. This field is 19-4FE6-
mandatory A5AD-3A9C9E2
during the 65309"
creation and
optional during
the update.
This field
cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

device ARRAY For details, see Table Parameter -


Gatew _REFER 1-912. required when
ayIps ENCE the logical
router type is
Multi-active.

vrrpCo ARRAY For details, see Table Parameter -


nfig _REFER 1-913. required when
ENCE the logical
router type is
Multi-active.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1166


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

additio REFER For details, see Table Additional -


nal ENCE 1-914. information.

dhcpE boolea - false Whether to false


nable n enable DHCP.

dhcpGr string 0 to 256 - DHCP server "DBB702C3-77


oupId characters. group 19-4FE6-
associated with A5AD-3A9C9E2
the subnet. 65309"

Table 1-910 AllocPoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipBegi string 1 to 255 - Start IP "192.168.1.1"


n characters. address.

ipEnd string 1 to 255 - End IP address. "192.168.1.2"


characters.

Table 1-911 ReservePoolDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipBegi string 1 to 255 - Start IP "192.168.1.1"


n characters. address.

ipEnd string 1 to 255 - End IP address. "192.168.1.2"


characters.

Table 1-912 DeviceGroupGatewayIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID. This field 19-4FE6-
d cannot be A5AD-3A9C9E2
update 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1167


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

gatew string - - Only IPv4 "192.168.1.1"


ayIp addresses are
supported. This
field can be
updated.

Table 1-913 DeviceGroupVrrpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID. This field 19-4FE6-
d cannot be A5AD-3A9C9E2
update 65309"

vrrpVri string 1 to 255 - VRRP VRID. "10"


d characters. This field can
be updated.

virtualI string - - Only IPv4 "192.168.1.1"


p addresses are
supported. This
field can be
updated.

vrrpPri string 1 to 254 - Priority. This "10"


ority characters. field can be
updated.

preem boolea - - Whether to false


ptEnab n enable
le preemption.
This field can
be updated.

preem string 0 to 3600 - Preemption "10"


pt characters. time. This field
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1168


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

recover string 0 to 3600 - Delay before a "10"


yDelay characters. VRRP group
recovers. The
value can be
changed.

Table 1-914 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2016-03-08T2


At characters. 0:19:41.000+00:
00"

update string 0 to 255 - Update time. "2016-03-08T2


At characters. 0:19:41.000+00:
00"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1169


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive
{
"subnet" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1",
"allocPool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"reservePool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGatewayIps" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"gatewayIp" : "192.168.1.1"
}
],
"vrrpConfig" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrrpVrid" : "10",
"virtualIp" : "192.168.1.1",
"vrrpPriority" : "10",
"preemptEnable" : false,
"preempt" : "10",
"recoveryDelay" : "10"
}
],
"additional" : {
"producer" : "default",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
},
"dhcpEnable" : false,
"dhcpGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.2.3 Query a Subnet by ID

Typical Scenarios
A subnet needs to be queried by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1170


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query a subnet by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/subnets/subnet/{id}

Table 1-915 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/subnets/subnet/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1171


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-916 QuerySubnetDtoWapper parameters

Param Type Value Range Defaul Description Example


eter t Value

subnet ARRAY For details, see Table Subnet -


_REFER 1-909. information.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"subnet" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1",
"allocPool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"reservePool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGatewayIps" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"gatewayIp" : "192.168.1.1"
}
],
"vrrpConfig" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrrpVrid" : "10",
"virtualIp" : "192.168.1.1",
"vrrpPriority" : "10",
"preemptEnable" : false,
"preempt" : "10",
"recoveryDelay" : "10"
}
],
"additional" : {
"producer" : "default",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1172


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

},
"dhcpEnable" : false,
"dhcpGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.2.4 Update a Subnet by ID

Typical Scenarios
A subnet needs to be updated by ID.

Functions
ID for updating a subnet.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/subnets/subnet/{id}

Table 1-917 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 a subnet. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1173


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-918 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-900. s for
updating
a subnet.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/subnets/subnet/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"subnet" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1",
"allocPool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"reservePool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGatewayIps" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"gatewayIp" : "192.168.1.1"
}
],
"vrrpConfig" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrrpVrid" : "10",
"virtualIp" : "192.168.1.1",
"vrrpPriority" : "10",
"preemptEnable" : false,
"preempt" : "10",
"recoveryDelay" : "10"
}
],
"additional" : {
"producer" : "default",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1174


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}

Response Parameters
Response status code 200: successfully

Table 1-919 SubnetDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet ARRAY For details, see Table Subnet -


_REFER 1-920. information.
ENCE

Table 1-920 SubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

logicS string 0 to 256 - Subnet "DBB702C3-77


witchId characters. broadcast 19-4FE6-
domain. A5AD-3A9C9E2
Reserved 65309"
parameter.

cidr string 1 to 255 - Subnet "192.168.1.0/24


characters. segment. This "
parameter
cannot be
updated if the
subnet is
associated with
a logical
switch.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1175


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

gatew string 1 to 255 - Subnet "192.168.1.1"


ayIp characters. gateway IP
address. This
parameter is
optional when
Logical router
type is set to
Multi-active.
This field
cannot be
updated

allocPo REFER For details, see Table Reserved -


ol ENCE 1-910. parameter.

reserve REFER For details, see Table Reserved -


Pool ENCE 1-911. parameter.

tenantI string 0 to 256 - Tenant. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. If a A5AD-3A9C9E2
new value is 65309"
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

logicR string 0 to 256 - Logical router "DBB702C3-77


outerId characters. ID. This field is 19-4FE6-
mandatory A5AD-3A9C9E2
during the 65309"
creation and
optional during
the update.
This field
cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1176


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Parameter -


Gatew _REFER 1-912. required when
ayIps ENCE the logical
router type is
Multi-active.

vrrpCo ARRAY For details, see Table Parameter -


nfig _REFER 1-913. required when
ENCE the logical
router type is
Multi-active.

additio REFER For details, see Table Additional -


nal ENCE 1-914. information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"subnet" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1",
"allocPool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"reservePool" : {
"ipBegin" : "192.168.1.1",
"ipEnd" : "192.168.1.2"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGatewayIps" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"gatewayIp" : "192.168.1.1"
}
],
"vrrpConfig" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1177


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrrpVrid" : "10",
"virtualIp" : "192.168.1.1",
"vrrpPriority" : "10",
"preemptEnable" : false,
"preempt" : "10",
"recoveryDelay" : "10"
}
],
"additional" : {
"producer" : "default",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.2.5 Delete a Subnet by ID

Typical Scenarios
A subnet needs to be deleted by ID.

Functions
Delete a subnet by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/subnets/subnet/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1178


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-921 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Subnet ID "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/subnets/subnet/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1179


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.3 Logical Switch Management


Logical API description:

1. Query information about all logical switches.

2. Create a logical switch.

3. Query all logical access switches.

4. Query a logical switch by ID.

5. Update a logical switch by ID.

6. Delete a logical switch by ID.

1.9.7.3.1 Create a Logical Switch

Typical Scenarios
A logical switch needs to be created.

Functions
Create a logical switch.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/switchs

Request Parameters

Table 1-922 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-923. s for
creating a
logical
switch.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1180


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-923 LogicSwitchDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

switch Yes ARRAY For details, see Logical switch -


_REFER Table 1-924. information.
ENCE

Table 1-924 LogicSwitchDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - Object ID. This "DBB702C3-77


charac field cannot be 19-4FE6-
ters. updated. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name Yes string 1 to - Object name. "name"


255 This field can
charac be updated.
ters.

descrip No string 0 to - Object "description"


tion 255 description.
charac This field can
ters. be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1181


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicN Yes string 0 to - Logical "DBB702C3-77


etwork 256 network where 19-4FE6-
Id charac the logical A5AD-3A9C9E2
ters. switch is 65309"
located. This
field cannot be
updated.

vni No int32 [0-160 - Logical switch 10


00000] VNI. This field
cannot be
updated.

bd No int32 [0-160 - BD ID of a 10
00000] logical switch.
This field
cannot be
updated.

macAd No string [0-160 - MAC address "00:00:5E:


dress 00000] of a logical 00:01:01"
switch. This
field can be
updated.

tenantI No string 0 to - Tenant. This "DBB702C3-77


d 256 parameter can 19-4FE6-
charac be specified or A5AD-3A9C9E2
ters. not specified in 65309"
the
northbound
API. The
controller
automatically
obtains the
tenant ID from
the logical
network. The
value cannot
be changed.

tenant No string 0 to - Tenant name. "tenantName"


Name 255
charac
ters.

qosId No string 1 to 36 - QoS profile. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1182


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

arpBro No string - - Whether to "default"


adcast enable ARP
StormE broadcast
nable suppression.
The value can
be default,
enable, or
disable. The
value default
indicates that
the value is the
same as that
on the fabric.

arpL2P No boolea - false Whether to false


roxyEn n enable ARP
able gateway proxy
response.

subnet No array< 0-255 - Subnet set, -


s string> items. which is sorted
in sequence.
The first IPv4
subnet in the
array is the
primary IPv4
subnet.

hostInf No boolea - true Host false


oCollec n information
t collection. If
the value is
false, ARP
broadcast
suppression is
forcibly
disabled.

arpDir No boolea - - Whether the false


ectRou n IPv4 routing
teEnab policy
le generated by
VLINK routes is
enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1183


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ndDire No boolea - - Whether the false


ctRout n IPv6 routing
eEnabl policy
e generated by
VLINK routes is
enabled.

vlinkD No ARRAY 0-4500 items. Set of device -


eviceG _REFER For details, see groups where
roups ENCE Table 1-925. VLINK is
enabled. The
VBDIF interface
of the logical
switch in the
selected device
group delivers
IPv4 or IPv6
VLINK
configurations
on demand.
The device
group is from
the fabric of
the VPC to
which the
logical switch
belongs. This
field cannot be
configured
together with
arpDirectRoute
Enable or
ndDirectRouteE
nable.

macRo No boolea - false MAC route false


uteSup n suppression.
press

additio No REFER For details, see Additional -


nal ENCE Table 1-926. information.

stormS No REFER For details, see Storm -


uppres ENCE Table 1-927. suppression
s information
about the
logical switch.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1184


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-925 VlinkDeviceGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes string 0 to - Device group "DBB702C3-77


GroupI 256 ID. 19-4FE6-
d charac A5AD-3A9C9E2
ters. 65309"

device No string 0 to - Device group "deviceGroup1"


Group 256 name.
Name charac
ters.

Table 1-926 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1185


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-927 SwitchStormSuppressDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

broadc No boolea - false Whether to false


astEna n enable the
ble broadcast
function. This
field can be
updated.

multic No boolea - false Whether to false


astEna n enable the
ble multicast
function. This
field can be
updated.

unicast No boolea - false Whether to false


Enable n enable the
unicast
function. This
field can be
updated.

broadc No string 0 to 10000 CBS of "10000"


astCbs 255 broadcast
charac packets. If the
ters. unit is in bytes,
the value
ranges from
10000 to
4294967295. If
the unit is in
kbytes, the
value ranges
from 9 to
4194303. If the
unit is in
mbytes, the
value ranges
from 1 to 4095.
The value can
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1186


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

broadc No string 0 to byte CBS unit of "byte"


astCbs 255 broadcast
Unit charac packets. The
ters. value can be
bytes, Kbytes,
or Mbytes. This
field can be
updated.

broadc No int64 [0-429 100 Broadcast CIR. 100


astCir 49672 The value
95] range is from 0
to 4294967295
in kbit/s, 0 to
4294967 in
Mbit/s, or 0 to
4294 in Gbit/s.
This field can
be updated.

broadc No string 0 to kbps CIR unit of "kbps"


astCirU 255 broadcast
nit charac packets. The
ters. value can be
Gbit/s, Mbit/s,
or kbit/s. This
field can be
updated.

unicast No string 0 to 10000 CBS of unicast "10000"


Cbs 255 packets. The
charac value range is
ters. from 10000 to
4294967295 in
bytes, 9 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1187


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

unicast No string 0 to byte CBS unit of "byte"


CbsUni 255 unicast
t charac packets. The
ters. value can be
bytes, Kbytes,
or Mbytes. This
field can be
updated.

unicast No int64 [0-429 100 Unicast CIR. 100


Cir 49672 The value
95] range is from 0
to 4294967295
in kbit/s, 0 to
4294967 in
Mbit/s, or 0 to
4294 in Gbit/s.
This field can
be updated.

unicast No string 0 to kbps CIR unit of "kbps"


CirUnit 255 unicast
charac packets. The
ters. value can be
Gbit/s, Mbit/s,
or kbit/s. This
field can be
updated.

multic No string 0 to 10000 CBS of "10000"


astCbs 255 multicast
charac packets. The
ters. value range is
from 10000 to
4294967295 in
bytes, 9 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1188


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

multic No string 0 to byte CBS unit of "byte"


astCbs 255 multicast
Unit charac packets. The
ters. value can be
bytes, Kbytes,
or Mbytes. This
field can be
updated.

multic No int64 [0-429 100 Multicast CIR. 100


astCir 49672 The value
95] range is from 0
to 4294967295
in kbit/s, 0 to
4294967 in
Mbit/s, or 0 to
4294 in Gbit/s.
This field can
be updated.

multic No string 0 to kbps CIR unit of "kbps"


astCirU 255 multicast
nit charac packets. The
ters. value can be
Gbit/s, Mbit/s,
or kbit/s. This
field can be
updated.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/switchs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"switch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"bd" : 10,
"macAddress" : "00:00:5E:00:01:01",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1189


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"arpBroadcastStormEnable" : "default",
"arpL2ProxyEnable" : false,
"subnets" : [
"192.168.10.1/24"
],
"hostInfoCollect" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false,
"vlinkDeviceGroups" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroup1"
}
],
"macRouteSuppress" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"stormSuppress" : {
"broadcastEnable" : false,
"multicastEnable" : false,
"unicastEnable" : false,
"broadcastCbs" : "10000",
"broadcastCbsUnit" : "byte",
"broadcastCir" : 100,
"broadcastCirUnit" : "kbps",
"unicastCbs" : "10000",
"unicastCbsUnit" : "byte",
"unicastCir" : 100,
"unicastCirUnit" : "kbps",
"multicastCbs" : "10000",
"multicastCbsUnit" : "byte",
"multicastCir" : 100,
"multicastCirUnit" : "kbps"
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1190


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.3.2 Query Logical Switches

Typical Scenarios
Logical switches need to be queried.

Functions
Query all logical switches.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/switchs

Table 1-928 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

tenantI No string 0 to - Tenant ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1191


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicN No string 0 to - ID of the "DBB702C3-77


etwork 256 logical network 19-4FE6-
Id charac where a logical A5AD-3A9C9E2
ters. switch is 65309"
located.

logicS No string - - Logical switch "logicSwitchNa


witchN name. me"
ame

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/switchs?producer=default&tenantId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicNetworkId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicSwitchName=logicSwitchName&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-929 LogicSwitchPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

switch ARRAY For details, see Table Logical switch -


_REFER 1-930. information.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1192


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

totalN int64 [1-2147483647 - Total number 200


um ] of switches.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-930 QueryLogicSwitchDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Object ID. This "DBB702C3-77


The value must field cannot be 19-4FE6-
meet the updated. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Object name. "name"


characters. This field can
be updated.

descrip string 0 to 255 - Object "description"


tion characters. description.
This field can
be updated.

logicN string 0 to 256 - Logical "DBB702C3-77


etwork characters. network where 19-4FE6-
Id the logical A5AD-3A9C9E2
switch is 65309"
located. This
field cannot be
updated.

vni int32 [0-16000000] - Logical switch 10


VNI. This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1193


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

bd int32 [0-16000000] - BD ID of a 10
logical switch.
This field
cannot be
updated.

macAd string [0-16000000] - MAC address "00:00:5E:


dress of a logical 00:01:01"
switch. This
field can be
updated.

tenantI string 0 to 256 - Tenant. This "DBB702C3-77


d characters. parameter can 19-4FE6-
be specified or A5AD-3A9C9E2
not specified in 65309"
the
northbound
API. The
controller
automatically
obtains the
tenant ID from
the logical
network. The
value cannot
be changed.

tenant string 0 to 255 - Tenant name. "tenantName"


Name characters.

qosId string 1 to 36 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

arpBro string - - Whether to "default"


adcast enable ARP
StormE broadcast
nable suppression.
The value can
be default,
enable, or
disable. The
value default
indicates that
the value is the
same as that
on the fabric.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1194


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

arpL2P boolea - false Whether to false


roxyEn n enable ARP
able gateway proxy
response.

subnet array< 0-255 items. - Subnet set, -


s string> which is sorted
in sequence.
The first IPv4
subnet in the
array is the
primary IPv4
subnet.

hostInf boolea - true Host false


oCollec n information
t collection. If
the value is
false, ARP
broadcast
suppression is
forcibly
disabled.

arpDir boolea - - Whether the false


ectRou n IPv4 routing
teEnab policy
le generated by
VLINK routes is
enabled.

ndDire boolea - - Whether the false


ctRout n IPv6 routing
eEnabl policy
e generated by
VLINK routes is
enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1195


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vlinkD ARRAY 0-4500 items. For details, Set of device -


eviceG _REFER see Table 1-931. groups where
roups ENCE VLINK is
enabled. The
VBDIF interface
of the logical
switch in the
selected device
group delivers
IPv4 or IPv6
VLINK
configurations
on demand.
The device
group is from
the fabric of
the VPC to
which the
logical switch
belongs. This
field cannot be
configured
together with
arpDirectRoute
Enable or
ndDirectRouteE
nable.

macRo boolea - false MAC route false


uteSup n suppression.
press

additio REFER For details, see Table Additional -


nal ENCE 1-932. information.

stormS REFER For details, see Table Storm -


uppres ENCE 1-933. suppression
s information
about the
logical switch.

import array< 0-255 items. - Import RT of 10


RouteT string> the BGP EVPN
argets on a logical
switch. The
value is a
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1196


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

export array< 0-255 items. - Export RT of 10


RouteT string> the BGP EVPN
argets a logical
switch. The
value is a
string.

qosTe string 0 to 256 - QoS template "DBB702C3-77


mplate characters. ID. 19-4FE6-
Id A5AD-3A9C9E2
65309"

Table 1-931 VlinkDeviceGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID. 19-4FE6-
d A5AD-3A9C9E2
65309"

device string 0 to 256 - Device group "deviceGroup1"


Group characters. name.
Name

Table 1-932 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1197


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Table 1-933 SwitchStormSuppressDto parameters


Param Type Value Range Defaul Description Example
eter t Value

broadc boolea - false Whether to false


astEna n enable the
ble broadcast
function. This
field can be
updated.

multic boolea - false Whether to false


astEna n enable the
ble multicast
function. This
field can be
updated.

unicast boolea - false Whether to false


Enable n enable the
unicast
function. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1198


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

broadc string 0 to 255 10000 CBS of "10000"


astCbs characters. broadcast
packets. If the
unit is in bytes,
the value
ranges from
10000 to
4294967295. If
the unit is in
kbytes, the
value ranges
from 9 to
4194303. If the
unit is in
mbytes, the
value ranges
from 1 to 4095.
The value can
be changed.

broadc string 0 to 255 byte CBS unit of "byte"


astCbs characters. broadcast
Unit packets. The
value can be
bytes, Kbytes,
or Mbytes. This
field can be
updated.

broadc int64 [0-4294967295 100 Broadcast CIR. 100


astCir ] The value
range is from 0
to 4294967295
in kbit/s, 0 to
4294967 in
Mbit/s, or 0 to
4294 in Gbit/s.
This field can
be updated.

broadc string 0 to 255 kbps CIR unit of "kbps"


astCirU characters. broadcast
nit packets. The
value can be
Gbit/s, Mbit/s,
or kbit/s. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1199


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

unicast string 0 to 255 10000 CBS of unicast "10000"


Cbs characters. packets. The
value range is
from 10000 to
4294967295 in
bytes, 9 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes. This
field can be
updated.

unicast string 0 to 255 byte CBS unit of "byte"


CbsUni characters. unicast
t packets. The
value can be
bytes, Kbytes,
or Mbytes. This
field can be
updated.

unicast int64 [0-4294967295 100 Unicast CIR. 100


Cir ] The value
range is from 0
to 4294967295
in kbit/s, 0 to
4294967 in
Mbit/s, or 0 to
4294 in Gbit/s.
This field can
be updated.

unicast string 0 to 255 kbps CIR unit of "kbps"


CirUnit characters. unicast
packets. The
value can be
Gbit/s, Mbit/s,
or kbit/s. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1200


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

multic string 0 to 255 10000 CBS of "10000"


astCbs characters. multicast
packets. The
value range is
from 10000 to
4294967295 in
bytes, 9 to
4194303 in
Kbytes, or 1 to
4095 in
Mbytes. This
field can be
updated.

multic string 0 to 255 byte CBS unit of "byte"


astCbs characters. multicast
Unit packets. The
value can be
bytes, Kbytes,
or Mbytes. This
field can be
updated.

multic int64 [0-4294967295 100 Multicast CIR. 100


astCir ] The value
range is from 0
to 4294967295
in kbit/s, 0 to
4294967 in
Mbit/s, or 0 to
4294 in Gbit/s.
This field can
be updated.

multic string 0 to 255 kbps CIR unit of "kbps"


astCirU characters. multicast
nit packets. The
value can be
Gbit/s, Mbit/s,
or kbit/s. This
field can be
updated.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1201


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"switch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"bd" : 10,
"macAddress" : "00:00:5E:00:01:01",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"arpBroadcastStormEnable" : "default",
"arpL2ProxyEnable" : false,
"subnets" : [
"192.168.10.1/24"
],
"hostInfoCollect" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false,
"vlinkDeviceGroups" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroup1"
}
],
"macRouteSuppress" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"stormSuppress" : {
"broadcastEnable" : false,
"multicastEnable" : false,
"unicastEnable" : false,
"broadcastCbs" : "10000",
"broadcastCbsUnit" : "byte",
"broadcastCir" : 100,
"broadcastCirUnit" : "kbps",
"unicastCbs" : "10000",
"unicastCbsUnit" : "byte",
"unicastCir" : 100,
"unicastCirUnit" : "kbps",
"multicastCbs" : "10000",
"multicastCbsUnit" : "byte",
"multicastCir" : 100,
"multicastCirUnit" : "kbps"
},
"importRouteTargets" : 10,
"exportRouteTargets" : 10,
"qosTemplateId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1202


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.3.3 Query Information About All Logical Access Switches

Typical Scenarios
All logical access switches need to be queried.

Functions
Query all logical access switches and fabric information about VPCs to which the
switches belong based on specified conditions.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/switchs/access-switch

Table 1-934 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

name No string - - Logical switch "logicSwitchNa


name. Fuzzy me"
match is
supported.

fabricI No string - - Fabric list. "DBB702C3-77


ds 19-4FE6-
A5AD-3A9C9E2
65309"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1203


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/switchs/access-switch?
name=logicSwitchName&fabricIds=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&pageIndex=1&pageSize=1
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-935 AccessSwitchInfoDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

totalN int64 [1-2147483647 - Total number 200


um ] of switches.

pageIn string 1 to - Page index. "1"


dex 2147483647
characters.

pageSi string 1 to - Page size. "1"


ze 2147483647
characters.

access ARRAY For details, see Table Permission -


Switch _REFER 1-936. information.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1204


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-936 AccessSwitchDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Object ID. This "DBB702C3-77


The value must field cannot be 19-4FE6-
meet the updated. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Object name. "name"


characters. This field can
be updated.

descrip string 0 to 255 - Object "description"


tion characters. description.
This field can
be updated.

logicN string 0 to 256 - Logical "DBB702C3-77


etwork characters. network where 19-4FE6-
Id the logical A5AD-3A9C9E2
switch is 65309"
located. This
field cannot be
updated.

vni int32 [0-16000000] - Logical switch 10


VNI. This field
cannot be
updated.

bd int32 [0-16000000] - BD ID of a 10
logical switch.
This field
cannot be
updated.

macAd string [0-16000000] - MAC address "00:00:5E:


dress of a logical 00:01:01"
switch. This
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1205


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenantI string 0 to 256 - Tenant. This "DBB702C3-77


d characters. parameter can 19-4FE6-
be specified or A5AD-3A9C9E2
not specified in 65309"
the
northbound
API. The
controller
automatically
obtains the
tenant ID from
the logical
network. The
value cannot
be changed.

tenant string 0 to 255 - Tenant name. "tenantName"


Name characters.

qosId string 1 to 36 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

arpBro string - - Whether to "default"


adcast enable ARP
StormE broadcast
nable suppression.
The value can
be default,
enable, or
disable. The
value default
indicates that
the value is the
same as that
on the fabric.

arpL2P boolea - false Whether to false


roxyEn n enable ARP
able gateway proxy
response.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1206


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

subnet array< 0-255 items. - Subnet set, -


s string> which is sorted
in sequence.
The first IPv4
subnet in the
array is the
primary IPv4
subnet.

hostInf boolea - true Host false


oCollec n information
t collection. If
the value is
false, ARP
broadcast
suppression is
forcibly
disabled.

arpDir boolea - - Whether the false


ectRou n IPv4 routing
teEnab policy
le generated by
VLINK routes is
enabled.

ndDire boolea - - Whether the false


ctRout n IPv6 routing
eEnabl policy
e generated by
VLINK routes is
enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1207


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vlinkD ARRAY 0-4500 items. For details, Set of device -


eviceG _REFER see Table 1-931. groups where
roups ENCE VLINK is
enabled. The
VBDIF interface
of the logical
switch in the
selected device
group delivers
IPv4 or IPv6
VLINK
configurations
on demand.
The device
group is from
the fabric of
the VPC to
which the
logical switch
belongs. This
field cannot be
configured
together with
arpDirectRoute
Enable or
ndDirectRouteE
nable.

macRo boolea - false MAC route false


uteSup n suppression.
press

additio REFER For details, see Table Additional -


nal ENCE 1-932. information.

stormS REFER For details, see Table Storm -


uppres ENCE 1-933. suppression
s information
about the
logical switch.

import array< 0-255 items. - Import RT of 10


RouteT string> the BGP EVPN
argets on a logical
switch. The
value is a
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1208


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

export array< 0-255 items. - Export RT of 10


RouteT string> the BGP EVPN
argets a logical
switch. The
value is a
string.

qosTe string 0 to 256 - QoS template "DBB702C3-77


mplate characters. ID. 19-4FE6-
Id A5AD-3A9C9E2
65309"

fabricI array< 0-255 items. - Fabric IDs after ["DBB702C3-7


ds string> filtering. 719-4FE6-
A5AD-3A9C9E2
65309"]

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"totalNum" : 200,
"pageIndex" : "1",
"pageSize" : "1",
"accessSwitch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"bd" : 10,
"macAddress" : "00:00:5E:00:01:01",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"arpBroadcastStormEnable" : "default",
"arpL2ProxyEnable" : false,
"subnets" : [
"192.168.10.1/24"
],
"hostInfoCollect" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1209


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vlinkDeviceGroups" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroup1"
}
],
"macRouteSuppress" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"stormSuppress" : {
"broadcastEnable" : false,
"multicastEnable" : false,
"unicastEnable" : false,
"broadcastCbs" : "10000",
"broadcastCbsUnit" : "byte",
"broadcastCir" : 100,
"broadcastCirUnit" : "kbps",
"unicastCbs" : "10000",
"unicastCbsUnit" : "byte",
"unicastCir" : 100,
"unicastCirUnit" : "kbps",
"multicastCbs" : "10000",
"multicastCbsUnit" : "byte",
"multicastCir" : 100,
"multicastCirUnit" : "kbps"
},
"importRouteTargets" : 10,
"exportRouteTargets" : 10,
"qosTemplateId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.3.4 Query a Logical Switch by ID

Typical Scenarios
A logical switch needs to be queried by ID.

Functions
Query a logical switch by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1210


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/switchs/switch/{id}

Table 1-937 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/switchs/switch/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-938 QueryLogicSwitchDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

switch ARRAY For details, see Table Logical switch -


_REFER 1-930. information.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1211


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"switch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"bd" : 10,
"macAddress" : "00:00:5E:00:01:01",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"arpBroadcastStormEnable" : "default",
"arpL2ProxyEnable" : false,
"subnets" : [
"192.168.10.1/24"
],
"hostInfoCollect" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false,
"vlinkDeviceGroups" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroup1"
}
],
"macRouteSuppress" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"stormSuppress" : {
"broadcastEnable" : false,
"multicastEnable" : false,
"unicastEnable" : false,
"broadcastCbs" : "10000",
"broadcastCbsUnit" : "byte",
"broadcastCir" : 100,
"broadcastCirUnit" : "kbps",
"unicastCbs" : "10000",
"unicastCbsUnit" : "byte",
"unicastCir" : 100,
"unicastCirUnit" : "kbps",
"multicastCbs" : "10000",
"multicastCbsUnit" : "byte",
"multicastCir" : 100,
"multicastCirUnit" : "kbps"
},
"importRouteTargets" : 10,
"exportRouteTargets" : 10,
"qosTemplateId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1212


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.3.5 Update a Logical Switch by ID

Typical Scenarios
A logical switch needs to be updated by ID.

Functions
ID for updating a logical switch.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/switchs/switch/{id}

Table 1-939 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 a logical 19-4FE6-
charac switch. A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1213


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-940 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-923. s for
updating
a logical
switch.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/switchs/switch/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"switch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"bd" : 10,
"macAddress" : "00:00:5E:00:01:01",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"arpBroadcastStormEnable" : "default",
"arpL2ProxyEnable" : false,
"subnets" : [
"192.168.10.1/24"
],
"hostInfoCollect" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false,
"vlinkDeviceGroups" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroup1"
}
],
"macRouteSuppress" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"stormSuppress" : {
"broadcastEnable" : false,
"multicastEnable" : false,
"unicastEnable" : false,
"broadcastCbs" : "10000",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1214


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"broadcastCbsUnit" : "byte",
"broadcastCir" : 100,
"broadcastCirUnit" : "kbps",
"unicastCbs" : "10000",
"unicastCbsUnit" : "byte",
"unicastCir" : 100,
"unicastCirUnit" : "kbps",
"multicastCbs" : "10000",
"multicastCbsUnit" : "byte",
"multicastCir" : 100,
"multicastCirUnit" : "kbps"
}
}
]
}

Response Parameters
Response status code 200: successfully

Table 1-941 LogicSwitchDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

switch ARRAY For details, see Table Logical switch -


_REFER 1-942. information.
ENCE

Table 1-942 LogicSwitchDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 36 characters. - Object ID. This "DBB702C3-77


The value must field cannot be 19-4FE6-
meet the updated. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Object name. "name"


characters. This field can
be updated.

descrip string 0 to 255 - Object "description"


tion characters. description.
This field can
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1215


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicN string 0 to 256 - Logical "DBB702C3-77


etwork characters. network where 19-4FE6-
Id the logical A5AD-3A9C9E2
switch is 65309"
located. This
field cannot be
updated.

vni int32 [0-16000000] - Logical switch 10


VNI. This field
cannot be
updated.

bd int32 [0-16000000] - BD ID of a 10
logical switch.
This field
cannot be
updated.

macAd string [0-16000000] - MAC address "00:00:5E:


dress of a logical 00:01:01"
switch. This
field can be
updated.

tenantI string 0 to 256 - Tenant. This "DBB702C3-77


d characters. parameter can 19-4FE6-
be specified or A5AD-3A9C9E2
not specified in 65309"
the
northbound
API. The
controller
automatically
obtains the
tenant ID from
the logical
network. The
value cannot
be changed.

tenant string 0 to 255 - Tenant name. "tenantName"


Name characters.

qosId string 1 to 36 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1216


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

arpBro string - - Whether to "default"


adcast enable ARP
StormE broadcast
nable suppression.
The value can
be default,
enable, or
disable. The
value default
indicates that
the value is the
same as that
on the fabric.

arpL2P boolea - false Whether to false


roxyEn n enable ARP
able gateway proxy
response.

subnet array< 0-255 items. - Subnet set, -


s string> which is sorted
in sequence.
The first IPv4
subnet in the
array is the
primary IPv4
subnet.

hostInf boolea - true Host false


oCollec n information
t collection. If
the value is
false, ARP
broadcast
suppression is
forcibly
disabled.

arpDir boolea - - Whether the false


ectRou n IPv4 routing
teEnab policy
le generated by
VLINK routes is
enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1217


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

ndDire boolea - - Whether the false


ctRout n IPv6 routing
eEnabl policy
e generated by
VLINK routes is
enabled.

vlinkD ARRAY 0-4500 items. For details, Set of device -


eviceG _REFER see Table 1-931. groups where
roups ENCE VLINK is
enabled. The
VBDIF interface
of the logical
switch in the
selected device
group delivers
IPv4 or IPv6
VLINK
configurations
on demand.
The device
group is from
the fabric of
the VPC to
which the
logical switch
belongs. This
field cannot be
configured
together with
arpDirectRoute
Enable or
ndDirectRouteE
nable.

macRo boolea - false MAC route false


uteSup n suppression.
press

additio REFER For details, see Table Additional -


nal ENCE 1-932. information.

stormS REFER For details, see Table Storm -


uppres ENCE 1-933. suppression
s information
about the
logical switch.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1218


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"switch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"bd" : 10,
"macAddress" : "00:00:5E:00:01:01",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"arpBroadcastStormEnable" : "default",
"arpL2ProxyEnable" : false,
"subnets" : [
"192.168.10.1/24"
],
"hostInfoCollect" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false,
"vlinkDeviceGroups" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroup1"
}
],
"macRouteSuppress" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"stormSuppress" : {
"broadcastEnable" : false,
"multicastEnable" : false,
"unicastEnable" : false,
"broadcastCbs" : "10000",
"broadcastCbsUnit" : "byte",
"broadcastCir" : 100,
"broadcastCirUnit" : "kbps",
"unicastCbs" : "10000",
"unicastCbsUnit" : "byte",
"unicastCir" : 100,
"unicastCirUnit" : "kbps",
"multicastCbs" : "10000",
"multicastCbsUnit" : "byte",
"multicastCir" : 100,
"multicastCirUnit" : "kbps"
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1219


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.3.6 Delete a Logical Switch by ID

Typical Scenarios
A logical switch needs to be deleted by ID.

Functions
Delete a logical switch by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/switchs/switch/{id}

Table 1-943 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a logical 19-4FE6-
charac switch. A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/switchs/switch/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1220


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.4 Logical Port Management


APIs for adding, deleting, updating, and querying logical ports

1.9.7.4.1 Logical Port Management

Typical Scenarios
A logical port needs to be created.

Functions
Create a logical port.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1221


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/ports

Request Parameters

Table 1-944 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Logical -


NCE 1-945. port
configurat
ion.

Table 1-945 PortDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

port Yes ARRAY For details, see Logical port -


_REFER Table 1-946. information
ENCE

Table 1-946 PortDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

name Yes string 1 to - Object name. "logicPortNam


255 This field can e"
charac be updated.
ters.

qosId No string 0 to - QoS profile. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1222


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

descrip No string 0 to - Object "description"


tion 242 description.
charac This field can
ters. be updated.

unshar No boolea - false Non-shared false


ePortV n VLAN.
lan

status No string 1 to - Port status. The "up"


255 value can be
charac up or down.
ters.

logicS Yes string 0 to - Logical switch "DBB702C3-77


witchId 256 to which a 19-4FE6-
charac logical port A5AD-3A9C9E2
ters. belongs. This 65309"
field cannot be
updated.

logicS No string 1 to - Name of the "logicSwitchNa


witchN 255 logical switch me"
ame charac to which the
ters. logical port
belongs.

metaD No string - - Metadata "metaData"


ata information of
a logical port.
This parameter
is reserved.

accessI Yes REFER For details, see Additional -


nfo ENCE Table 1-947. information.

tenantI No string 0 to - Tenant ID. This "DBB702C3-77


d 256 parameter is 19-4FE6-
charac automatically A5AD-3A9C9E2
ters. obtained by 65309"
the controller.
This field
cannot be
updated.

additio No REFER For details, see Additional -


nal ENCE Table 1-950. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1223


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI No string 0 to - Fabric to which "DBB702C3-77


d 256 the logical port 19-4FE6-
charac belongs. This A5AD-3A9C9E2
ters. field cannot be 65309"
modified.

Table 1-947 AccessInfoDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

mode Yes string 1 to UNI Port mode, "UNI"


255 which can be
charac UNI or NNI.
ters. This field
cannot be
updated.

type Yes string 1 to DOT1Q Logical port "DOT1Q"


255 type, which can
charac be DOT1Q,
ters. DEFAULT,
UNTAG, or
QINQ. This
field cannot be
updated.

vlan No int32 [2-409 - Access VLAN 10


4] ID. This
parameter is
mandatory
when the
access type is
dot1q. This
field can be
updated.

qinq No REFER For details, see QinQ -


ENCE Table 1-948. information.

locatio Yes ARRAY For details, see Device port -


n _REFER Table 1-949. information.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1224


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

subint No int32 [1-409 - Number of an 10


erface 4] access sub-
Numb interface. This
er field cannot be
modified.

Table 1-948 QinqDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

innerVi Yes int32 [2-409 - Start VLAN ID 10


dBegin 4] of the inner
VLAN tag for
QinQ. This field
can be
updated.

innerVi No int32 [2-409 - End VLAN ID 10


dEnd 4] of the inner
VLAN tag for
QinQ. This field
can be
updated.

outerV Yes int32 [2-409 - Start VLAN ID 10


idBegi 4] of the outer
n VLAN tag for
QinQ. This field
can be
updated.

outerV No int32 [2-409 - End VLAN ID 10


idEnd 4] of the outer
VLAN tag for
QinQ. This field
can be
updated.

rewrite Yes string 1 to POPDO Rewrite action "POPDOUBLE"


Action 255 UBLE of QinQ. The
charac value can be
ters. POPDOUBLE or
PASSTHROUG
H. The value
cannot be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1225


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-949 DevicePortDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device No string 0 to - Device group "DBB702C3-77


GroupI 256 ID of a physical 19-4FE6-
d charac device. This A5AD-3A9C9E2
ters. field cannot be 65309"
updated.

device No string 1 to - Device group "CE_45"


Group 255 name of a
Name charac physical device.
ters. The value
cannot be
changed.

deviceI No string 0 to - Specified "DBB702C3-77


d 256 physical device. 19-4FE6-
charac Either the A5AD-3A9C9E2
ters. device ID or 65309"
device
management
IP address can
be set. This
field cannot be
updated.

device No string 1 to - Name of a "CE_45"


Name 255 physical device.
charac The value
ters. cannot be
changed.

portId No string 0 to - Specified "DBB702C3-77


256 physical port. 19-4FE6-
charac Either the port A5AD-3A9C9E2
ters. ID or port 65309"
name can be
set. This field
cannot be
updated

portNa No string 0 to - Port name. "10GE1/0/1"


me 255 Either the port
charac ID or port
ters. name can be
set. This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1226


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to - Device "192.168.1.1"


p 255 management
charac IP address.
ters. Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

Table 1-950 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/ports HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1227


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicPortName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "description",
"unsharePortVlan" : false,
"status" : "up",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicSwitchName",
"metaData" : "metaData",
"accessInfo" : {
"mode" : "UNI",
"type" : "DOT1Q",
"vlan" : 10,
"qinq" : {
"innerVidBegin" : 10,
"innerVidEnd" : 10,
"outerVidBegin" : 10,
"outerVidEnd" : 10,
"rewriteAction" : "POPDOUBLE"
},
"location" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/1",
"deviceIp" : "192.168.1.1"
}
],
"subinterfaceNumber" : 10
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1228


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 204 No Content


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.4.2 Query All Logical Ports

Typical Scenarios
All logical ports need to be queried.

Functions
Query all logical ports.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/ports

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1229


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-951 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

logicS No string 0 to - Logical switch "DBB702C3-77


witchId 256 to which a 19-4FE6-
charac logical port A5AD-3A9C9E2
ters. belongs. 65309"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ports?producer=default&logicSwitchId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1230


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

Table 1-952 PortPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

port ARRAY For details, see Table Logical port -


_REFER 1-953. information
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of logical ports.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-953 PortDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

name string 1 to 255 - Object name. "logicPortNam


characters. This field can e"
be updated.

qosId string 0 to 256 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

descrip string 0 to 242 - Object "description"


tion characters. description.
This field can
be updated.

unshar boolea - false Non-shared false


ePortV n VLAN.
lan

status string 1 to 255 - Port status. The "up"


characters. value can be
up or down.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1231


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicS string 0 to 256 - Logical switch "DBB702C3-77


witchId characters. to which a 19-4FE6-
logical port A5AD-3A9C9E2
belongs. This 65309"
field cannot be
updated.

logicS string 1 to 255 - Name of the "logicSwitchNa


witchN characters. logical switch me"
ame to which the
logical port
belongs.

metaD string - - Metadata "metaData"


ata information of
a logical port.
This parameter
is reserved.

accessI REFER For details, see Table Additional -


nfo ENCE 1-954. information.

tenantI string 0 to 256 - Tenant ID. This "DBB702C3-77


d characters. parameter is 19-4FE6-
automatically A5AD-3A9C9E2
obtained by 65309"
the controller.
This field
cannot be
updated.

additio REFER For details, see Table Additional -


nal ENCE 1-957. information.

fabricI string 0 to 256 - Fabric to which "DBB702C3-77


d characters. the logical port 19-4FE6-
belongs. This A5AD-3A9C9E2
field cannot be 65309"
modified.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1232


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-954 AccessInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

mode string 1 to 255 UNI Port mode, "UNI"


characters. which can be
UNI or NNI.
This field
cannot be
updated.

type string 1 to 255 DOT1Q Logical port "DOT1Q"


characters. type, which can
be DOT1Q,
DEFAULT,
UNTAG, or
QINQ. This
field cannot be
updated.

vlan int32 [2-4094] - Access VLAN 10


ID. This
parameter is
mandatory
when the
access type is
dot1q. This
field can be
updated.

qinq REFER For details, see Table QinQ -


ENCE 1-955. information.

locatio ARRAY For details, see Table Device port -


n _REFER 1-956. information.
ENCE

subint int32 [1-4094] - Number of an 10


erface access sub-
Numb interface. This
er field cannot be
modified.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1233


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-955 QinqDto parameters


Param Type Value Range Defaul Description Example
eter t Value

innerVi int32 [2-4094] - Start VLAN ID 10


dBegin of the inner
VLAN tag for
QinQ. This field
can be
updated.

innerVi int32 [2-4094] - End VLAN ID 10


dEnd of the inner
VLAN tag for
QinQ. This field
can be
updated.

outerV int32 [2-4094] - Start VLAN ID 10


idBegi of the outer
n VLAN tag for
QinQ. This field
can be
updated.

outerV int32 [2-4094] - End VLAN ID 10


idEnd of the outer
VLAN tag for
QinQ. This field
can be
updated.

rewrite string 1 to 255 POPDO Rewrite action "POPDOUBLE"


Action characters. UBLE of QinQ. The
value can be
POPDOUBLE or
PASSTHROUG
H. The value
cannot be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1234


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-956 DevicePortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID of a physical 19-4FE6-
d device. This A5AD-3A9C9E2
field cannot be 65309"
updated.

device string 1 to 255 - Device group "CE_45"


Group characters. name of a
Name physical device.
The value
cannot be
changed.

deviceI string 0 to 256 - Specified "DBB702C3-77


d characters. physical device. 19-4FE6-
Either the A5AD-3A9C9E2
device ID or 65309"
device
management
IP address can
be set. This
field cannot be
updated.

device string 1 to 255 - Name of a "CE_45"


Name characters. physical device.
The value
cannot be
changed.

portId string 0 to 256 - Specified "DBB702C3-77


characters. physical port. 19-4FE6-
Either the port A5AD-3A9C9E2
ID or port 65309"
name can be
set. This field
cannot be
updated

portNa string 0 to 255 - Port name. "10GE1/0/1"


me characters. Either the port
ID or port
name can be
set. This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1235


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

deviceI string 0 to 255 - Device "192.168.1.1"


p characters. management
IP address.
Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

Table 1-957 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1236


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicPortName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "description",
"unsharePortVlan" : false,
"status" : "up",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicSwitchName",
"metaData" : "metaData",
"accessInfo" : {
"mode" : "UNI",
"type" : "DOT1Q",
"vlan" : 10,
"qinq" : {
"innerVidBegin" : 10,
"innerVidEnd" : 10,
"outerVidBegin" : 10,
"outerVidEnd" : 10,
"rewriteAction" : "POPDOUBLE"
},
"location" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/1",
"deviceIp" : "192.168.1.1"
}
],
"subinterfaceNumber" : 10
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1237


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.4.3 Query Logical Port Information Based on the End Port ID List

Typical Scenarios
Logical port information needs to be queried based on the user port ID list.

Functions
The list of specified logical ports needs to be queried.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/ports/endport-ids

Request Parameters

Table 1-958 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table End port -


NCE 1-959. ID list
used for
query.

Table 1-959 queryLogicPortByEndPortIdsDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

endPor Yes array< Each - End port ID list. -


tIds string> item
has 0
to 256
charac
ters.

pageIn No int32 [1-214 - Page index. 1


dex 74836
47]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1238


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No int32 [1-214 - Page size. 1


ze 74836
47]

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/ports/endport-ids HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"endPortIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"pageIndex" : 1,
"pageSize" : 1
}

Response Parameters
Response status code 200: successfully
PortPagedDtoWrapper parameters, For details, see Table 1-952.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicPortName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "description",
"unsharePortVlan" : false,
"status" : "up",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicSwitchName",
"metaData" : "metaData",
"accessInfo" : {
"mode" : "UNI",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1239


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"type" : "DOT1Q",
"vlan" : 10,
"qinq" : {
"innerVidBegin" : 10,
"innerVidEnd" : 10,
"outerVidBegin" : 10,
"outerVidEnd" : 10,
"rewriteAction" : "POPDOUBLE"
},
"location" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/1",
"deviceIp" : "192.168.1.1"
}
],
"subinterfaceNumber" : 10
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.4.4 Query a Logical Port by ID

Typical Scenarios
A logical port needs to be queried by ID.

Functions
Query a logical port by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 1000 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1240


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/ports/port/{id}

Table 1-960 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for querying "DBB702C3-77


256 a fabric. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ports/port/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-961 PortDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

port ARRAY For details, see Table Logical port -


_REFER 1-953. information
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1241


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicPortName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "description",
"unsharePortVlan" : false,
"status" : "up",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicSwitchName",
"metaData" : "metaData",
"accessInfo" : {
"mode" : "UNI",
"type" : "DOT1Q",
"vlan" : 10,
"qinq" : {
"innerVidBegin" : 10,
"innerVidEnd" : 10,
"outerVidBegin" : 10,
"outerVidEnd" : 10,
"rewriteAction" : "POPDOUBLE"
},
"location" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/1",
"deviceIp" : "192.168.1.1"
}
],
"subinterfaceNumber" : 10
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1242


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.4.5 Update a Logical Port by ID

Typical Scenarios
Update a Logical Port by ID.

Functions
Update a logical port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/ports/port/{id}

Table 1-962 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a DHCP group. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters

Table 1-963 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Logical -


NCE 1-945. port
configurat
ion.

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1243


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

PUT /controller/dc/v3/logicnetwork/ports/port/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicPortName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "description",
"unsharePortVlan" : false,
"status" : "up",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicSwitchName",
"metaData" : "metaData",
"accessInfo" : {
"mode" : "UNI",
"type" : "DOT1Q",
"vlan" : 10,
"qinq" : {
"innerVidBegin" : 10,
"innerVidEnd" : 10,
"outerVidBegin" : 10,
"outerVidEnd" : 10,
"rewriteAction" : "POPDOUBLE"
},
"location" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/1",
"deviceIp" : "192.168.1.1"
}
],
"subinterfaceNumber" : 10
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response Parameters
Response status code 200: successfully
PortDtoWrapper parameters, For details, see Table 1-961.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1244


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicPortName",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"description" : "description",
"unsharePortVlan" : false,
"status" : "up",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicSwitchName",
"metaData" : "metaData",
"accessInfo" : {
"mode" : "UNI",
"type" : "DOT1Q",
"vlan" : 10,
"qinq" : {
"innerVidBegin" : 10,
"innerVidEnd" : 10,
"outerVidBegin" : 10,
"outerVidEnd" : 10,
"rewriteAction" : "POPDOUBLE"
},
"location" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceName" : "CE_45",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "10GE1/0/1",
"deviceIp" : "192.168.1.1"
}
],
"subinterfaceNumber" : 10
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1245


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.4.6 Update a Logical Port by ID

Typical Scenarios
A logical port needs to be deleted by ID.

Functions
Delete a logical port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/ports/port/{id}

Table 1-964 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a DHCP group. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/ports/port/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1246


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.5 Logical Port Group Management


Logical port group API description:

1. Create, update, and delete a logical port group.

1.9.7.5.1 Create a Logical Port Group

Typical Scenarios
A logical port group needs to be created.

Functions
Create a logical port group.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/logicportgroups

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1247


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-965 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Logical -


NCE 1-966. port
group
informati
on.

Table 1-966 LogicPortGroupsWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicPo No ARRAY For details, see Set of logical -


rtGrou _REFER Table 1-967. port group
ps ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1248


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-967 LogicPortGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to 36 - Logical port "DBB702C3-77


charac group ID. 19-4FE6-
ters. A5AD-3A9C9E2
36 65301"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1249


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicS Yes string 0 to 36 - ID of the "DBB702C3-77


witchId charac logical switch 19-4FE6-
ters. to which a A5AD-3A9C9E2
36 logical port 65301"
charac belongs.
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

access No string 1 to Dot1q Access type. "Dot1q"


Type 255 The value can
charac be Untag,
ters. Dot1q, or
PvlanSeparate.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1250


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vlan No array<i 0-2 - VLAN of a -


nteger items. logical port
> Item group. This
value parameter is
range: not required
[0-409 when the
4] access type is
Untag. This
parameter is
set to one
VLAN when
the access type
is Dot1q. This
parameter is
set to active
and standby
VLANs when
the access type
is
PvlanSeparate.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1251


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

portGr No string 0 to 36 - ID of the port "DBB702C3-77


oupId charac group 19-4FE6-
ters. associated with A5AD-3A9C9E2
36 a logical port 65301"
charac group. The port
ters. group ID is
The preferentially
value used.
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

portGr No string 1 to - Name of the "thePortGroup"


oupNa 128 port group
me charac associated with
ters. a logical port
group. The port
group ID is
preferentially
used.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/logicportgroups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1252


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicPortGroups" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"accessType" : "Dot1q",
"vlan" : [
10
],
"portGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"portGroupName" : "thePortGroup"
}
]
}

Response Parameters
Response status code 200: successfully

Table 1-968 LogicPortGroupsOutputWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

reques string 0 to 36 - Request ID, "DBB702C3-77


tId characters. 36 which can be 19-4FE6-
characters. The used to query A5AD-3A9C9E2
value must southbound 6530e"
meet the operation logs.
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

taskIds array< 0-255 items. - List of task IDs. -


string> Each item has 0
to 36
characters.

ids array< 0-255 items. - Set of logical -


string> Each item has 0 port group IDs.
to 36
characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1253


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"requestId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530e",
"taskIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E26530f"
],
"ids" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E26530f"
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.5.2 Update a Logical Port Group

Typical Scenarios
A logical port group needs to be updated.

Functions
Update a logical port group.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/logicportgroups/logicportgroup/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1254


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-969 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to 36 - ID, by which a "DBB702C3-77


charac logical port 19-4FE6-
ters. group is A5AD-3A9C9E2
36 updated. 65301"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-970 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Logical -


NCE 1-971. port
group
informati
on.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1255


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-971 LogicPortGroupWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicPo No REFER For details, see Logical port -


rtGrou ENCE Table 1-967. group
p information.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/logicportgroups/logicportgroup/DBB702C3-7719-4FE6-
A5AD-3A9C9E265301 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicPortGroup" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"accessType" : "Dot1q",
"vlan" : [
10
],
"portGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"portGroupName" : "thePortGroup"
}
}

Response Parameters
Response status code 200: successfully

Table 1-972 LogicPortGroupWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

logicPo REFER For details, see Table Logical port -


rtGrou ENCE 1-973. group
p information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1256


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-973 LogicPortGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 36 - Logical port "DBB702C3-77


characters. 36 group ID. 19-4FE6-
characters. The A5AD-3A9C9E2
value must 65301"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

logicS string 0 to 36 - ID of the "DBB702C3-77


witchId characters. 36 logical switch 19-4FE6-
characters. The to which a A5AD-3A9C9E2
value must logical port 65301"
meet the belongs.
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

access string 1 to 255 Dot1q Access type. "Dot1q"


Type characters. The value can
be Untag,
Dot1q, or
PvlanSeparate.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1257


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vlan array<i 0-2 items. Item - VLAN of a -


nteger value range: logical port
> [0-4094] group. This
parameter is
not required
when the
access type is
Untag. This
parameter is
set to one
VLAN when
the access type
is Dot1q. This
parameter is
set to active
and standby
VLANs when
the access type
is
PvlanSeparate.

portGr string 0 to 36 - ID of the port "DBB702C3-77


oupId characters. 36 group 19-4FE6-
characters. The associated with A5AD-3A9C9E2
value must a logical port 65301"
meet the group. The port
following group ID is
regular preferentially
expression: used.
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

portGr string 1 to 128 - Name of the "thePortGroup"


oupNa characters. port group
me associated with
a logical port
group. The port
group ID is
preferentially
used.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1258


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"logicPortGroup" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"accessType" : "Dot1q",
"vlan" : [
10
],
"portGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265301",
"portGroupName" : "thePortGroup"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.5.3 Delete a Logical Port Group

Typical Scenarios
A logical port group needs to be deleted.

Functions
Delete a logical port group.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/logicportgroup/batchdelete

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1259


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-974 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Set of -


NCE 1-975. logical
port
group IDs.

Table 1-975 LogicPortGroupIdsWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ids No array< 0-255 - Set of logical -


string> items. port group IDs.
Each
item
has 0
to 36
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/logicportgroup/batchdelete HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"ids" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265301"
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1260


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6 Logical Router Management


Logical router management API description:

1. Query the logical router list.

2. Create a logical router.

3. Query a logical router by ID.

4. Update a logical router by ID.

5. Delete a logical router by ID.

6. Configure the route of a logical router.

7. Delete the route of a logical router.

8. Configure BGP for a logical router.

9. Delete BGP of a logical router.

10. Switch active and standby fabrics of logical routers in batches.

1.9.7.6.1 Create a Logical Router

Typical Scenarios
A logical router needs to be created.

Functions
Create a logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1261


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/routers

Request Parameters

Table 1-976 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Input -


er ENCE Table 1-977. parameters for
creating a
logical router.

Table 1-977 LogicRouterDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router Yes REFER For details, see Logical router -


ENCE Table 1-978. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1262


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-978 LogicRoutersDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - Logical router "DBB702C3-77


charac ID. This field 19-4FE6-
ters. cannot be A5AD-3A9C9E2
The updated. 65311"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 1 to - Logical router "logicRouterNa


255 name. me"
charac
ters.

descrip No string 0 to - Description. "description"


tion 255
charac
ters.

qosId No string 0 to - QoS profile. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicN No string 0 to - Logical "DBB702C3-77


etwork 256 network where 19-4FE6-
Id charac the logical A5AD-3A9C9E2
ters. router is 65309"
located.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1263


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routerL No ARRAY For details, see Router location -


ocatio _REFER Table 1-979. information.
ns ENCE When type is
set to Transit
or Connect,
this field
cannot be set.
Otherwise, this
field is
mandatory.
This field is
optional during
the update.

type No string 0 to - Logical router "Normal"


255 type. The value
charac can be Normal,
ters. Nfvi,
MultiActive,
Transit, or
Connect. This
field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

vni No int32 [1-160 - Online/offline 10


00000] status of a
device. The
value cannot
be changed.

vrfNa No string 1 to 31 - VRF name. This "vrfName"


me charac field cannot be
ters. updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1264


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

connec No string 0 to - Interconnection "Nfvi"


tMode 255 mode. The
charac value is of the
ters. enumerated
type and can
be south-north,
east-west, all-
static, or
external-
gateway-group.

extern No array< - - Address ["192.168.1.0/2


alCidr string> accessible to 4"]
the connected
VPC through
the transit
router.

interna No array< - - This parameter ["192.168.2.0/2


lCidr string> is required only 4"]
when the
transit router
needs to
connect to an
external
gateway or
another transit
router. It
defines the
access egress
of the transit
router.

maxLo No int32 [1-128 - Number of 10


adBala ] load-balancing
nce routes. The
priority of this
field is higher
than that of
the global
configuration.

additio No REFER For details, see Additional -


nal ENCE Table 1-981. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1265


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-979 RouterLocationDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

fabricI No string 1 to - Fabric ID. This "DBB702C3-77


d 255 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

fabricR No string - - Fabric role. The "master"


ole value can be
master or
backup. This
parameter
cannot be
updated.

fabric No string 0 to - Fabric name. "fabricName"


Name 255 This field
charac cannot be
ters. updated.

device No ARRAY For details, see Device group. -


Group _REFER Table 1-980. Devices in the
ENCE list must
belong to the
same device
group. If the
logical router
type is Normal,
the value of
this parameter
must be null.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1266


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-980 DeviceGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to - Device ID. "DBB702C3-77


d 256 Either the 19-4FE6-
charac device group A5AD-3A9C9E2
ters. ID or the 65309"
device
management
IP address
must be
specified. If a
device group is
selected, enter
only one device
ID. Only the
egress gateway
is displayed for
the query.

deviceI No string 0 to - Device "192.168.1.1"


p 255 management
charac IP address.
ters. Either the
device group
ID or the
device
management
IP address
must be
specified. If a
device group is
selected, enter
only one device
ID. Only the
egress gateway
is displayed for
the query.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1267


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-981 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/routers HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1268


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.2 Query the Logical Router List

Typical Scenarios
All logical routers need to be queried.

Functions
Query all logical routers.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1269


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers

Table 1-982 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

type No string 0 to 36 - Type of a "transit"


charac logical router.
ters. The value is of
the
enumerated
type and can
be Normal,
Nfvi,
MultiActive,
Transit, or
Connect.

tenantI No string 0 to - Tenant ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicN No string 0 to - Logical "DBB702C3-77


etwork 256 network where 19-4FE6-
Id charac the logical A5AD-3A9C9E2
ters. router is 65309"
located.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1270


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI No string - - Fabric list. "DBB702C3-77


ds 19-4FE6-
A5AD-3A9C9E2
65309"

name No string 0 to - Name of a "RouterName"


255 logical router.
charac
ters.

transit No string - - Logical router "false"


Conne information
ct used for
communication
that needs to
be queried (in
MDC
scenarios).

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers?producer=default&type=transit&tenantId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicNetworkId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&fabricIds=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&name=RouterName&transitConnect=false&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1271


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-983 LogicRoutersPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

router ARRAY For details, see Table Logical router -


_REFER 1-984. information.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of queried
routers.

pageIn int32 [1-2147483647 - Current page 1


dex ] number.

pageSi int32 [1-2147483647 - Page size. 10


ze ]

Table 1-984 QueryLogicRouterDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Logical router "DBB702C3-77


The value must ID. This field 19-4FE6-
meet the cannot be A5AD-3A9C9E2
following updated. 65311"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Logical router "logicRouterNa


characters. name. me"

descrip string 0 to 255 - Description. "description"


tion characters.

qosId string 0 to 256 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1272


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicN string 0 to 256 - Logical "DBB702C3-77


etwork characters. network where 19-4FE6-
Id the logical A5AD-3A9C9E2
router is 65309"
located.

routerL ARRAY For details, see Table Router location -


ocatio _REFER 1-985. information.
ns ENCE When type is
set to Transit
or Connect,
this field
cannot be set.
Otherwise, this
field is
mandatory.
This field is
optional during
the update.

type string 0 to 255 - Logical router "Normal"


characters. type. The value
can be Normal,
Nfvi,
MultiActive,
Transit, or
Connect. This
field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

vni int32 [1-16000000] - Online/offline 10


status of a
device. The
value cannot
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1273


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vrfNa string 1 to 31 - VRF name. This "vrfName"


me characters. field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

connec string 0 to 255 - Interconnection "Nfvi"


tMode characters. mode. The
value is of the
enumerated
type and can
be south-north,
east-west, all-
static, or
external-
gateway-group.

extern array< - - Address ["192.168.1.0/2


alCidr string> accessible to 4"]
the connected
VPC through
the transit
router.

interna array< - - This parameter ["192.168.2.0/2


lCidr string> is required only 4"]
when the
transit router
needs to
connect to an
external
gateway or
another transit
router. It
defines the
access egress
of the transit
router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1274


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

maxLo int32 [1-128] - Number of 10


adBala load-balancing
nce routes. The
priority of this
field is higher
than that of
the global
configuration.

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

tenantI string 0 to 256 - Tenant ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

tenant string 0 to 255 - Tenant name. "tenantName"


Name characters.

egress string 0 to 255 - Egress "DBB702C3-77


Gatew characters. gateway. The 19-4FE6-
ayDev value consists A5AD-3A9C9E2
GrpId of the IDs of 65309"
the selected
devices or
device groups.

import array< 0-255 items. - Import route -


RouteT string> target
argets extended
community
attribute of
BGP EVPN on a
logical router.

export array< 0-255 items. - Export route -


RouteT string> target
argets extended
community
attribute of
BGP EVPN on a
logical router.

routes ARRAY For details, see Table Static route. -


_REFER 1-988.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1275


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

subnet ARRAY For details, see Table Subnet -


s _REFER 1-989. information.
ENCE

bgp REFER For details, see Table BGP -


ENCE 1-990. information.

routerL REFER For details, see Table Location -


ocatio ENCE 1-985. information.
n

Table 1-985 RouterLocationDto parameters


Param Type Value Range Defaul Description Example
eter t Value

fabricI string 1 to 255 - Fabric ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

fabricR string - - Fabric role. The "master"


ole value can be
master or
backup. This
parameter
cannot be
updated.

fabric string 0 to 255 - Fabric name. "fabricName"


Name characters. This field
cannot be
updated.

device ARRAY For details, see Table Device group. -


Group _REFER 1-986. Devices in the
ENCE list must
belong to the
same device
group. If the
logical router
type is Normal,
the value of
this parameter
must be null.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1276


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-986 DeviceGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. Either the 19-4FE6-
device group A5AD-3A9C9E2
ID or the 65309"
device
management
IP address
must be
specified. If a
device group is
selected, enter
only one device
ID. Only the
egress gateway
is displayed for
the query.

deviceI string 0 to 255 - Device "192.168.1.1"


p characters. management
IP address.
Either the
device group
ID or the
device
management
IP address
must be
specified. If a
device group is
selected, enter
only one device
ID. Only the
egress gateway
is displayed for
the query.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1277


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-987 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Table 1-988 StaticRouteDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - Static route ID. "DBB702C3-77


The value 19-4FE6-
cannot be A5AD-3A9C9E2
changed. 65309"

routeS string 0 to 256 - Route set ID. "DBB702C3-77


etId characters. The value 19-4FE6-
cannot be A5AD-3A9C9E2
changed. 65309"

addres string 1 to 255 - Address type. "Ipv4"


sFamil characters. The value can
yType be IPv4 or IPv6.

destina string 1 to 255 - Prefix of a "10.10.10.0/24"


tion characters. static route, in
CIDR format.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1278


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

nextho string 0 to 255 - Next-hop IP "10.1.1.1"


pIp characters. address of a
static route.

nextho string 0 to 255 - Next-hop VRF "vrf1"


pVrf characters. name of the
static route.
This parameter
is used when a
static route
crosses VRFs.
Either this
parameter or
nexthopLogicR
outerId must
be specified.
This parameter
is valid only
when source is
set to
SystemVas. The
value cannot
be changed.

nextho string 0 to 36 - Next-hop "DBB702C3-77


pLogic characters. router ID of 19-4FE6-
Router the static A5AD-3A9C9E2
Id route. This 65309"
parameter is
used when a
static route
crosses VRFs.
Either this
parameter or
nexthopVrf
must be
specified. This
parameter is
valid only
when source is
set to
SystemVas. The
value cannot
be changed.

prefere int32 [1-255] - Static route 10


nce priority. The
value can be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1279


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

nextho string 1 to 255 Ip Next hop type. "Ip"


pType characters. The value is of
the
enumerated
type and can
be Ip, EndPort,
or Indirect. The
value cannot
be changed.

trackTy string 0 to 255 - For normal "NQA"


pe characters. routes, this
parameter can
be set to None
or NQA; for
end port
routes, this
parameter can
be set to None,
AutoTrack
(automatic
one-armed),
ManualShared
Bfd (shared),
DoubleAutoTra
ck (automatic
two-armed), or
ManualSession
Bfd (specified
BFD session),
or left blank.
The value
cannot be
changed.

trackId string 0 to 255 - Track ID. The "DBB702C3-77


characters. value cannot 19-4FE6-
be changed A5AD-3A9C9E2
when 65309"
trackType is set
to NQA.

endPor string 0 to 36 - Port ID. The "DBB702C3-77


tId characters. value cannot 19-4FE6-
be changed. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1280


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

endPor string 0 to 255 - Port IP address. "10.1.1.1"


tIp characters. The value
cannot be
changed.

endPor string 0 to 255 - Association "endPortTrack


tTrack characters. name. The Name"
Name value cannot
be changed.

trackC boolea - false Association false


heck n detection
function. The
value cannot
be changed.

device string 0 to 36 - Device group "DBB702C3-77


GroupI characters. ID. Either this 19-4FE6-
d parameter or A5AD-3A9C9E2
the device 65309"
group name
must be
specified. The
value cannot
be changed.

device string 0 to 255 - Device group "deviceGroupN


Group characters. name. Either ame"
Name this parameter
or the device
group ID must
be specified.
The value
cannot be
changed.

ecmp boolea - false Whether ECMP false


n is enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1281


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

routeD string 0 to 36 - Position where "DeviceGroup"


epolyP characters. the static route
os is deployed.
The value is of
the
enumerated
type and can
be
DeviceGroup or
EndPort. The
value cannot
be changed.

loopba string 0 to 36 - Loopback "DBB702C3-77


ckId characters. interface ID, 19-4FE6-
which cannot A5AD-3A9C9E2
be updated. 65309"

deviceI array< - - Device ID. -


ds string>

Table 1-989 RouterSubnetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Subnet ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

cidr string 1 to 255 - Subnet "192.168.1.0/24


characters. segment. The "
value can be
changed.

gatew string 1 to 255 - Subnet "192.168.1.1"


ayIp characters. gateway IP
address. The
value can be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1282


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-990 BgpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

addres string - - Address type. "vpnv4-


sFamil The value is of instance"
yType the
enumerated
type and can
be Vpnv4 or
Vpnv6. The
value cannot
be changed.

import boolea - false Whether direct false


Route n routes are
Direct imported. This
parameter
takes effect
only in
centralized
gateway
scenarios. The
value can be
changed.

import boolea - false Whether static false


RouteS n routes are
tatic imported. This
parameter
takes effect
only in
centralized
gateway
scenarios. The
value can be
changed.

import array< 0-255 items. - Import -


Netwo string> network. This
rks parameter
takes effect
only in
centralized
gateway
scenarios. The
value can be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1283


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

aggreg array< 0-255 items. - Aggregate -


ateRou string> route. This
tes parameter
takes effect
only in
centralized
gateway
scenarios. The
value can be
changed.

bgpPe ARRAY For details, see Table BGP -


er _REFER 1-991. configuration
ENCE on a logical
router.

Table 1-991 BgpPeerDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - BGP peer ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

bgpRo string 0 to 256 - BGP route ID. "DBB702C3-77


uteId characters. The value 19-4FE6-
cannot be A5AD-3A9C9E2
changed. 65309"

addres string 1 to 255 - Address type. "Vpnv4"


sFamil characters. The value is of
yType the
enumerated
type and can
be Vpnv4 or
Vpnv6.

descrip string 0 to 255 - Description "description"


tion characters.

peerIp string 1 to 255 - Peer IP "192.168.1.1"


characters. address.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1284


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peerAs string 1 to 11 - Peer AS "10"


characters. number. The
value is in the
range from 1
to 4294967295
or is in the
format m.n, in
which m is in
the range from
1 to 65535,
and n is in the
range from 0
to 65535.

bgpPe string - Direct Peer type. The "Direct"


erType value is of the
enumerated
type and can
be Direct or
Indirect. The
value cannot
be changed.

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID. Either 19-4FE6-
d device group A5AD-3A9C9E2
ID or name 65309"
must be
specified. This
parameter is
mandatory
when the
selected logical
router is bound
to a distributed
fabric.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1285


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device string 0 to 255 - Device group "deviceGroupN


Group characters. name. Either ame"
Name device group
ID or name
must be
specified. This
parameter is
mandatory
when the
selected logical
router is bound
to a distributed
fabric.

sourceI ARRAY For details, see Table This parameter -


ps _REFER 1-992. is mandatory
ENCE when the
selected logical
router is of the
Nfvi type and
the peer device
is of the
Indirect type.

logicIn string 0 to 256 - ID of the "DBB702C3-77


terface characters. associated 19-4FE6-
Id interconnection A5AD-3A9C9E2
interface. 65309"

keepali int32 [0-21845] - Keepalive time. 1


veTime The value is an
integer that
ranges from 0
to 21845, in
seconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1286


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

holdTi int32 [0-65535] - Hold time. The 3


me value is an
integer that
can be 0 or
ranges from 3
to 65535, in
seconds.
Setting the
hold time to be
longer than
20s is
recommended.
If the hold time
is shorter than
20s, the BGP
peer session
may be
interrupted.

bfd boolea - false Whether false


n association
with BFD is
enabled. This
parameter can
be set only
when the peer
device is of the
Direct type.

allowA boolea - false Permit AS false


sLoop n loops.

default boolea - false Whether to false


Route n advertise the
Adverti default route.
se

import string 0 to 200 - Whether to "routePolicy"


RouteP characters. import the
olicy routing policy.

export string 0 to 200 - Whether to "routePolicy"


RouteP characters. export the
olicy routing policy.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1287


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

loopba string 0 to 200 - Loopback "DBB702C3-77


ckId characters. interface ID. 19-4FE6-
This parameter A5AD-3A9C9E2
takes effect for 65309"
indirect BGP
routes.

loopba string 0 to 255 - Loopback "loopbackNam


ckNam characters. interface name. e"
e This parameter
takes effect for
indirect BGP
routes.

sourceI string 0 to 256 - Source "DBB702C3-77


fId characters. interface ID. 19-4FE6-
A5AD-3A9C9E2
65309"

sourceI int32 [0-2] - Source 0


fType interface type,
which is
mandatory and
cannot be
changed. The
value is an
integer. The
value can be 0
(logical
switch), 1
(loopback
interface), or 2
(interconnectio
n interface).

ebgpM boolea - - Whether multi- false


ultiHo n hop EBGP is
p configured.

minTxI int32 [50-1000] - Interval at 1000


nterval which BFD
packets are
sent. The value
is in the range
from 50 to
1000, in
milliseconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1288


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

minRxI int32 [50-1000] - Interval at 1000


nterval which BFD
packets are
received. The
value is in the
range from 50
to 1000, in
milliseconds.

detect int32 [3-50] - Local detection 3


Multipl time multiplier.
ier The value is an
integer in the
range from 3
to 50.

fakeAs string 1 to 11 - Pseudo AS "10"


Num characters. number. The
value is in the
range from 1
to 4294967295
or is in the
format m.n, in
which m is in
the range from
1 to 65535,
and n is in the
range from 0
to 65535.

dualAs boolea - false The value true false


n indicates that
the EBGP peer
can use both
the real AS
number or a
pseudo AS
number to
establish a
connection
with the local
end.

auth REFER For details, see Table Authentication -


ENCE 1-993. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1289


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-992 SourceIpConfigDto parameters

Param Type Value Range Defaul Description Example


eter t Value

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

loopba string 0 to 255 - IP address of a "192.168.3.3"


ckIp characters. loopback
interface.

Table 1-993 LogicRouterAuthDto parameters

Param Type Value Range Defaul Description Example


eter t Value

authTy string 1 to 255 None Authentication "None"


pe characters. type. The value
is of the
enumerated
type and can
be Keychain,
Password, or
None.

keycha string 1 to 47 - Keychain "keychainNam


inNam characters. name. e"
e

passw string - Cipher Password "CipherText"


ordTyp Text character string
e type. The value
is of the
enumerated
type and can
be CipherText
or
EncryptedText.

passw string 1 to 255 - This field may "passwordText"


ordTex characters. contain
t sensitive or
personal data.
Keep it secure.
Password
character
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1290


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"router" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"egressGatewayDevGrpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"importRouteTargets" : [
"0:5006"
],
"exportRouteTargets" : [
"0:5006"
],
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",
"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1291


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"trackType" : "NQA",
"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],
"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1"
}
],
"bgp" : {
"addressFamilyType" : "vpnv4-instance",
"importRouteDirect" : false,
"importRouteStatic" : false,
"importNetworks" : [
"192.168.1.0/24"
],
"aggregateRoutes" : [
"192.168.1.0/24"
],
"bgpPeer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackIp" : "192.168.3.3"
}
],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",
"dualAs" : false,
"auth" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1292


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"authType" : "None",
"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
]
},
"routerLocation" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.3 Query the Logical Router List

Typical Scenarios
Basic information about all logical routers needs to be queried.

Functions
Query all logical routers.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/basicinfo

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1293


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-994 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR No string 0 to - Logical router "DBB702C3-77


outerId 6044 ID. 19-4FE6-
s charac A5AD-3A9C9E2
ters. 65309;DBB702
C3-7719-4FE6-
A5AD-3A9C9E2
65311"

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/basicinfo?logicRouterIds=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309;DBB702C3-7719-4FE6-A5AD-3A9C9E265311&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-995 AcLogicRouterDtoListWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

router ARRAY For details, see Table Logical router -


_REFER 1-996. information.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1294


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

totalN int64 [1-2147483647 - Total number 200


um ] of queried
routers.

pageIn int32 [1-2147483647 - Current page 1


dex ] number.

pageSi int32 [1-2147483647 - Page size. 10


ze ]

Table 1-996 TenantLogicRoutersDto parameters

Param Type Value Range Defaul Description Example


eter t Value

router REFER For details, see Table Logical router -


ENCE 1-997. information.

tenantI string 0 to 256 - Tenant ID. -


d characters.

tenant string 0 to 255 - Tenant name. -


Name characters.

Table 1-997 LogicRoutersDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 36 characters. - Logical router "DBB702C3-77


The value must ID. This field 19-4FE6-
meet the cannot be A5AD-3A9C9E2
following updated. 65311"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Logical router "logicRouterNa


characters. name. me"

descrip string 0 to 255 - Description. "description"


tion characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1295


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

qosId string 0 to 256 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

logicN string 0 to 256 - Logical "DBB702C3-77


etwork characters. network where 19-4FE6-
Id the logical A5AD-3A9C9E2
router is 65309"
located.

routerL ARRAY For details, see Table Router location -


ocatio _REFER 1-985. information.
ns ENCE When type is
set to Transit
or Connect,
this field
cannot be set.
Otherwise, this
field is
mandatory.
This field is
optional during
the update.

type string 0 to 255 - Logical router "Normal"


characters. type. The value
can be Normal,
Nfvi,
MultiActive,
Transit, or
Connect. This
field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

vni int32 [1-16000000] - Online/offline 10


status of a
device. The
value cannot
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1296


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vrfNa string 1 to 31 - VRF name. This "vrfName"


me characters. field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

connec string 0 to 255 - Interconnection "Nfvi"


tMode characters. mode. The
value is of the
enumerated
type and can
be south-north,
east-west, all-
static, or
external-
gateway-group.

extern array< - - Address ["192.168.1.0/2


alCidr string> accessible to 4"]
the connected
VPC through
the transit
router.

interna array< - - This parameter ["192.168.2.0/2


lCidr string> is required only 4"]
when the
transit router
needs to
connect to an
external
gateway or
another transit
router. It
defines the
access egress
of the transit
router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1297


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

maxLo int32 [1-128] - Number of 10


adBala load-balancing
nce routes. The
priority of this
field is higher
than that of
the global
configuration.

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"router" : [
{
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1298


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.4 Query Information About All Logical Routers

Typical Scenarios
All logical routers need to be queried.

Functions
Query all logical routers based on specified conditions.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/access-router

Table 1-998 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

name No string - - Name of a "logicRouterNa


logical router. me"
Fuzzy match is
supported.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1299


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

fabricI No string - - Fabric list. "DBB702C3-77


ds 19-4FE6-
A5AD-3A9C9E2
65309;DBB702
C3-7719-4FE6-
A5AD-3A9C9E2
65310"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/access-router?
name=logicRouterName&fabricIds=DBB702C3-7719-4FE6-A5AD-3A9C9E265309;DBB702C3-7719-4FE6-
A5AD-3A9C9E265310&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-999 AccessRouterInfoDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

totalN int64 [1-2147483647 - Total number 200


um ] of queried
routers.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1300


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

pageIn string 1 to - Page index. "1"


dex 2147483647
characters.

pageSi string 1 to - Page size. "1"


ze 2147483647
characters.

access ARRAY For details, see Table Logical router -


Router _REFER 1-1000. information.
ENCE

Table 1-1000 AccessRouterDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - Logical router "DBB702C3-77


The value must ID. This field 19-4FE6-
meet the cannot be A5AD-3A9C9E2
following updated. 65311"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 1 to 255 - Logical router "logicRouterNa


characters. name. me"

descrip string 0 to 255 - Description. "description"


tion characters.

qosId string 0 to 256 - QoS profile. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

logicN string 0 to 256 - Logical "DBB702C3-77


etwork characters. network where 19-4FE6-
Id the logical A5AD-3A9C9E2
router is 65309"
located.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1301


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

routerL ARRAY For details, see Table Router location -


ocatio _REFER 1-985. information.
ns ENCE When type is
set to Transit
or Connect,
this field
cannot be set.
Otherwise, this
field is
mandatory.
This field is
optional during
the update.

type string 0 to 255 - Logical router "Normal"


characters. type. The value
can be Normal,
Nfvi,
MultiActive,
Transit, or
Connect. This
field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

vni int32 [1-16000000] - Online/offline 10


status of a
device. The
value cannot
be changed.

vrfNa string 1 to 31 - VRF name. This "vrfName"


me characters. field cannot be
updated. If a
new value is
entered during
the update, the
value used
during the
creation is
retained and is
not updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1302


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

connec string 0 to 255 - Interconnection "Nfvi"


tMode characters. mode. The
value is of the
enumerated
type and can
be south-north,
east-west, all-
static, or
external-
gateway-group.

extern array< - - Address ["192.168.1.0/2


alCidr string> accessible to 4"]
the connected
VPC through
the transit
router.

interna array< - - This parameter ["192.168.2.0/2


lCidr string> is required only 4"]
when the
transit router
needs to
connect to an
external
gateway or
another transit
router. It
defines the
access egress
of the transit
router.

maxLo int32 [1-128] - Number of 10


adBala load-balancing
nce routes. The
priority of this
field is higher
than that of
the global
configuration.

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

tenantI string 0 to 256 - Tenant ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1303


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenant string 0 to 255 - Tenant name. "tenantName"


Name characters.

egress string 0 to 255 - Egress "DBB702C3-77


Gatew characters. gateway. The 19-4FE6-
ayDev value consists A5AD-3A9C9E2
GrpId of the IDs of 65309"
the selected
devices or
device groups.

import array< 0-255 items. - Import route -


RouteT string> target
argets extended
community
attribute of
BGP EVPN on a
logical router.

export array< 0-255 items. - Export route -


RouteT string> target
argets extended
community
attribute of
BGP EVPN on a
logical router.

routes ARRAY For details, see Table Static route. -


_REFER 1-988.
ENCE

subnet ARRAY For details, see Table Subnet -


s _REFER 1-989. information.
ENCE

bgp REFER For details, see Table BGP -


ENCE 1-990. information.

routerL REFER For details, see Table Location -


ocatio ENCE 1-985. information.
n

fabricI array< 0-255 items. - List of fabric ["DBB702C3-7


ds string> IDs after 719-4FE6-
filtering. A5AD-3A9C9E2
65309"]

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1304


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"totalNum" : 200,
"pageIndex" : "1",
"pageSize" : "1",
"accessRouter" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"egressGatewayDevGrpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"importRouteTargets" : [
"0:5006"
],
"exportRouteTargets" : [
"0:5006"
],
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",
"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",
"trackType" : "NQA",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1305


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],
"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1"
}
],
"bgp" : {
"addressFamilyType" : "vpnv4-instance",
"importRouteDirect" : false,
"importRouteStatic" : false,
"importNetworks" : [
"192.168.1.0/24"
],
"aggregateRoutes" : [
"192.168.1.0/24"
],
"bgpPeer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackIp" : "192.168.3.3"
}
],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",
"dualAs" : false,
"auth" : {
"authType" : "None",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1306


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
]
},
"routerLocation" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
},
"fabricIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.5 Query Information About a Logical Router

Typical Scenarios
A logical router needs to be queried.

Functions
Query a logical router by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 1000 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1307


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1001 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1002 LogicRoutersDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

router ARRAY For details, see Table Logical router -


_REFER 1-984. information.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1308


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"router" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantName" : "tenantName",
"egressGatewayDevGrpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"importRouteTargets" : [
"0:5006"
],
"exportRouteTargets" : [
"0:5006"
],
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",
"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",
"trackType" : "NQA",
"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1309


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"subnets" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"cidr" : "192.168.1.0/24",
"gatewayIp" : "192.168.1.1"
}
],
"bgp" : {
"addressFamilyType" : "vpnv4-instance",
"importRouteDirect" : false,
"importRouteStatic" : false,
"importNetworks" : [
"192.168.1.0/24"
],
"aggregateRoutes" : [
"192.168.1.0/24"
],
"bgpPeer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackIp" : "192.168.3.3"
}
],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",
"dualAs" : false,
"auth" : {
"authType" : "None",
"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
]
},
"routerLocation" : {
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1310


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
]
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.6 Update a Logical Router

Typical Scenarios
A logical router needs to be updated.

Functions
Update a logical router by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/{id}

Table 1-1003 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID used for "DBB702C3-77


256 query. The 19-4FE6-
charac value cannot A5AD-3A9C9E2
ters. be changed. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1311


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1004 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Input -


er ENCE Table 1-977. parameters for
updating a
logical router.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1312


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1005 LogicRouterDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

router REFER For details, see Table Logical router -


ENCE 1-997. information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"router" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265311",
"name" : "logicRouterName",
"description" : "description",
"qosId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerLocations" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricRole" : "master",
"fabricName" : "fabricName",
"deviceGroup" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
]
}
],
"type" : "Normal",
"vni" : 10,
"vrfName" : "vrfName",
"connectMode" : "Nfvi",
"externalCidr" : ["192.168.1.0/24"],
"internalCidr" : ["192.168.2.0/24"],
"maxLoadBalance" : 10,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1313


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.7 Delete a Logical Router

Typical Scenarios
A logical router needs to be deleted.

Functions
Delete a logical router by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/routers/router/{id}

Table 1-1006 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 an observing 19-4FE6-
charac port. A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1314


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1007 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309?
producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1315


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.8 Add Static Route Information to a Logical Router

Typical Scenarios
Static route information needs to be added to a logical router.

Functions
Add one or more static routes to a logical router. If multiple routes need to be
added, add them in one transaction. If any route fails to be added, all routes will
be rolled back.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/route-sets

Table 1-1008 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID of a logical "DBB702C3-77


256 router to which 19-4FE6-
charac static routes A5AD-3A9C9E2
ters. belong. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1316


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1009 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routes Yes REFER For details, see Static route -


ENCE Table 1-1010. configuration,
which is of the
input
parameter
model class.

Table 1-1010 LogicRouterRoutesDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routeId No string 1 to - Static route "DBB702C3-77


128 group ID, 19-4FE6-
charac which cannot A5AD-3A9C9E2
ters. be the same as 65309"
an existing
logical router
ID.

logicR No string 0 to 36 - Logical router "DBB702C3-77


outerId charac ID. This 19-4FE6-
ters. parameter is A5AD-3A9C9E2
used only for 65309"
querying the
return value.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1317


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

source No string 0 to - Source. The "SystemVas"


255 value is of the
charac enumerated
ters. type and can
be Manual or
SystemVas. The
default value is
SystemVas. The
static route
groups of the
Manual type
are displayed
on the page
(recommended
), while the
static route
groups of the
SystemVas
type are not
displayed.

routes Yes ARRAY For details, see Static route. -


_REFER Table 1-1011.
ENCE

additio No REFER For details, see Additional -


nal ENCE Table 1-981. information.

Table 1-1011 StaticRouteDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string - - Static route ID. "DBB702C3-77


The value 19-4FE6-
cannot be A5AD-3A9C9E2
changed. 65309"

routeS No string 0 to - Route set ID. "DBB702C3-77


etId 256 The value 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. changed. 65309"

addres No string 1 to - Address type. "Ipv4"


sFamil 255 The value can
yType charac be IPv4 or IPv6.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1318


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

destina Yes string 1 to - Prefix of a "10.10.10.0/24"


tion 255 static route, in
charac CIDR format.
ters.

nextho No string 0 to - Next-hop IP "10.1.1.1"


pIp 255 address of a
charac static route.
ters.

nextho No string 0 to - Next-hop VRF "vrf1"


pVrf 255 name of the
charac static route.
ters. This parameter
is used when a
static route
crosses VRFs.
Either this
parameter or
nexthopLogicR
outerId must
be specified.
This parameter
is valid only
when source is
set to
SystemVas. The
value cannot
be changed.

nextho No string 0 to 36 - Next-hop "DBB702C3-77


pLogic charac router ID of 19-4FE6-
Router ters. the static A5AD-3A9C9E2
Id route. This 65309"
parameter is
used when a
static route
crosses VRFs.
Either this
parameter or
nexthopVrf
must be
specified. This
parameter is
valid only
when source is
set to
SystemVas. The
value cannot
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1319


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

prefere No int32 [1-255 - Static route 10


nce ] priority. The
value can be
changed.

nextho No string 1 to Ip Next hop type. "Ip"


pType 255 The value is of
charac the
ters. enumerated
type and can
be Ip, EndPort,
or Indirect. The
value cannot
be changed.

trackTy No string 0 to - For normal "NQA"


pe 255 routes, this
charac parameter can
ters. be set to None
or NQA; for
end port
routes, this
parameter can
be set to None,
AutoTrack
(automatic
one-armed),
ManualShared
Bfd (shared),
DoubleAutoTra
ck (automatic
two-armed), or
ManualSession
Bfd (specified
BFD session),
or left blank.
The value
cannot be
changed.

trackId No string 0 to - Track ID. The "DBB702C3-77


255 value cannot 19-4FE6-
charac be changed A5AD-3A9C9E2
ters. when 65309"
trackType is set
to NQA.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1320


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

endPor No string 0 to 36 - Port ID. The "DBB702C3-77


tId charac value cannot 19-4FE6-
ters. be changed. A5AD-3A9C9E2
65309"

endPor No string 0 to - Port IP address. "10.1.1.1"


tIp 255 The value
charac cannot be
ters. changed.

endPor No string 0 to - Association "endPortTrack


tTrack 255 name. The Name"
Name charac value cannot
ters. be changed.

trackC No boolea - false Association false


heck n detection
function. The
value cannot
be changed.

device No string 0 to 36 - Device group "DBB702C3-77


GroupI charac ID. Either this 19-4FE6-
d ters. parameter or A5AD-3A9C9E2
the device 65309"
group name
must be
specified. The
value cannot
be changed.

device No string 0 to - Device group "deviceGroupN


Group 255 name. Either ame"
Name charac this parameter
ters. or the device
group ID must
be specified.
The value
cannot be
changed.

ecmp No boolea - false Whether ECMP false


n is enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1321


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routeD No string 0 to 36 - Position where "DeviceGroup"


epolyP charac the static route
os ters. is deployed.
The value is of
the
enumerated
type and can
be
DeviceGroup or
EndPort. The
value cannot
be changed.

loopba No string 0 to 36 - Loopback "DBB702C3-77


ckId charac interface ID, 19-4FE6-
ters. which cannot A5AD-3A9C9E2
be updated. 65309"

deviceI No array< - - Device ID. -


ds string>

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/route-sets
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"source" : "SystemVas",
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",
"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",
"trackType" : "NQA",
"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1322


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.9 Update Static Routes on a Logical Router

Typical Scenarios
Static route information needs to be added to a logical router.

Functions
Update one or more static routes on a logical router. If multiple routes need to be
updated, update them in one transaction. If any route fails to be updated, all
routes will be rolled back.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1323


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/route-sets

Table 1-1012 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID of a logical "DBB702C3-77


256 router to which 19-4FE6-
charac static routes A5AD-3A9C9E2
ters. belong. 65309"

Request Parameters

Table 1-1013 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routes Yes REFER For details, see Static route -


ENCE Table 1-1010. configuration,
which is of the
input
parameter
model class.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/route-sets
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"source" : "SystemVas",
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1324


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",
"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",
"trackType" : "NQA",
"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1325


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.6.10 Query Static Route Information on a Logical Router

Typical Scenarios
Static route information on a logical router needs to be queried.

Functions
Query static route information on a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/route-sets/route-set/{id}

Table 1-1014 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to - Route set ID. "DBB702C3-77


128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/route-sets/route-set/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1326


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1015 LogicRouterRoutesDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

routeId string 1 to 128 - Static route "DBB702C3-77


characters. group ID, 19-4FE6-
which cannot A5AD-3A9C9E2
be the same as 65309"
an existing
logical router
ID.

logicR string 0 to 36 - Logical router "DBB702C3-77


outerId characters. ID. This 19-4FE6-
parameter is A5AD-3A9C9E2
used only for 65309"
querying the
return value.

source string 0 to 255 - Source. The "SystemVas"


characters. value is of the
enumerated
type and can
be Manual or
SystemVas. The
default value is
SystemVas. The
static route
groups of the
Manual type
are displayed
on the page
(recommended
), while the
static route
groups of the
SystemVas
type are not
displayed.

routes ARRAY For details, see Table Static route. -


_REFER 1-988.
ENCE

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1327


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"source" : "SystemVas",
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",
"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",
"trackType" : "NQA",
"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.11 Delete Static Route Information from a Logical Router

Typical Scenarios
Static route information needs to be deleted from a logical router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1328


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Delete one or more static routes from a logical router. If multiple routes need to
be deleted, delete them in one transaction. If any route fails to be deleted, all
routes will be rolled back.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/routers/router/route-sets/route-set/{id}

Table 1-1016 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - Route set ID. "DBB702C3-77


128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Table 1-1017 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1329


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/routers/router/route-sets/route-set/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309?producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.12 Query Static Routes in Batches Based on Specified Conditions

Typical Scenarios
Static routes need to be queried in batches based on specified conditions.

Functions
Query static routes in batches based on specified conditions.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1330


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/route-sets

Table 1-1018 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR No string 0 to 36 - Logical router "DBB702C3-77


outerId charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

destina No array< - - Destination -


tions string> address, in
array format.

sourceI No array< - - Source address, -


ps string> in array
format.

nextho No int32 - - Type of the 0


pType next hop. This
parameter is
optional. The
value can be 0
(IP address), 1
(port ID), or 2
(instance
name).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1331


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/route-sets?logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&producer=default&nexthopType=0 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1019 LogicRouterRoutesListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

routes ARRAY For details, see Table Logical router -


_REFER 1-1015. information.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routes" : [
{
"routeId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"source" : "SystemVas",
"routes" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routeSetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Ipv4",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1332


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"destination" : "10.10.10.0/24",
"nexthopIp" : "10.1.1.1",
"nexthopVrf" : "vrf1",
"nexthopLogicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"preference" : 10,
"nexthopType" : "Ip",
"trackType" : "NQA",
"trackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "10.1.1.1",
"endPortTrackName" : "endPortTrackName",
"trackCheck" : false,
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"ecmp" : false,
"routeDepolyPos" : "DeviceGroup",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.13 Add BGP Peers to a Logical Router

Typical Scenarios
One or more BGP peers need to be added to a logical router.

Functions
Add one or more BGP peers to a logical router. If multiple BGP peers need to be
added, add them in one transaction. If any BGP peer fails to be added, all BGP
peers will be rolled back.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1333


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/bgp-peers

Table 1-1020 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID of the "DBB702C3-77


256 logical router 19-4FE6-
charac to which the A5AD-3A9C9E2
ters. BGP peer 65309"
belongs.

Request Parameters

Table 1-1021 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

bgpPe Yes REFER For details, see BGP peer -


ers ENCE Table 1-1022. configuration,
which is of the
input
parameter
model class.

Table 1-1022 LogicRouterBgpPeerDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routeId No string 1 to - BGP group ID, "FFF702C3-771


128 which cannot 9-4FE6-
charac be the same as A5AD-3A9C9E2
ters. an existing 65309"
logical router
ID.

logicR No string 0 to 36 - Logical router "DBB702C3-77


outerId charac ID. This 19-4FE6-
ters. parameter is A5AD-3A9C9E2
used only for 65309"
querying the
return value.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1334


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

bgpPe Yes ARRAY For details, see BGP peer -


ers _REFER Table 1-1023. information.
ENCE

additio No REFER For details, see Additional -


nal ENCE Table 1-981. information.

Table 1-1023 BgpPeerDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - BGP peer ID. "DBB702C3-77


256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

bgpRo No string 0 to - BGP route ID. "DBB702C3-77


uteId 256 The value 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. changed. 65309"

addres Yes string 1 to - Address type. "Vpnv4"


sFamil 255 The value is of
yType charac the
ters. enumerated
type and can
be Vpnv4 or
Vpnv6.

descrip No string 0 to - Description "description"


tion 255
charac
ters.

peerIp Yes string 1 to - Peer IP "192.168.1.1"


255 address.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1335


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peerAs Yes string 1 to 11 - Peer AS "10"


charac number. The
ters. value is in the
range from 1
to 4294967295
or is in the
format m.n, in
which m is in
the range from
1 to 65535,
and n is in the
range from 0
to 65535.

bgpPe No string - Direct Peer type. The "Direct"


erType value is of the
enumerated
type and can
be Direct or
Indirect. The
value cannot
be changed.

device No string 0 to - Device group "DBB702C3-77


GroupI 256 ID. Either 19-4FE6-
d charac device group A5AD-3A9C9E2
ters. ID or name 65309"
must be
specified. This
parameter is
mandatory
when the
selected logical
router is bound
to a distributed
fabric.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1336


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No string 0 to - Device group "deviceGroupN


Group 255 name. Either ame"
Name charac device group
ters. ID or name
must be
specified. This
parameter is
mandatory
when the
selected logical
router is bound
to a distributed
fabric.

sourceI No ARRAY For details, see This parameter -


ps _REFER Table 1-1024. is mandatory
ENCE when the
selected logical
router is of the
Nfvi type and
the peer device
is of the
Indirect type.

logicIn No string 0 to - ID of the "DBB702C3-77


terface 256 associated 19-4FE6-
Id charac interconnection A5AD-3A9C9E2
ters. interface. 65309"

keepali No int32 [0-218 - Keepalive time. 1


veTime 45] The value is an
integer that
ranges from 0
to 21845, in
seconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1337


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

holdTi No int32 [0-655 - Hold time. The 3


me 35] value is an
integer that
can be 0 or
ranges from 3
to 65535, in
seconds.
Setting the
hold time to be
longer than
20s is
recommended.
If the hold time
is shorter than
20s, the BGP
peer session
may be
interrupted.

bfd No boolea - false Whether false


n association
with BFD is
enabled. This
parameter can
be set only
when the peer
device is of the
Direct type.

allowA No boolea - false Permit AS false


sLoop n loops.

default No boolea - false Whether to false


Route n advertise the
Adverti default route.
se

import No string 0 to - Whether to "routePolicy"


RouteP 200 import the
olicy charac routing policy.
ters.

export No string 0 to - Whether to "routePolicy"


RouteP 200 export the
olicy charac routing policy.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1338


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

loopba No string 0 to - Loopback "DBB702C3-77


ckId 200 interface ID. 19-4FE6-
charac This parameter A5AD-3A9C9E2
ters. takes effect for 65309"
indirect BGP
routes.

loopba No string 0 to - Loopback "loopbackNam


ckNam 255 interface name. e"
e charac This parameter
ters. takes effect for
indirect BGP
routes.

sourceI No string 0 to - Source "DBB702C3-77


fId 256 interface ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

sourceI No int32 [0-2] - Source 0


fType interface type,
which is
mandatory and
cannot be
changed. The
value is an
integer. The
value can be 0
(logical
switch), 1
(loopback
interface), or 2
(interconnectio
n interface).

ebgpM No boolea - - Whether multi- false


ultiHo n hop EBGP is
p configured.

minTxI No int32 [50-10 - Interval at 1000


nterval 00] which BFD
packets are
sent. The value
is in the range
from 50 to
1000, in
milliseconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1339


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

minRxI No int32 [50-10 - Interval at 1000


nterval 00] which BFD
packets are
received. The
value is in the
range from 50
to 1000, in
milliseconds.

detect No int32 [3-50] - Local detection 3


Multipl time multiplier.
ier The value is an
integer in the
range from 3
to 50.

fakeAs No string 1 to 11 - Pseudo AS "10"


Num charac number. The
ters. value is in the
range from 1
to 4294967295
or is in the
format m.n, in
which m is in
the range from
1 to 65535,
and n is in the
range from 0
to 65535.

dualAs No boolea - false The value true false


n indicates that
the EBGP peer
can use both
the real AS
number or a
pseudo AS
number to
establish a
connection
with the local
end.

auth No REFER For details, see Authentication -


ENCE Table 1-1025. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1340


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1024 SourceIpConfigDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to - Device ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

loopba No string 0 to - IP address of a "192.168.3.3"


ckIp 255 loopback
charac interface.
ters.

Table 1-1025 LogicRouterAuthDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

authTy Yes string 1 to None Authentication "None"


pe 255 type. The value
charac is of the
ters. enumerated
type and can
be Keychain,
Password, or
None.

keycha No string 1 to 47 - Keychain "keychainNam


inNam charac name. e"
e ters.

passw No string - Cipher Password "CipherText"


ordTyp Text character string
e type. The value
is of the
enumerated
type and can
be CipherText
or
EncryptedText.

passw No string 1 to - This field may "passwordText"


ordTex 255 contain
t charac sensitive or
ters. personal data.
Keep it secure.
Password
character
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1341


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/bgp-peers
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routeId" : "FFF702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpPeers" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackIp" : "192.168.3.3"
}
],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",
"dualAs" : false,
"auth" : {
"authType" : "None",
"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response Parameters
Response status code 201: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1342


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.14 Update BGP Peers on a Logical Router

Typical Scenarios
One or more BGP peers on a logical router need to be updated.

Functions
Update one or more BGP peers on a logical router. If multiple BGP peers need to
be updated, update them in one transaction. If any BGP peer fails to be updated,
all BGP peers will be rolled back.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/bgp-peers

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1343


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1026 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID of the "DBB702C3-77


256 logical router 19-4FE6-
charac to which the A5AD-3A9C9E2
ters. BGP peer 65309"
belongs.

Request Parameters

Table 1-1027 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

bgpPe Yes REFER For details, see BGP peer -


ers ENCE Table 1-1022. configuration,
which is of the
input
parameter
model class.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/bgp-peers
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routeId" : "FFF702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpPeers" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackIp" : "192.168.3.3"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1344


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",
"dualAs" : false,
"auth" : {
"authType" : "None",
"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1345


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.6.15 Query BGP Peer Information on a Logical Router

Typical Scenarios
BGP peer information on a logical router needs to be queried.

Functions
Query BGP peer information on a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/bgp-peers/bgp-peer/{bgpRouteId}

Table 1-1028 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

bgpRo Yes string 1 to - BGP route ID. "DBB702C3-77


uteId 128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/bgp-peers/bgp-peer/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1346


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1029 LogicRouterBgpPeerDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

routeId string 1 to 128 - BGP group ID, "FFF702C3-771


characters. which cannot 9-4FE6-
be the same as A5AD-3A9C9E2
an existing 65309"
logical router
ID.

logicR string 0 to 36 - Logical router "DBB702C3-77


outerId characters. ID. This 19-4FE6-
parameter is A5AD-3A9C9E2
used only for 65309"
querying the
return value.

bgpPe ARRAY For details, see Table BGP peer -


ers _REFER 1-991. information.
ENCE

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routeId" : "FFF702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpPeers" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1347


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"loopbackIp" : "192.168.3.3"
}
],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",
"dualAs" : false,
"auth" : {
"authType" : "None",
"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.16 Delete BGP Peers from a Logical Router

Typical Scenarios
One or more BGP peers need to be deleted from a logical router.

Functions
Delete one or more BGP peers from a logical router. If multiple BGP peers need to
be deleted, delete them in one transaction. If any BGP peer fails to be deleted, all
BGP peers will be rolled back.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1348


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/routers/router/bgp-peers/bgp-peer/{bgpRouteId}

Table 1-1030 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

bgpRo Yes string 1 to - BGP route ID. "DBB702C3-77


uteId 128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Table 1-1031 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/routers/router/bgp-peers/bgp-peer/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309?producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1349


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.17 Query BGP Peer Information in Batches Based on Specified Conditions

Typical Scenarios
BGP peers need to be queried in batches based on specified conditions.

Functions
Query BGP peers in batches based on specified conditions.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/bgp-peers

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1350


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1032 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR No string 0 to 36 - Logical router "DBB702C3-77


outerId charac ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/bgp-peers?logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1351


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1033 LogicRouterBgpPeerListWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

bgpPe ARRAY For details, see Table BGP peer -


ers _REFER 1-1029. information.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"bgpPeers" : [
{
"routeId" : "FFF702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpPeers" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bgpRouteId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"addressFamilyType" : "Vpnv4",
"description" : "description",
"peerIp" : "192.168.1.1",
"peerAs" : "10",
"bgpPeerType" : "Direct",
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "deviceGroupName",
"sourceIps" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackIp" : "192.168.3.3"
}
],
"logicInterfaceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"keepaliveTime" : 1,
"holdTime" : 3,
"bfd" : false,
"allowAsLoop" : false,
"defaultRouteAdvertise" : false,
"importRoutePolicy" : "routePolicy",
"exportRoutePolicy" : "routePolicy",
"loopbackId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackName" : "loopbackName",
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"sourceIfType" : 0,
"ebgpMultiHop" : false,
"minTxInterval" : 1000,
"minRxInterval" : 1000,
"detectMultiplier" : 3,
"fakeAsNum" : "10",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1352


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"dualAs" : false,
"auth" : {
"authType" : "None",
"keychainName" : "keychainName",
"passwordType" : "CipherText",
"passwordText" : "passwordText"
}
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.18 Query Device Groups Bound to a Logical Router

Typical Scenarios
Device groups bound to a logical router need to be queried.

Functions
Query device groups bound to a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/devicegroup-bindinfo

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1353


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1034 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Logical router "DBB702C3-77


256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Table 1-1035 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

bussin No string 0 to - Service type. "default"


essTyp 128
e charac
ters.

bussin No string 0 to - Service ID. "DBB702C3-77


essId 128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/
devicegroup-bindinfo?bussinessType=default&bussinessId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1354


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1036 DeviceGroupBindWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

device REFER For details, see Table Bound device -


group ENCE 1-1037. group
information.

Table 1-1037 DeviceGroupBindInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

logicR string 0 to 36 - Logical router "DBB702C3-77


outerId characters. ID. This 19-4FE6-
parameter is A5AD-3A9C9E2
used only for 65309"
querying the
return value.

bussin string 0 to 256 - Service ID, "DBB702C3-77


essId characters. which identifies 19-4FE6-
the service that A5AD-3A9C9E2
is being 65309"
operated.

bussin string 1 to 255 - Service type. "DciRoutePolic


essTyp characters. y"
e

device array< Each item has 0 - Device group -


groups string> to 256 ID.
characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"devicegroup" : {
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1355


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"bussinessId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessType" : "DciRoutePolicy",
"devicegroups" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.19 Query Device Groups Bound to a Logical Router in Batches

Typical Scenarios
Device groups bound to a logical router need to be queried in batches.

Functions
Query device groups bound to a logical router in batches.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/devicegroup-bindinfos

Table 1-1038 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1356


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

bussin No string 0 to - Service type. "Dci"


essTyp 128 The value can
e charac be Dci, ExtGw,
ters. RouterConnecti
on, LogicWaf,
Nfvi, Null0,
MplsVpn,
MdcDciGatewa
y, LoopBack, or
DciRoutePolicy.

bussin No string 0 to - Service ID. "DBB702C3-77


essId 128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/devicegroup-bindinfos?
logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&bussinessType=Dci&bussinessId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1039 DeviceGroupBindListWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Bound device -


group _REFER 1-1037. group
ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1357


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"devicegroup" : [
{
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessType" : "DciRoutePolicy",
"devicegroups" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.20 Query Routing Policies Bound to a Logical Router

Typical Scenarios
Bound routing policies on a logical router need to be queried.

Functions
Query routing policies bound to a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/bind-route-policy

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1358


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1040 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to - Producer of the -


er 128 binding
charac relationship.
ters.

routeP No string 0 to - ID of a routing -


olicyId 128 policy.
charac
ters.

routerI No string 0 to - routerId -


d 128
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/bind-route-policy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1041 BindRoutePolicyInfoDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

routeP ARRAY For details, see Table Bound routing -


olicyInf _REFER 1-1042. policy
oDto ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1359


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1042 BindRoutePolicyDto parameters


Param Type Value Range Defaul Description Example
eter t Value

routerI string 0 to 256 - Logical router "DBB702C3-77


d characters. ID. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

routeP string - - ID of a routing "DBB702C3-77


olicyId policy. 19-4FE6-
A5AD-3A9C9E2
65309"

type string - - Binding mode. "ribonly,


import, export,
preference."

instanc string - - Address family "vpn,evpn,both


eType type. "

device array< Each item has 0 - Device group -


GroupI string> to 256 information.
ds characters.

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routePolicyInfoDto" : [
{
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routePolicyId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : "ribonly, import, export, preference.",
"instanceType" : "vpn,evpn,both",
"deviceGroupIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1360


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.21 Bind Routing Policies to a Logical Router

Typical Scenarios
Routing policies need to be bound to a logical router.

Functions
Bind routing policies to a logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/bind-route-policy

Request Parameters

Table 1-1043 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

bingRo Yes REFER For details, see Bound routing -


utePoli ENCE Table 1-1044. policy
cyInfo information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1361


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1044 BindRoutePolicyDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

bindRo No REFER For details, see Bound routing -


utePoli ENCE Table 1-1045. policy
cyDto information.

Table 1-1045 BindRoutePolicyDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routerI No string 0 to - Logical router "DBB702C3-77


d 256 ID. This field 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

routeP No string - - ID of a routing "DBB702C3-77


olicyId policy. 19-4FE6-
A5AD-3A9C9E2
65309"

type No string - - Binding mode. "ribonly,


import, export,
preference."

instanc No string - - Address family "vpn,evpn,both


eType type. "

device No array< Each - Device group -


GroupI string> item information.
ds has 0
to 256
charac
ters.

additio No REFER For details, see Additional -


nal ENCE Table 1-981. information.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/bind-route-policy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1362


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"bindRoutePolicyDto" : {
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routePolicyId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : "ribonly, import, export, preference.",
"instanceType" : "vpn,evpn,both",
"deviceGroupIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.22 Unbind Routing Policies from a Logical Router

Typical Scenarios
Routing policies need to be unbound from a logical router.

Functions
Unbind routing policies from a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1363


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/unbind-route-policy

Request Parameters

Table 1-1046 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

bingRo Yes REFER For details, see Bound routing -


utePoli ENCE Table 1-1044. policy
cyInfo information.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/unbind-route-policy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"bindRoutePolicyDto" : {
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routePolicyId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : "ribonly, import, export, preference.",
"instanceType" : "vpn,evpn,both",
"deviceGroupIds" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1364


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.23 Bind Device Groups to a Logical Router

Typical Scenarios
One or more device groups need to be bound to a logical router.

Functions
Bind one or more device groups to a logical router. If multiple device groups need
to be bound, bind them in one transaction. If one device group fails to be bound,
all device groups will be rolled back.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/bind-devicegroups

Table 1-1047 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Logical router "DBB702C3-77


256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1365


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1048 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes REFER For details, see Static route -


groups ENCE Table 1-1049. configuration,
which is of the
input
parameter
model class.

Table 1-1049 DeviceGroupBindWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes REFER For details, see Bound device -


group ENCE Table 1-1050. group
information.

Table 1-1050 DeviceGroupBindInfoDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR No string 0 to 36 - Logical router "DBB702C3-77


outerId charac ID. This 19-4FE6-
ters. parameter is A5AD-3A9C9E2
used only for 65309"
querying the
return value.

bussin No string 0 to - Service ID, "DBB702C3-77


essId 256 which identifies 19-4FE6-
charac the service that A5AD-3A9C9E2
ters. is being 65309"
operated.

bussin No string 1 to - Service type. "DciRoutePolic


essTyp 255 y"
e charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1366


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No array< Each - Device group -


groups string> item ID.
has 0
to 256
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/bind-
devicegroups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"devicegroup" : {
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessType" : "DciRoutePolicy",
"devicegroups" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1367


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.24 Unbind Device Groups from a Logical Router

Typical Scenarios
One or more device groups need to be unbound from a logical router.

Functions
Unbind one or more device groups from a logical router. If multiple device groups
need to be unbound, unbind them in one transaction. If one device group fails to
be unbound, all device groups will be rolled back.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/{id}/unbind-devicegroups

Table 1-1051 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Logical router "DBB702C3-77


256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1368


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1052 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes REFER For details, see Static route -


groups ENCE Table 1-1053. configuration,
which is of the
input
parameter
model class.

Table 1-1053 DeviceGroupUnbindWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes REFER For details, see Bound device -


group ENCE Table 1-1050. group
information.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/unbind-
devicegroups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"devicegroup" : {
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"bussinessType" : "DciRoutePolicy",
"devicegroups" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1369


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.25 Query the Binding Relationship Between a Logical Router and an


External Gateway

Typical Scenarios
The binding relationship between a logical router and an external gateway needs
to be queried.

Functions
Query the binding relationship between a logical router and an external gateway.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/routers/router/bind-external-gateway

Table 1-1054 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id No string 0 to - Logical router -


128 ID.
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1370


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to - Producer of the -


er 128 binding
charac relationship.
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/routers/router/bind-external-gateway HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1055 BindExternalGatewaysWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

bindEx ARRAY For details, see Table List of bound -


ternal _REFER 1-1056. external
Gatew ENCE gateways.
ayInfo

Table 1-1056 BindExternalGatewayWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

routerI string 0 to 256 - Logical router "DBB702C3-77


d characters. ID. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

bindInf ARRAY For details, see Table Bound external -


o _REFER 1-1057. gateway
ENCE information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1371


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

additio REFER For details, see Table Additional -


nal ENCE 1-987. information.

Table 1-1057 BindExternalGatewayDto parameters

Param Type Value Range Defaul Description Example


eter t Value

dciGwI string 0 to 256 - Device group -


d characters. ID.

extern string 0 to 256 - External -


alGate characters. gateway ID.
wayId

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"bindExternalGatewayInfo" : [
{
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1372


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.6.26 Bind an External Gateway to a Logical Router

Typical Scenarios
An external gateway needs to be bound to a logical router.

Functions
Bind an external gateway to a logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/routers/router/bind-external-gateway

Request Parameters

Table 1-1058 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device Yes REFER For details, see Static route -


groups ENCE Table 1-1059. configuration,
which is of the
input
parameter
model class.

Table 1-1059 BindExternalGatewayWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routerI No string 0 to - Logical router "DBB702C3-77


d 256 ID. This field 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1373


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

bindInf Yes ARRAY For details, see Bound external -


o _REFER Table 1-1060. gateway
ENCE information.

additio No REFER For details, see Additional -


nal ENCE Table 1-981. information.

Table 1-1060 BindExternalGatewayDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dciGwI No string 0 to - Device group -


d 256 ID.
charac
ters.

extern No string 0 to - External -


alGate 256 gateway ID.
wayId charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/routers/router/bind-external-gateway HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1374


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.6.27 Switch Active and Standby Fabrics of a Logical Router

Typical Scenarios
Active and standby fabrics of a logical router need to be switched.

Functions
Switch active and standby fabrics of a logical router that has been bound. Only
the distributed fabric is supported.

Constraints
User roles: northbound operator and system administrator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/routers/switchfabricrole

Request Parameters

Table 1-1061 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR Yes REFER For details, see List of logical -


outerId ENCE Table 1-1062. router IDs.
s

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1375


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1062 LogicRouterIdsWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR Yes array< Each - Logical router -


outerId string> item ID.
s has 0
to 256
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/routers/switchfabricrole HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicRouterIds" : [
"2b1daff5-44f1-4209-b7ef-c0277b4b2a01"
]
}

Response Parameters
Response status code 200: successfully

Table 1-1063 SwitchFabricRoleOutputWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

logicR array< Each item has 0 - Logical router -


outerId string> to 256 ID.
s characters.

taskId string 0 to 256 - Task ID. "2b1daff5-44f1


characters. -4209-b7ef-
c0277b4b2a01"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1376


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"logicRouterIds" : [
"2b1daff5-44f1-4209-b7ef-c0277b4b2a01"
],
"taskId" : "2b1daff5-44f1-4209-b7ef-c0277b4b2a01"
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.7 Logical Interface Management


APIs for adding, deleting, and querying logical interfaces.

1.9.7.7.1 Create a Layer 3 Logical Interface

Typical Scenarios
A Layer 3 logical interface needs to be created.

Functions
Create a Layer 3 logical port.

Constraints
User role: northbound operator.
A created router interface can be unbound from a subnet on the GUI.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/interfaces

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1377


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1064 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

wrapp Yes REFER For details, see Parameters for -


er ENCE Table 1-1065. creating a
logical
interface.

Table 1-1065 LogicInterfaceListDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

interfa Yes ARRAY For details, see Logical -


ce _REFER Table 1-1066. interface
ENCE information.

Table 1-1066 LogicInterfaceDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

name No string 1 to - Object name. "logicInterface


255 This field can Name"
charac be updated.
ters.

descrip No string 0 to - Object "description"


tion 255 description.
charac
ters.

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. This field 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

extern No string 0 to - ID of the "DBB702C3-77


alGate 256 external 19-4FE6-
wayId charac gateway. A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1378


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

interfa Yes string 0 to - Port type. The "RouterInterfac


ceType 255 options are as e"
charac follows:
ters. RouterInterface
: broadcast
domain port.
ConnectInterfa
ce:
interconnection
port. This field
cannot be
updated.

mac No string 0 to - MAC address "00:00:5E:


255 of an interface 00:01:01"
charac in a broadcast
ters. domain. The
value can be
changed.

ip No REFER For details, see IP address of a -


ENCE Table 1-1067. logical
interface.

subIp No array< - - Secondary IP ["192.168.1.1/2


string> address of an 4"]
interface. For
an interface in
a broadcast
domain, a
matching
subnet must
exist under the
logical switch.
This parameter
cannot be set
for an
interconnection
interface. The
value is a
character
string. The
value can be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1379


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicS No string 0 to - RouterInterface "DBB702C3-77


witchId 256 type. The 19-4FE6-
charac broadcast A5AD-3A9C9E2
ters. domain 65309"
associated with
the port must
be specified.
This field
cannot be
updated.

connec No REFER For details, see Connection -


t ENCE Table 1-1068. interface
information.

connec No ARRAY For details, see IP address of ["192.168.1.1/2


tIp _REFER Table 1-1070. the 4"]
ENCE interconnection
port.

tenantI No string 0 to - Tenant ID. In "DBB702C3-77


d 256 the 19-4FE6-
charac northbound A5AD-3A9C9E2
ters. direction, the 65309"
value can be
either specified
or not. The
controller can
automatically
obtain the
tenant ID from
a logical router.
This field
cannot be
updated.

additio No REFER For details, see Additional -


nal ENCE Table 1-1071. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1380


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1067 LogicIfIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

subnet No string 0 to - Subnet ID. "DBB702C3-77


Id 256 RouterInterface 19-4FE6-
charac is mandatory A5AD-3A9C9E2
ters. and 65309"
ConnectInterfa
ce is optional.
In the multi-
subnet
scenario, enter
a subnet ID list.
This field
cannot be
updated.

subnet No array< 0-255 - Subnet ID list, ["DBB702C3-7


Ids string> items. used for the 719-4FE6-
multi-subnet A5AD-3A9C9E2
scenario. Only 65309"]
RouterInterface
is supported.
This field
cannot be
updated.

ip No string 1 to - IP address of a "192.168.1.1/24


255 logical "
charac interface. For a
ters. broadcast
domain port,
the logical
switch must
have a
matching
subnet. For a
non-broadcast
domain port,
the upper-layer
system ensures
the accuracy of
interconnection
IP addresses.
This parameter
is mandatory
and can be
updated when
ConnectInterfa
ce is set.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1381


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1068 ConnectIfDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

type Yes string 1 to 36 Dot1q Port "Dot1q"


charac connection
ters. type, which can
be Dot1q or
VxlanTunnel.
This field
cannot be
updated.

locatio Yes ARRAY For details, see Access -


n _REFER Table 1-1069. location. If
ENCE multiple ports
are specified,
intra-device
group ports
support the m-
lag or
independent
mode. For
inter-device
group ports,
the controller
automatically
generates the
logical switches
and adds the
two device
groups to the
same
broadcast
domain.

vlanId No int32 [1-409 - Access VLAN 10


4] ID. This
parameter is
mandatory
when the
access type is
dot1q. This
field cannot be
updated

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1382


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vniAllo No string 0 to - Alloc type, "Automatic"


cType 255 which can be
charac Automatic,
ters. Manual, or
Noalloc. This
field cannot be
updated.

vlanAll No string 0 to - Alloc type, "Noalloc"


ocType 255 which can be
charac Automatic,
ters. Manual, or
Noalloc. This
field cannot be
updated.

vni No int32 [1-160 - Interconnection 10


00000] VNI. This field
cannot be
updated.

subInt No int32 [1-409 - Sub-interface 2000


erface 4] number.
Num

peerVt No array< 0-255 - Peer VTEP IP ["192.168.1.1"]


epIp string> items. address. This
field cannot be
updated.

access No string - - Access mode, "Nni"


Mode which can be
UNI or NNI.
This field
cannot be
updated.

routeIn No boolea - - Whether the false


terface n routed
interface is
enabled. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1383


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

arpDir No boolea - - Whether the false


ectRou n IPv4 routing
teEnab policy
le generated by
VLINK routes is
enabled.

ndDire No boolea - - Whether the false


ctRout n IPv6 routing
eEnabl policy
e generated by
VLINK routes is
enabled.

Table 1-1069 LogicIfLocationDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

portNa No string 0 to - Port name. "portName"


me 255 Either the port
charac name or port
ters. ID can be set.
This field
cannot be
updated.

portId No string 0 to - Physical port. "DBB702C3-77


256 Either the port 19-4FE6-
charac name or port A5AD-3A9C9E2
ters. ID can be set. 65309"
This field
cannot be
updated.

deviceI No string 0 to - Physical device. "DBB702C3-77


d 256 Either the 19-4FE6-
charac device ID or A5AD-3A9C9E2
ters. device 65309"
management
IP address can
be set. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1384


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to - Device "192.168.1.1"


p 255 management
charac IP address.
ters. Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

Table 1-1070 ConnectIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

localIp No string 1 to - Local IP "192.168.1.1/24


255 address of "
charac ConnectInterfa
ters. ce. This field
can be
updated.

peerIp No string 1 to - Remote IP "192.168.1.2/24


255 address of "
charac ConnectInterfa
ters. ce. This field
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1385


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1071 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/interfaces HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"interface" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicInterfaceName",
"description" : "description",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"interfaceType" : "RouterInterface",
"mac" : "00:00:5E:00:01:01",
"ip" : {
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"ip" : "192.168.1.1/24"
},
"subIp" : ["192.168.1.1/24"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1386


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"connect" : {
"type" : "Dot1q",
"location" : [
{
"portName" : "portName",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
],
"vlanId" : 10,
"vniAllocType" : "Automatic",
"vlanAllocType" : "Noalloc",
"vni" : 10,
"subInterfaceNum" : 2000,
"peerVtepIp" : ["192.168.1.1"],
"accessMode" : "Nni",
"routeInterface" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false
},
"connectIp" : ["192.168.1.1/24"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1387


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.7.2 Query Logical Interfaces

Typical Scenarios
The logical interface list needs to be queried.

Functions
Query logical interfaces based on the configuration source, logical switch (and
port type), or logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/interfaces

Table 1-1072 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "CloudPlatform


er charac parameter is 1"
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1388


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

isTrans No boolea - - Whether to -


it n query all
transit
interconnection
ports.

extern No string 0 to - ID of the "DBB702C3-77


alGate 256 external 19-4FE6-
wayId charac gateway. A5AD-3A9C9E2
ters. 65309"

logicS No string 0 to - Logical switch. "DBB702C3-77


witchId 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

interfa No string - - Port type. The "RouterInterfac


ceType options are as e"
follows:
RouterInterface
: broadcast
domain port.
ConnectInterfa
ce:
interconnection
port. This field
cannot be
updated.

pageIn No string - - Page index. "1"


dex

pageSi No string - - Page size. "1"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/interfaces?
producer=CloudPlatform1&logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&externalGatewayId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicSwitchId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&interfaceType=RouterInterface&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1389


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1073 LogicInterfacePagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

interfa ARRAY For details, see Table Logical -


ce _REFER 1-1074. interface
ENCE information.

totalN int64 [1-2147483647 - Total number 200


um ] of logical ports.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1074 LogicInterfaceDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

name string 1 to 255 - Object name. "logicInterface


characters. This field can Name"
be updated.

descrip string 0 to 255 - Object "description"


tion characters. description.

logicR string 0 to 256 - Logical router "DBB702C3-77


outerId characters. ID. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

extern string 0 to 256 - ID of the "DBB702C3-77


alGate characters. external 19-4FE6-
wayId gateway. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1390


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

interfa string 0 to 255 - Port type. The "RouterInterfac


ceType characters. options are as e"
follows:
RouterInterface
: broadcast
domain port.
ConnectInterfa
ce:
interconnection
port. This field
cannot be
updated.

mac string 0 to 255 - MAC address "00:00:5E:


characters. of an interface 00:01:01"
in a broadcast
domain. The
value can be
changed.

ip REFER For details, see Table IP address of a -


ENCE 1-1075. logical
interface.

subIp array< - - Secondary IP ["192.168.1.1/2


string> address of an 4"]
interface. For
an interface in
a broadcast
domain, a
matching
subnet must
exist under the
logical switch.
This parameter
cannot be set
for an
interconnection
interface. The
value is a
character
string. The
value can be
changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1391


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicS string 0 to 256 - RouterInterface "DBB702C3-77


witchId characters. type. The 19-4FE6-
broadcast A5AD-3A9C9E2
domain 65309"
associated with
the port must
be specified.
This field
cannot be
updated.

connec REFER For details, see Table Connection -


t ENCE 1-1076. interface
information.

connec ARRAY For details, see Table IP address of ["192.168.1.1/2


tIp _REFER 1-1078. the 4"]
ENCE interconnection
port.

tenantI string 0 to 256 - Tenant ID. In "DBB702C3-77


d characters. the 19-4FE6-
northbound A5AD-3A9C9E2
direction, the 65309"
value can be
either specified
or not. The
controller can
automatically
obtain the
tenant ID from
a logical router.
This field
cannot be
updated.

additio REFER For details, see Table Additional -


nal ENCE 1-1079. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1392


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1075 LogicIfIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet string 0 to 256 - Subnet ID. "DBB702C3-77


Id characters. RouterInterface 19-4FE6-
is mandatory A5AD-3A9C9E2
and 65309"
ConnectInterfa
ce is optional.
In the multi-
subnet
scenario, enter
a subnet ID list.
This field
cannot be
updated.

subnet array< 0-255 items. - Subnet ID list, ["DBB702C3-7


Ids string> used for the 719-4FE6-
multi-subnet A5AD-3A9C9E2
scenario. Only 65309"]
RouterInterface
is supported.
This field
cannot be
updated.

ip string 1 to 255 - IP address of a "192.168.1.1/24


characters. logical "
interface. For a
broadcast
domain port,
the logical
switch must
have a
matching
subnet. For a
non-broadcast
domain port,
the upper-layer
system ensures
the accuracy of
interconnection
IP addresses.
This parameter
is mandatory
and can be
updated when
ConnectInterfa
ce is set.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1393


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1076 ConnectIfDto parameters


Param Type Value Range Defaul Description Example
eter t Value

type string 1 to 36 Dot1q Port "Dot1q"


characters. connection
type, which can
be Dot1q or
VxlanTunnel.
This field
cannot be
updated.

locatio ARRAY For details, see Table Access -


n _REFER 1-1077. location. If
ENCE multiple ports
are specified,
intra-device
group ports
support the m-
lag or
independent
mode. For
inter-device
group ports,
the controller
automatically
generates the
logical switches
and adds the
two device
groups to the
same
broadcast
domain.

vlanId int32 [1-4094] - Access VLAN 10


ID. This
parameter is
mandatory
when the
access type is
dot1q. This
field cannot be
updated

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1394


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vniAllo string 0 to 255 - Alloc type, "Automatic"


cType characters. which can be
Automatic,
Manual, or
Noalloc. This
field cannot be
updated.

vlanAll string 0 to 255 - Alloc type, "Noalloc"


ocType characters. which can be
Automatic,
Manual, or
Noalloc. This
field cannot be
updated.

vni int32 [1-16000000] - Interconnection 10


VNI. This field
cannot be
updated.

subInt int32 [1-4094] - Sub-interface 2000


erface number.
Num

peerVt array< 0-255 items. - Peer VTEP IP ["192.168.1.1"]


epIp string> address. This
field cannot be
updated.

access string - - Access mode, "Nni"


Mode which can be
UNI or NNI.
This field
cannot be
updated.

routeIn boolea - - Whether the false


terface n routed
interface is
enabled. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1395


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

arpDir boolea - - Whether the false


ectRou n IPv4 routing
teEnab policy
le generated by
VLINK routes is
enabled.

ndDire boolea - - Whether the false


ctRout n IPv6 routing
eEnabl policy
e generated by
VLINK routes is
enabled.

Table 1-1077 LogicIfLocationDto parameters


Param Type Value Range Defaul Description Example
eter t Value

portNa string 0 to 255 - Port name. "portName"


me characters. Either the port
name or port
ID can be set.
This field
cannot be
updated.

portId string 0 to 256 - Physical port. "DBB702C3-77


characters. Either the port 19-4FE6-
name or port A5AD-3A9C9E2
ID can be set. 65309"
This field
cannot be
updated.

deviceI string 0 to 256 - Physical device. "DBB702C3-77


d characters. Either the 19-4FE6-
device ID or A5AD-3A9C9E2
device 65309"
management
IP address can
be set. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1396


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

deviceI string 0 to 255 - Device "192.168.1.1"


p characters. management
IP address.
Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

Table 1-1078 ConnectIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

localIp string 1 to 255 - Local IP "192.168.1.1/24


characters. address of "
ConnectInterfa
ce. This field
can be
updated.

peerIp string 1 to 255 - Remote IP "192.168.1.2/24


characters. address of "
ConnectInterfa
ce. This field
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1397


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1079 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"interface" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicInterfaceName",
"description" : "description",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"interfaceType" : "RouterInterface",
"mac" : "00:00:5E:00:01:01",
"ip" : {
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"ip" : "192.168.1.1/24"
},
"subIp" : ["192.168.1.1/24"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1398


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"connect" : {
"type" : "Dot1q",
"location" : [
{
"portName" : "portName",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
],
"vlanId" : 10,
"vniAllocType" : "Automatic",
"vlanAllocType" : "Noalloc",
"vni" : 10,
"subInterfaceNum" : 2000,
"peerVtepIp" : ["192.168.1.1"],
"accessMode" : "Nni",
"routeInterface" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false
},
"connectIp" : ["192.168.1.1/24"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.7.3 Query a Layer 3 Logical Interface by ID

Typical Scenarios
A Layer 3 logical port needs to be queried by ID.

Functions
Query a Layer 3 logical port by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1399


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/interfaces/interface/{id}

Table 1-1080 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Logical "DBB702C3-77


256 interface ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/interfaces/interface/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1081 LogicInterfaceListDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

interfa ARRAY For details, see Table Logical -


ce _REFER 1-1074. interface
ENCE information.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1400


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"interface" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicInterfaceName",
"description" : "description",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"interfaceType" : "RouterInterface",
"mac" : "00:00:5E:00:01:01",
"ip" : {
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"ip" : "192.168.1.1/24"
},
"subIp" : ["192.168.1.1/24"],
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"connect" : {
"type" : "Dot1q",
"location" : [
{
"portName" : "portName",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
],
"vlanId" : 10,
"vniAllocType" : "Automatic",
"vlanAllocType" : "Noalloc",
"vni" : 10,
"subInterfaceNum" : 2000,
"peerVtepIp" : ["192.168.1.1"],
"accessMode" : "Nni",
"routeInterface" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false
},
"connectIp" : ["192.168.1.1/24"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1401


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.7.4 Update a Logical Layer 3 Port

Typical Scenarios
A Layer 3 logical interface needs to be updated.

Functions
Update a Layer 3 logical port.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/interfaces/interface/{id}

Table 1-1082 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 a logical 19-4FE6-
charac network. This A5AD-3A9C9E2
ters. field cannot be 66309"
updated.

Request Parameters

Table 1-1083 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

wrapp Yes REFER For details, see Parameters for -


er ENCE Table 1-1065. updating a
Layer 3 logical
interface.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1402


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/interfaces/interface/DBB702C3-7719-4FE6-A5AD-3A9C9E266309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"interface" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicInterfaceName",
"description" : "description",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"interfaceType" : "RouterInterface",
"mac" : "00:00:5E:00:01:01",
"ip" : {
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"ip" : "192.168.1.1/24"
},
"subIp" : ["192.168.1.1/24"],
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"connect" : {
"type" : "Dot1q",
"location" : [
{
"portName" : "portName",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
],
"vlanId" : 10,
"vniAllocType" : "Automatic",
"vlanAllocType" : "Noalloc",
"vni" : 10,
"subInterfaceNum" : 2000,
"peerVtepIp" : ["192.168.1.1"],
"accessMode" : "Nni",
"routeInterface" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false
},
"connectIp" : ["192.168.1.1/24"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response Parameters
Response status code 200: successfully

LogicInterfaceListDtoWrapper parameters, For details, see Table 1-1081.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1403


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"interface" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicInterfaceName",
"description" : "description",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"interfaceType" : "RouterInterface",
"mac" : "00:00:5E:00:01:01",
"ip" : {
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"ip" : "192.168.1.1/24"
},
"subIp" : ["192.168.1.1/24"],
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"connect" : {
"type" : "Dot1q",
"location" : [
{
"portName" : "portName",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1"
}
],
"vlanId" : 10,
"vniAllocType" : "Automatic",
"vlanAllocType" : "Noalloc",
"vni" : 10,
"subInterfaceNum" : 2000,
"peerVtepIp" : ["192.168.1.1"],
"accessMode" : "Nni",
"routeInterface" : false,
"arpDirectRouteEnable" : false,
"ndDirectRouteEnable" : false
},
"connectIp" : ["192.168.1.1/24"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1404


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.7.5 Delete a Layer 3 Logical Interface

Typical Scenarios
A Layer 3 logical port needs to be deleted.

Functions
Delete a Layer 3 logical port.

Constraints
User role: northbound operator.
The subnet bound on the GUI cannot be unbound using this API. You can unbind
the subnet by invoking the API for updating a logical switch.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/interfaces/interface/{id}

Table 1-1084 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Logical "DBB702C3-77


256 interface ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1405


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1085 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/interfaces/interface/DBB702C3-7719-4FE6-A5AD-3A9C9E265309?
producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1406


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.8 Logical link Management


Description of logical link management interfaces:
1. Create a logical link.
2. Query the logical link information list.
3. Query logical link information.
4. Delete a logical link.

1.9.7.8.1 Create a Logical Link

Typical Scenarios
A logical link needs to be created.

Functions
Associate the logical switch with the logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/links

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1407


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1086 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1087. paramete
r
informati
on.

Table 1-1087 LinkDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

link Yes ARRAY 1 items. For Logical link -


_REFER details, see information.
ENCE Table 1-1088.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1408


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1088 LinkDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to 36 - Logical link ID. "2711c7c3-


charac cec9-490e-
ters. b222-8bef7f23
36 9523"
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1409


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicS Yes string 0 to 36 - Logical switch "daa9a6bd-563


witchId charac ID. 4-4d86-89f9-7
ters. 3ee1085b270"
36
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1410


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR Yes string 0 to 36 - Logical router "97e06d78-


outerId charac ID. f1f0-401e-8abe
ters. -831c67e41c15
36 "
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1411


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicN Yes string 0 to 36 - Logical "c321ed67-145


etwork charac network ID. 3-4726-85f8-7a
Id ters. 2ff56a19e2"
36
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

additio No REFER For details, see Additional -


nal ENCE Table 1-1089. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1412


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1089 AdditionDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/links HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"link" : [
{
"id" : "2711c7c3-cec9-490e-b222-8bef7f239523",
"logicSwitchId" : "daa9a6bd-5634-4d86-89f9-73ee1085b270",
"logicRouterId" : "97e06d78-f1f0-401e-8abe-831c67e41c15",
"logicNetworkId" : "c321ed67-1453-4726-85f8-7a2ff56a19e2",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1413


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.8.2 Query the Logical Link Information List

Typical Scenarios
Information about all logical links needs to be queried.

Functions
Query the information list of all logical links.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/links

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1414


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1090 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - producer. "default"


er charac
ters.

logicS No string 0 to 36 - Logical switch "daa9a6bd-563


witchId charac ID. 4-4d86-89f9-7
ters. 3ee1085b270"

logicR No string 0 to 36 - Logical router "97e06d78-


outerId charac ID. f1f0-401e-8abe
ters. -831c67e41c15
"

logicN No string 0 to 36 - Logical "c321ed67-145


etwork charac network ID. 3-4726-85f8-7a
Id ters. 2ff56a19e2"

pageIn No string 0 to - Page number. "1"


dex 255
charac
ters.

pageSi No string 0 to - Number of "1"


ze 255 records on
charac each page.
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/links?
producer=default&logicSwitchId=daa9a6bd-5634-4d86-89f9-73ee1085b270&logicRouterId=97e06d78-
f1f0-401e-8abe-831c67e41c15&logicNetworkId=c321ed67-1453-4726-85f8-7a2ff56a19e2&pageIndex=1&pa
geSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1415


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1091 LinkPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

link ARRAY 0-4000 items. For details, Logical link -


_REFER see Table 1-1092. information.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of queried
logical links.

pageIn int32 [1-2147483647 - Page number. 1


dex ]

pageSi int32 [1-4000] - Number of 1


ze records on
each page.

Table 1-1092 LinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 36 - Logical link ID. "2711c7c3-


characters. 36 cec9-490e-
characters. The b222-8bef7f23
value must 9523"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1416


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicS string 0 to 36 - Logical switch "daa9a6bd-563


witchId characters. 36 ID. 4-4d86-89f9-7
characters. The 3ee1085b270"
value must
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

logicR string 0 to 36 - Logical router "97e06d78-


outerId characters. 36 ID. f1f0-401e-8abe
characters. The -831c67e41c15
value must "
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

logicN string 0 to 36 - Logical "c321ed67-145


etwork characters. 36 network ID. 3-4726-85f8-7a
Id characters. The 2ff56a19e2"
value must
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

additio REFER For details, see Table Additional -


nal ENCE 1-1093. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1417


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1093 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"link" : [
{
"id" : "2711c7c3-cec9-490e-b222-8bef7f239523",
"logicSwitchId" : "daa9a6bd-5634-4d86-89f9-73ee1085b270",
"logicRouterId" : "97e06d78-f1f0-401e-8abe-831c67e41c15",
"logicNetworkId" : "c321ed67-1453-4726-85f8-7a2ff56a19e2",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
],
"totalNum" : 200,
"pageIndex" : 1,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1418


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.8.3 Query Logical Link Information

Typical Scenarios
Logical link information needs to be queried.

Functions
Query logical link information.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/links/link/{id}

Table 1-1094 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for "DBB702C3-77


128 querying 19-4FE6-
charac tenant resource A5AD-3A9C9E2
ters. statistics. 65309"

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1419


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /controller/dc/v3/logicnetwork/links/link/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-1095 LinkDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

link ARRAY 1 items. For details, see Logical link -


_REFER Table 1-1092. information.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"link" : [
{
"id" : "2711c7c3-cec9-490e-b222-8bef7f239523",
"logicSwitchId" : "daa9a6bd-5634-4d86-89f9-73ee1085b270",
"logicRouterId" : "97e06d78-f1f0-401e-8abe-831c67e41c15",
"logicNetworkId" : "c321ed67-1453-4726-85f8-7a2ff56a19e2",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1420


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.7.8.4 Delete a Logical Link

Typical Scenarios
A logical link needs to be deleted.

Functions
Disassociate the logical switch from the logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/links/link/{id}

Table 1-1096 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Deletion by ID. "DBB702C3-77


128 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/links/link/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1421


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.9 End Port Management


# End port description:
1. Query the end port list.
2. Create an end port.
3. Query end ports by ID.
4. Update end ports by ID.
5. Delete end ports by ID.

1.9.7.9.1 Create an End Port

Typical Scenarios
An end port needs to be created. The following fields are mandatory: id, name,
and logicNetworkId.

Functions
Create an end port based on the request.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1422


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/endports

Request Parameters

Table 1-1097 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1098. s for
creating
an end
port.

Table 1-1098 EndPortsDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

endPor No REFER For details, see "" -


t ENCE Table 1-1099.

Table 1-1099 EndPortsDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - End port ID. "DBB702C3-77


256 This field 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

logicPo No string 0 to - ID of the "DBB702C3-77


rtId 256 associated 19-4FE6-
charac logical port. A5AD-3A9C9E2
ters. This field 65309"
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1423


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

name No string 1 to - End port name. "name"


255 This field can
charac be updated.
ters.

descrip No string 0 to - ID of the "description"


tion 255 logical network
charac to which the
ters. end port
belongs. This
field cannot be
updated.

logicN No string 0 to - ID of the "DBB702C3-77


etwork 256 logical network 19-4FE6-
Id charac to which the A5AD-3A9C9E2
ters. end port 65309"
belongs. This
field cannot be
updated.

locatio No string 0 to - Location. This "10"


n 255 field can be
charac updated.
ters.

vmNa No string 0 to - Page size. "10"


me 255
charac
ters.

ipv4 No array< 0-1 - IPv4 address. ["192.168.1.1"]


string> items. The value can
be changed.

ipv6 No array< 0-1 - IPv6 address. ["FE80::a1"]


string> items. The value can
be changed.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/endports HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1424


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"endPort" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"location" : "10",
"vmName" : "10",
"ipv4" : ["192.168.1.1"],
"ipv6" : ["FE80::a1"]
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.9.2 Query All End Ports

Typical Scenarios
All end ports need to be queried.

Functions
Query all end ports under a specified condition.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1425


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/endports

Table 1-1100 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No string 0 to - Page size. "10"


ze 255
charac
ters.

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

logicN No string 0 to - ID of the "DBB702C3-77


etwork 256 logical network 19-4FE6-
Id charac where the end A5AD-3A9C9E2
ters. port is located. 65309"

tenantI No string 0 to - Tenant ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

produc No string 0 to 36 - default "default"


er charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/endports?
pageSize=10&pageIndex=1&logicNetworkId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&tenantId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&producer=default HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1426


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

Table 1-1101 EndPortsDtoListWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

endPor ARRAY 0-4000 items. For details, "" -


ts _REFER see Table 1-1102.
ENCE

totalN int64 [0-2147483647 - Total number 200


um ] of query
results.

pageIn int32 [1-4000] - Page size. 1


dex

pageSi int32 [1-4000] - Page size. 1


ze

Table 1-1102 QueryEndPortsDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - End port ID. "DBB702C3-77


characters. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

logicPo string 0 to 256 - ID of the "DBB702C3-77


rtId characters. associated 19-4FE6-
logical port. A5AD-3A9C9E2
This field 65309"
cannot be
updated.

name string 1 to 255 - End port name. "name"


characters. This field can
be updated.

descrip string 0 to 255 - ID of the "description"


tion characters. logical network
to which the
end port
belongs. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1427


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicN string 0 to 256 - ID of the "DBB702C3-77


etwork characters. logical network 19-4FE6-
Id to which the A5AD-3A9C9E2
end port 65309"
belongs. This
field cannot be
updated.

locatio string 0 to 255 - Location. This "10"


n characters. field can be
updated.

vmNa string 0 to 255 - Page size. "10"


me characters.

ipv4 array< 0-1 items. - IPv4 address. ["192.168.1.1"]


string> The value can
be changed.

ipv6 array< 0-1 items. - IPv6 address. ["FE80::a1"]


string> The value can
be changed.

tenantI string 0 to 256 - Tenant ID. This "DBB702C3-77


d characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

type string - - Creation type, "Manually"


which can be
Manually or
Automatically.
This field
cannot be
updated.

access string - - Access mode, "Layer2"


Mode which can be
Layer 2 or
Layer 3. This
field cannot be
updated.

additio REFER For details, see Table "" -


nal ENCE 1-1103.

advanc REFER For details, see Table "" -


e ENCE 1-1104.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1428


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

dnsAss ARRAY 0-65535 items. For "" -


ignme _REFER details, see Table 1-1105.
nt ENCE

Table 1-1103 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Table 1-1104 AdvanceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

vlan int32 [1-4094] - VLAN. 200

egress int32 [1-4094] - Egress VLAN. 200


Vlan

mac string 0 to 16000000 - MAC address. "00:00:5E:


characters. 00:01:01"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1429


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extern string 0 to 256 - External "DBB702C3-77


alNetw characters. network ID. 19-4FE6-
orkId A5AD-3A9C9E2
65309"

ipv4Pr array< 0-32 items. - IPv4 prefix list. ["192.168.1.0/2


efixs string> 4"]

ipv6Pr array< 0-32 items. - IPv6 prefix list. ["FE80::/64"]


efixs string>

qosTe string - - QoS profile. "DBB702C3-77


mplate 19-4FE6-
A5AD-3A9C9E2
65309"

Table 1-1105 DnsAssignmentDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipAddr string - - IP address. "192.168.1.1"


ess

hostNa string - - Host name. "hostName"


me

fqdn string - - Fully qualified "hostName.my


domain name company.com"
(FQDN), which
contains both
the host and
domain names
separated by
periods (.). For
example, if the
host name is
hostName and
the domain
name is
mycompany.co
m, the FQDN is
hostName.myc
ompany.com.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1430


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"endPorts" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"location" : "10",
"vmName" : "10",
"ipv4" : ["192.168.1.1"],
"ipv6" : ["FE80::a1"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : "Manually",
"accessMode" : "Layer2",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"advance" : {
"vlan" : 200,
"egressVlan" : 200,
"mac" : "00:00:5E:00:01:01",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipv4Prefixs" : ["192.168.1.0/24"],
"ipv6Prefixs" : ["FE80::/64"],
"qosTemplate" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
},
"dnsAssignment" : [
{
"ipAddress" : "192.168.1.1",
"hostName" : "hostName",
"fqdn" : "hostName.mycompany.com"
}
]
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1431


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.9.3 Query an End Port by ID

Typical Scenarios
Query an End Port by ID.

Functions
Query an end port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/endports/endport/{id}

Table 1-1106 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Query an end "DBB702C3-77


256 port by ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/endports/endport/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1432


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1107 QueryEndPortDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

endPor REFER For details, see Table "" -


t ENCE 1-1102.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"endPort" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"location" : "10",
"vmName" : "10",
"ipv4" : ["192.168.1.1"],
"ipv6" : ["FE80::a1"],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : "Manually",
"accessMode" : "Layer2",
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
},
"advance" : {
"vlan" : 200,
"egressVlan" : 200,
"mac" : "00:00:5E:00:01:01",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipv4Prefixs" : ["192.168.1.0/24"],
"ipv6Prefixs" : ["FE80::/64"],
"qosTemplate" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
},
"dnsAssignment" : [
{
"ipAddress" : "192.168.1.1",
"hostName" : "hostName",
"fqdn" : "hostName.mycompany.com"
}
]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1433


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.9.4 Update an End Port by ID

Typical Scenarios
An end port needs to be updated by ID. The fields that can be updated include
name, description, location, vmName, ipv4, and ipv6.

Functions
Update an end port by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/endports/endport/{id}

Table 1-1108 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for updating "DBB702C3-77


256 an end port. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1434


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1109 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1098. s for
updating
an end
port.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/endports/endport/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"endPort" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"location" : "10",
"vmName" : "10",
"ipv4" : ["192.168.1.1"],
"ipv6" : ["FE80::a1"]
}
}

Response Parameters
Response status code 200: successfully

Table 1-1110 EndPortsDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

endPor REFER For details, see Table "" -


t ENCE 1-1111.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1435


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1111 EndPortsDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - End port ID. "DBB702C3-77


characters. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

logicPo string 0 to 256 - ID of the "DBB702C3-77


rtId characters. associated 19-4FE6-
logical port. A5AD-3A9C9E2
This field 65309"
cannot be
updated.

name string 1 to 255 - End port name. "name"


characters. This field can
be updated.

descrip string 0 to 255 - ID of the "description"


tion characters. logical network
to which the
end port
belongs. This
field cannot be
updated.

logicN string 0 to 256 - ID of the "DBB702C3-77


etwork characters. logical network 19-4FE6-
Id to which the A5AD-3A9C9E2
end port 65309"
belongs. This
field cannot be
updated.

locatio string 0 to 255 - Location. This "10"


n characters. field can be
updated.

vmNa string 0 to 255 - Page size. "10"


me characters.

ipv4 array< 0-1 items. - IPv4 address. ["192.168.1.1"]


string> The value can
be changed.

ipv6 array< 0-1 items. - IPv6 address. ["FE80::a1"]


string> The value can
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1436


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"endPort" : {
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"description" : "description",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"location" : "10",
"vmName" : "10",
"ipv4" : ["192.168.1.1"],
"ipv6" : ["FE80::a1"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.9.5 Delete an End Port by ID

Typical Scenarios
An end port needs to be deleted by ID.

Functions
ID for deleting an end port.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1437


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/logicnetwork/endports/endport/{id}

Table 1-1112 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 an end port. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/endports/endport/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1438


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10 Logical VAS


# Logical VAS API description:

1. Define services for logical VAS NEs.

2. Define services for logical VAS routes.

1.9.7.10.1 Create a Logical VAS NE

Typical Scenarios
A logical VAS NE needs to be created.

Functions
Create a logical VAS NE, such as a logical firewall or a logical LB.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/vass

Request Parameters

Table 1-1113 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vas Yes REFER For details, see Parameters for -


ENCE Table 1-1114. creating a
logical VAS NE.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1439


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1114 LogicVasDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vas Yes ARRAY For details, see Logical VAS NE -


_REFER Table 1-1115. list.
ENCE

Table 1-1115 LogicVasDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

name Yes string 1 to 31 - Logical VAS NE "logicfw1"


charac name.
ters.

descrip No string 0 to - Logical VAS NE "This is vas"


tion 255 description.
charac
ters.

type Yes string - - Logical VAS NE "Firewall"


type. Firewall:
firewall;
Paloalto: PA
firewall;
FirewallOutCon
trol: firewall
not managed
by the
controller.

logicN Yes UUID - - Logical "a915f8c1-


etwork network to d06f-46cd-
Id which a logical a968-38328e0a
VAS device b2d3"
belongs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1440


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR No UUID - - Logical router "a915f8c1-


outerId connected to a d06f-46cd-
logical VAS a968-38328e0a
device. This b2d3"
parameter is
mandatory
when the VAS
type is firewall
or
firewallOutCon
trol.

tenantI No UUID - - Tenant to "a915f8c1-


d which a logical d06f-46cd-
network a968-38328e0a
belongs. This b2d3"
parameter can
be obtained by
the controller.

design No string 1 to - vSYS object "logicfw2"


atedN 255 name of the
ame charac logical VAS NE.
ters.

ipv6En No boolea - - Whether IPv6 -


able n is enabled.

routeD No boolea - - Whether to -


eployD n disable route
isable deployment.

vaspoo No array< - - List of -


lId string> associated VAS
pool IDs.

autoG No boolea - - Whether to -


enerat n automatically
eLink create an
internal link.

additio No REFER For details, see - -


nal ENCE Table 1-1116.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1441


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1116 AdditionalDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

create No string 0 to - Creation time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/vass HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vas" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "logicfw1",
"description" : "This is vas",
"type" : "Firewall",
"logicNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"logicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"tenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"designatedName" : "logicfw2",
"vaspoolId" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1442


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1117 LogicVasDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

vas ARRAY For details, see Table Logical VAS NE -


_REFER 1-1118. list.
ENCE

Table 1-1118 LogicVasDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

name string 1 to 31 - Logical VAS NE "logicfw1"


characters. name.

descrip string 0 to 255 - Logical VAS NE "This is vas"


tion characters. description.

type string - - Logical VAS NE "Firewall"


type. Firewall:
firewall;
Paloalto: PA
firewall;
FirewallOutCon
trol: firewall
not managed
by the
controller.

logicN UUID - - Logical "a915f8c1-


etwork network to d06f-46cd-
Id which a logical a968-38328e0a
VAS device b2d3"
belongs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1443


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicR UUID - - Logical router "a915f8c1-


outerId connected to a d06f-46cd-
logical VAS a968-38328e0a
device. This b2d3"
parameter is
mandatory
when the VAS
type is firewall
or
firewallOutCon
trol.

tenantI UUID - - Tenant to "a915f8c1-


d which a logical d06f-46cd-
network a968-38328e0a
belongs. This b2d3"
parameter can
be obtained by
the controller.

design string 1 to 255 - vSYS object "logicfw2"


atedN characters. name of the
ame logical VAS NE.

ipv6En boolea - - Whether IPv6 -


able n is enabled.

routeD boolea - - Whether to -


eployD n disable route
isable deployment.

vaspoo array< - - List of -


lId string> associated VAS
pool IDs.

autoG boolea - - Whether to -


enerat n automatically
eLink create an
internal link.

additio REFER For details, see Table - -


nal ENCE 1-1119.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1444


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1119 AdditionalDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Parameters for "CloudPlatform


er characters. configuring a 1"
condition.

create string 0 to 255 - Creation time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

update string 0 to 255 - Update time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vas" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "logicfw1",
"description" : "This is vas",
"type" : "Firewall",
"logicNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"logicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"tenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"designatedName" : "logicfw2",
"vaspoolId" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1445


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.2 Query the Logical VAS List

Typical Scenarios
The logical VAS list needs to be queried.

Functions
Query logical VAS device groups based on the configuration source, tenant, logical
network, logical router, and type.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vass

Table 1-1120 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

vasNa No string 0 to 36 - VAS name. "vas1"


me charac
ters.

tenantI No UUID - - Tenant ID. "a915f8c1-


d d06f-46cd-
a968-38328e0a
b2d3"

logicN No UUID - - Logical "a915f8c1-


etwork network to d06f-46cd-
Id which a logical a968-38328e0a
VAS device b2d3"
belongs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1446


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicR No UUID - - Logical router "a915f8c1-


outerId connected to a d06f-46cd-
logical VAS a968-38328e0a
device. b2d3"

type No string - - Logical VAS NE "Firewall"


list.

pageIn No string - - Page index. "1"


dex

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vass?producer=CloudPlatform1&vasName=vas1&tenantId=a915f8c1-
d06f-46cd-a968-38328e0ab2d3&logicNetworkId=a915f8c1-d06f-46cd-
a968-38328e0ab2d3&logicRouterId=a915f8c1-d06f-46cd-
a968-38328e0ab2d3&type=Firewall&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1121 LogicVasListDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

vas ARRAY For details, see Table Logical VAS NE -


_REFER 1-1118. list.
ENCE

totalN int64 - - Total number 100


um of results.

pageIn int64 - - Page index. 1


dex

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1447


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

pageSi int64 - - Page size. 4000


ze

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vas" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "logicfw1",
"description" : "This is vas",
"type" : "Firewall",
"logicNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"logicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"tenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"designatedName" : "logicfw2",
"vaspoolId" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
],
"totalNum" : 100,
"pageIndex" : 1,
"pageSize" : 4000
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.3 Query a Logical VAS NE by ID

Typical Scenarios
A logical VAS NE needs to be queried by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1448


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query a logical VAS NE by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vass/vas/{id}

Table 1-1122 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully
LogicVasDtoWrapper parameters, For details, see Table 1-1117.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1449


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vas" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "logicfw1",
"description" : "This is vas",
"type" : "Firewall",
"logicNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"logicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"tenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"designatedName" : "logicfw2",
"vaspoolId" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.4 Update a Logical VAS NE by ID

Typical Scenarios
Update a Logical VAS NE by ID.

Functions
Update a logical VAS NE by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
PUT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1450


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/servicenetwork/vass/vas/{id}

Table 1-1123 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

Request Parameters

Table 1-1124 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vas Yes REFER For details, see Parameters for -


ENCE Table 1-1114. updating a
logical VAS NE.

Sample Request
HTTP
PUT /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vas" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "logicfw1",
"description" : "This is vas",
"type" : "Firewall",
"logicNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"logicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"tenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"designatedName" : "logicfw2",
"vaspoolId" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1451


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

]
}

Response Parameters
Response status code 200: successfully

LogicVasDtoWrapper parameters, For details, see Table 1-1117.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vas" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "logicfw1",
"description" : "This is vas",
"type" : "Firewall",
"logicNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"logicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"tenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"designatedName" : "logicfw2",
"vaspoolId" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.5 Delete a Logical VAS NE by ID

Typical Scenarios
A logical VAS NE needs to be deleted by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1452


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Delete a logical VAS NE by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/vass/vas/{id}

Table 1-1125 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

Table 1-1126 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string - - Provider. "Agile-


er Controller-
MDC"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3?
producer=Agile-Controller-MDC HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1453


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.6 Query Southbound Configurations Based on VAS ID

Typical Scenarios
Logical VAS configurations need to be queried.

Functions
Query southbound configurations of a logical VAS.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vass/vas/{id}/detail

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1454


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1127 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string - - Logical VAS ID. "a915f8c1-


d06f-46cd-
a968-38328e0a
b2d3"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/detail HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1128 LogicVasConfigurationWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

vas ARRAY For details, see Table Logical VAS -


_REFER 1-1129. configuration.
ENCE

Table 1-1129 LogicVasConfiguration parameters

Param Type Value Range Defaul Description Example


eter t Value

deviceI string - - Device ID. "d6e575d5-3a8


d 6-393b-b312-
cf1936e7c212"

name string - - VAS name. "vsys_why11_5


058_1"

type string - - Type. "paloalto"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1455


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vaspor ARRAY For details, see Table VAS port -


t _REFER 1-1130. configuration.
ENCE

staticR ARRAY For details, see Table route -


oute _REFER 1-1131. configuration
ENCE

Table 1-1130 VasPortConfiguration parameters


Param Type Value Range Defaul Description Example
eter t Value

name string - - Interface name "ethernet1/11.


2002"

vlan int32 - - VLAN ID 2002

ipv4 string - - IPv4 address. "10.1.1.1/29"

ipv6 string - - IPv6 address. "FF80::1/126"

Table 1-1131 StaticRouteConfiguration parameters


Param Type Value Range Defaul Description Example
eter t Value

destina string - - Destination IP "10.1.1.0/24"


tion address.

nextho string - - Next hop. "10.1.1.1"


p

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1456


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Connection: keep-alive
{
"vas" : [
{
"deviceId" : "d6e575d5-3a86-393b-b312-cf1936e7c212",
"name" : "vsys_why11_5058_1",
"type" : "paloalto",
"vasport" : [
{
"name" : "ethernet1/11.2002",
"vlan" : 2002,
"ipv4" : "10.1.1.1/29",
"ipv6" : "FF80::1/126"
}
],
"staticRoute" : [
{
"destination" : "10.1.1.0/24",
"nexthop" : "10.1.1.1"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.7 Query a Logical Link by ID on a Logical VAS Device

Typical Scenarios
A logical link needs to be queried by ID on a logical VAS device.

Functions
Query a logical link by ID on a logical VAS device.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vass/vas/{id}/vaslink

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1457


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1132 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID - - Logical link ID. "a915f8c1-


d06f-46cd-
a968-38328e0a
b2d3"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/vaslink HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1133 LogicVasLinkWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

interna ARRAY For details, see Table Internal link -


llink _REFER 1-1134. list.
ENCE

extern ARRAY For details, see Table External link -


allink _REFER 1-1135. list.
ENCE

Table 1-1134 InternalLinkDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id UUID - - Internal link ID. "a915f8c1-


d06f-46cd-
a968-38328e0a
b2d3"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1458


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

name string 1 to 255 - Internal link "internal_link1"


characters. name.

routerI string 1 to 255 - IP address and "10.1.1.1/24"


p characters. mask for a
logical
interface on a
logical router.

vasIp string 1 to 255 - IP address and "10.1.1.1/24"


characters. mask for a
logical
interface on a
logical VAS
device.

vlan string 1 to 255 - Interconnection "100"


characters. VLAN.

vaspor UUID - - VAS port ID. "a915f8c1-


tId d06f-46cd-
a968-38328e0a
b2d3"

routerI string 1 to 255 - Logical IPv6 "FE80:0000:000


pv6 characters. address of a 0:0000:0000:00
logical router. 44:0000:0032/1
27"

vasIpv string 1 to 255 - IPv6 address of "FE80:0000:000


6 characters. a logical 0:0000:0000:00
interface on a 44:0000:0032/1
logical VAS 28"
device.

Table 1-1135 ExternalLinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID - - External link "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

name string 1 to 255 - External link "external_link1


characters. name. "

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1459


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extern UUID - - External "a915f8c1-


alGate gateway d06f-46cd-
wayId connected to a a968-38328e0a
logical VAS b2d3"
device.

extern UUID - - External "a915f8c1-


alNetw network d06f-46cd-
orkId domain a968-38328e0a
connected to a b2d3"
logical VAS
device.

vaspor UUID - - VAS port ID. "a915f8c1-


tId d06f-46cd-
a968-38328e0a
b2d3"

routerI string 0 to 255 - IPv6 "FE80:0000:000


pv6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032/1
router. 27"

vasIpv string 0 to 255 - IPv6 "FE80:0000:000


6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032/1
VAS device. 28"

ipv4Ac boolea - - Whether an -


cessExt n IPv4 address is
ernalE reachable to an
nable external
network.

ipv6Ac boolea - - Whether an -


cessExt n IPv6 address is
ernalE reachable to an
nable external
network.

routerI string 1 to 255 - IP address and "10.1.1.1/30"


p characters. mask for a
logical
interface on an
external
gateway.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1460


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vasIp string 1 to 255 - IP address and "10.1.1.1/30"


characters. mask for a
logical
interface on a
logical VAS
device.

vlan string 0 to 64 - Interconnection "100"


characters. VLAN.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"internallink" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "internal_link1",
"routerIp" : "10.1.1.1/24",
"vasIp" : "10.1.1.1/24",
"vlan" : "100",
"vasportId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128"
}
],
"externallink" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "external_link1",
"externalGatewayId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"externalNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasportId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"routerIp" : "10.1.1.1/30",
"vasIp" : "10.1.1.1/30",
"vlan" : "100"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1461


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.8 Create an Internal Link by ID on a Logical VAS Device

Typical Scenarios
An internal link needs to be created by ID on a logical VAS device.

Functions
Create an internal link by ID on a logical VAS device.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/vass/vas/{id}/vaslink/internallinks

Table 1-1136 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1462


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1137 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

interna Yes REFER For details, see Parameters for -


llink ENCE Table 1-1138. creating an
internal link on
a logical VAS
device.

Table 1-1138 InternalLinkWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

interna Yes ARRAY For details, see Objects in an -


llink _REFER Table 1-1139. internal link
ENCE list.

Table 1-1139 InternalLinkDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID - - Internal link ID. "a915f8c1-


d06f-46cd-
a968-38328e0a
b2d3"

name Yes string 1 to - Internal link "internal_link1"


255 name.
charac
ters.

routerI Yes string 1 to - IP address and "10.1.1.1/24"


p 255 mask for a
charac logical
ters. interface on a
logical router.

vasIp Yes string 1 to - IP address and "10.1.1.1/24"


255 mask for a
charac logical
ters. interface on a
logical VAS
device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1463


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vlan Yes string 1 to - Interconnection "100"


255 VLAN.
charac
ters.

vaspor No UUID - - VAS port ID. "a915f8c1-


tId d06f-46cd-
a968-38328e0a
b2d3"

routerI No string 1 to - Logical IPv6 "FE80:0000:000


pv6 255 address of a 0:0000:0000:00
charac logical router. 44:0000:0032/1
ters. 27"

vasIpv No string 1 to - IPv6 address of "FE80:0000:000


6 255 a logical 0:0000:0000:00
charac interface on a 44:0000:0032/1
ters. logical VAS 28"
device.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/vaslink/
internallinks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"internallink" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "internal_link1",
"routerIp" : "10.1.1.1/24",
"vasIp" : "10.1.1.1/24",
"vlan" : "100",
"vasportId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128"
}
]
}

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1464


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1140 InternalLinkWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

interna ARRAY For details, see Table Objects in an -


llink _REFER 1-1134. internal link
ENCE list.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"internallink" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "internal_link1",
"routerIp" : "10.1.1.1/24",
"vasIp" : "10.1.1.1/24",
"vlan" : "100",
"vasportId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.9 Delete an Intenal Link

Typical Scenarios
An internal link needs to be deleted.

Functions
Delete an internal link based on the VAS NE ID and link ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1465


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/vass/vas/{vasId}/vaslink/internallinks/internallink/
{id}

Table 1-1141 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vasId Yes UUID - - Logical VAS NE "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

id Yes UUID - - Internal link ID "a915f8c1-


of a logical d06f-46cd-
VAS NE. a968-38328e0a
b2d3"

Table 1-1142 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string - - Provider. "Agile-


er Controller-
MDC"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/vaslink/
internallinks/internallink/a915f8c1-d06f-46cd-a968-38328e0ab2d3?producer=Agile-Controller-MDC HTTP/
1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1466


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.10 Add New Routes for a Logical VAS Device

Typical Scenarios
New routes need to be added for a logical VAS device.

Functions
Add new routes for a logical VAS device.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1467


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/servicenetwork/vass/vas/{vasId}/routes

Table 1-1143 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vasId Yes string 36 - Logical VAS NE "a915f8c1-


charac ID. d06f-46cd-
ters. a968-38328e0a
b2d3"

Request Parameters

Table 1-1144 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-1145. paramete
rs for VAS
route
transmissi
on.

Table 1-1145 VasRoutesDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routeId Yes string 0 to - Route ID. "a915f8c1-


255 d06f-46cd-
charac a968-38328e0a
ters. b2d3"

vasId No string 0 to 36 - Logical VAS NE "a915f8c1-


charac ID. d06f-46cd-
ters. a968-38328e0a
b2d3"

destina Yes array< Each - List of -


tion string> item destination
has 0 network
to 255 segments. The
charac value is a
ters. string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1468


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

destRo Yes string 36 - Router ID. "a915f8c1-


uterId charac d06f-46cd-
ters. a968-38328e0a
b2d3"

additio No REFER For details, see - -


nal ENCE Table 1-1116.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/routes HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routeId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"destination" : [
"10.1.1.0/24"
],
"destRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}

Response Parameters
Response status code 200: successfully

Table 1-1146 VasRoutesDto parameters


Param Type Value Range Defaul Description Example
eter t Value

routeId string 0 to 255 - Route ID. "a915f8c1-


characters. d06f-46cd-
a968-38328e0a
b2d3"

vasId string 0 to 36 - Logical VAS NE "a915f8c1-


characters. ID. d06f-46cd-
a968-38328e0a
b2d3"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1469


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

destina array< Each item has 0 - List of -


tion string> to 255 destination
characters. network
segments. The
value is a
string.

destRo string 36 characters. - Router ID. "a915f8c1-


uterId d06f-46cd-
a968-38328e0a
b2d3"

additio REFER For details, see Table - -


nal ENCE 1-1119.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"routeId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"destination" : [
"10.1.1.0/24"
],
"destRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1470


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.10.11 Query New Routes for a Logical VAS Device in Batches

Typical Scenarios
New routes need to be queried in batches for a logical VAS device.

Functions
Query new routes for a logical VAS device in batches.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vass/routes

Table 1-1147 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routeId No string 0 to - Route ID. "a915f8c1-


255 d06f-46cd-
charac a968-38328e0a
ters. b2d3"

produc No string 0 to 36 - Provider. "Agile-


er charac Controller-
ters. MDC"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vass/routes?routeId=a915f8c1-d06f-46cd-
a968-38328e0ab2d3&producer=Agile-Controller-MDC HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1471


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1148 VasRoutesQueryDto parameters

Param Type Value Range Defaul Description Example


eter t Value

vasRou ARRAY For details, see Table List of VAS -


tes _REFER 1-1146. routes for
ENCE transmission.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vasRoutes" : [
{
"routeId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"destination" : [
"10.1.1.0/24"
],
"destRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1472


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.10.12 Update New Routes for a Logical VAS Device

Typical Scenarios
New routes need to be updated for a logical VAS device.

Functions
Update new routes for a logical VAS device.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
PUT

URI
/controller/dc/v3/servicenetwork/vass/vas/{vasId}/routes/{routeId}

Table 1-1149 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vasId Yes string 36 - Logical VAS NE "a915f8c1-


charac ID. d06f-46cd-
ters. a968-38328e0a
b2d3"

routeId Yes string 0 to - Route ID. "a915f8c1-


255 d06f-46cd-
charac a968-38328e0a
ters. b2d3"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1473


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1150 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1145. paramete
rs for VAS
route
transmissi
on.

Sample Request
HTTP
PUT /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/routes/a915f8c1-
d06f-46cd-a968-38328e0ab2d3 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"routeId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"destination" : [
"10.1.1.0/24"
],
"destRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}

Response Parameters
Response status code 200: successfully
VasRoutesDto parameters, For details, see Table 1-1146.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1474


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive
{
"routeId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"destination" : [
"10.1.1.0/24"
],
"destRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.10.13 Delete New Routes from a Logical VAS Device

Typical Scenarios
New routes need to be deleted from a logical VAS device.

Functions
Delete new routes from a logical VAS device.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/vass/vas/{vasId}/routes/{routeId}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1475


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1151 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vasId Yes string 36 - Logical VAS NE "a915f8c1-


charac ID. d06f-46cd-
ters. a968-38328e0a
b2d3"

routeId Yes string 0 to - Route ID. "a915f8c1-


255 d06f-46cd-
charac a968-38328e0a
ters. b2d3"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/vass/vas/a915f8c1-d06f-46cd-a968-38328e0ab2d3/routes/
a915f8c1-d06f-46cd-a968-38328e0ab2d3 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1476


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11 Logical Topology Management


Logical network O&M APIs:

1. Query information about device resources mapped to logical routers, logical


switches, logical ports, logical interfaces, and end points.

2. Specify the VXLAN tunnel list and VXLAN ingress replication table.

1.9.7.11.1 Query End Ports on VMs/BMs

Typical Scenarios
End ports on VMs/BMs need to be queried.

Functions
Query end ports on VMs/BMs based on a specified logical switch or physical
device.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/logictopo/endport

Table 1-1152 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to 36 - Port group ID. "10.23.15.1"


p charac
ters.

deviceI No string 0 to - Logical router "DBB702C3-77


d 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1477


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicS No string 0 to - Logical switch "DBB702C3-77


witchId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

endPor No string 0 to - Logical switch "DBB702C3-77


tId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

mac No string 0 to - MAC address "00:5E:


255 of a logical 00:63:96:95"
charac port.
ters.

ip No string 0 to - IP address of "192.168.1.1"


255 an end port.
charac
ters.

vmNa No string 0 to - Name. "vmPort"


me 255
charac
ters.

type No string - - End port type, "VM"


which can be
VM, BM, POD,
DYNAMIC.

hostNa No string 0 to - Host name. "hostName"


me 255
charac
ters.

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1478


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/endport?deviceIp=10.23.15.1&deviceId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicSwitchId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&endPortId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&mac=00:5E:
00:63:96:95&ip=192.168.1.1&vmName=vmPort&type=VM&hostName=hostName&pageIndex=1&pageSize=1
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1153 EndPortDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

endPor ARRAY For details, see Table "" -


t _REFER 1-1154.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of end ports.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1154 EndPortDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Object ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 0 to 255 - Object name. "name"


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1479


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

mac string 1 to 255 - MAC address "00:5E:


characters. of an end port. 00:63:96:95"

vmNa string 0 to 255 - Name of the "vmname"


me characters. VM where an
end port is
located.

vmmN string 0 to 255 - VMM name. "vmmname"


ame characters.

vmmTy string 0 to 255 - VMM type. "Openstack"


pe characters.

hostNa string 0 to 255 - Host name. "hostname"


me characters.

type string 0 to 255 VM End port type. "VM"


characters. VM or BM.

device string - - Port type, "compute:nova


Owner which can be "
compute:nova
or
network:dhcp.

metaD string - - Meta data of "metaData"


ata an end port.

status string 0 to 255 DOWN End port "DOWN"


characters. status, which
can be UP,
DOWN, or
UNKNOWN.

connec ARRAY For details, see Table "" -


tPort _REFER 1-1155.
ENCE

ip ARRAY For details, see Table "" ["10.10.10.1"]


_REFER 1-1156.
ENCE

vlan int32 [1-16777215] - Broadcast 10


domain.

vni int32 [1-16777215] - VXLAN ID. 10

belong REFER For details, see Table "" -


Info ENCE 1-1157.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1480


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

create string 0 to 255 - Creation time. "2017-08-10


Time characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


Time characters. 16:30:40"

names string 0 to 128 - Name space to "default"


pace characters. which K8s POD
belongs.

contai string 0 to 32 - K8s POD "RUNNING"


nerStat characters. running status.
us

Table 1-1155 ConnectPortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

ifNam string 1 to 255 - Interface "ifname"


e characters. name.

deviceI string 1 to 255 - Device "192.168.1.1"


p characters. management
IP address.

device string 1 to 255 - Connected "10GE1/0/10"


PortNa characters. physical port
me name.

device string 1 to 255 - Name of the "Device1"


Name characters. connected
device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1481


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1156 IpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ip string 0 to 256 - IP address. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

subnet string 0 to 256 - Subnet ID "DBB702C3-77


Id characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Table 1-1157 BelongInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

logicPo string 0 to 256 - ID of the "DBB702C3-77


rtId characters. logical port 19-4FE6-
directly A5AD-3A9C9E2
connected to 65309"
the end port.

logicS string 0 to 256 - Logical switch. "DBB702C3-77


witchId characters. 19-4FE6-
A5AD-3A9C9E2
65309"

logicS string 1 to 255 - Logical switch "logicswitch1"


witchN characters. name.
ame

logicR string 0 to 256 - Logical router "DBB702C3-77


outerId characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

logicR string 1 to 255 - Logical router "logicrouter1"


outerN characters. name.
ame

tenantI string 0 to 256 - Tenant ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabricI string 1 to 255 - Tenant name. "tenant1"


dNam characters.
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1482


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

vpcNa string 1 to 255 - VPC name. "VPC1"


me characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"endPort" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"mac" : "00:5E:00:63:96:95",
"vmName" : "vmname",
"vmmName" : "vmmname",
"vmmType" : "Openstack",
"hostName" : "hostname",
"type" : "VM",
"deviceOwner" : "compute:nova",
"metaData" : "metaData",
"status" : "DOWN",
"connectPort" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ifName" : "ifname",
"deviceIp" : "192.168.1.1",
"devicePortName" : "10GE1/0/10",
"deviceName" : "Device1"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1483


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
],
"ip" : ["10.10.10.1"],
"vlan" : 10,
"vni" : 10,
"belongInfo" : {
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "logicswitch1",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterName" : "logicrouter1",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricIdName" : "tenant1",
"producer" : "default",
"vpcName" : "VPC1"
},
"createTime" : "2017-08-10 16:30:40",
"updateTime" : "2017-08-10 16:30:40",
"namespace" : "default",
"containerStatus" : "RUNNING"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11.2 Query the Device Mapping Information of All Logical Interfaces

Typical Scenarios
The device mapping information of all logical ports needs to be queried based on
a specified condition.

Functions
Query the device mapping information of all logical interfaces based on a
specified device (with a specified logical router and interface type), a specified
logical router, and a specified logical interface.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1484


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/logicnetwork/logictopo/interface-map

Table 1-1158 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to 36 - Logical router "192.168.1.1"


p charac ID.
ters.

deviceI No string 0 to - Logical "DBB702C3-77


d 256 interface. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicIn No string 0 to - Logical "DBB702C3-77


terface 256 interface. 19-4FE6-
Id charac A5AD-3A9C9E2
ters. 65309"

interfa No string - - Port type. The "ConnectInterf


ceType options are as ace"
follows:
RouterInterface
: broadcast
domain port.
ConnectInterfa
ce:
interconnection
port. This field
cannot be
updated.

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1485


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/interface-map?
deviceIp=192.168.1.1&deviceId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicInterfaceId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&interfaceType=ConnectInterface&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1159 GetIfByConditionWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

interfa ARRAY For details, see Table "" -


ce _REFER 1-1160.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of logical ports.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1160 GetIfByConditionDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Object ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 255 - Object name. "name"


characters.

logicR string 0 to 256 - Logical router "DBB702C3-77


outerId characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1486


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

interfa string 0 to 255 Connec Port type. The "ConnectInterf


ceType characters. tInterfa options are as ace"
ce follows:
RouterInterface
: broadcast
domain port.
ConnectInterfa
ce:
interconnection
port. This field
cannot be
updated.

logicR string 1 to 255 - Management "router1"


outerN characters. IP address of a
ame device.

vrfNa string 1 to 255 - Logical router "vrf1"


me characters. name.

logicS string 0 to 256 - Logical switch. "DBB702C3-77


witchId characters. 19-4FE6-
A5AD-3A9C9E2
65309"

logicS string 0 to 255 - Logical switch "switch1"


witchN characters. name.
ame

physic ARRAY For details, see Table "" -


alIfList _REFER 1-1161.
ENCE

Table 1-1161 PhysicalPortDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1487


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

ifname string 0 to 255 - Name of a "ifName1"


characters. Layer 2 sub-
interface
corresponding
to the logical
port.

ifstatu string - DOWN Device port "DOWN"


s status, which
can be UP or
DOWN.

deviceI string 1 to 255 - Device "192.168.1.1"


p characters. management
IP address.

device string 1 to 255 - Name of the "devicePort1"


PortNa characters. physical port
me corresponding
to the logical
port.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"interface" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"interfaceType" : "ConnectInterface",
"logicRouterName" : "router1",
"vrfName" : "vrf1",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "switch1",
"physicalIfList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ifname" : "ifName1",
"ifstatus" : "DOWN",
"deviceIp" : "192.168.1.1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1488


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"devicePortName" : "devicePort1"
}
]
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11.3 Query the Device Mapping Information of All Logical Ports

Typical Scenarios
The device mapping information of all logical ports needs to be queried based on
a specified condition.

Functions
Query the device mapping information of all logical ports based on a specified
device (with a logical switch), a specified logical switch, and a specified logical
port.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/logictopo/port-map

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1489


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1162 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to 36 - Device "192.168.1.1"


p charac management
ters. IP address.
Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

deviceI No string 0 to - Device "DBB702C3-77


d 256 management 19-4FE6-
charac ID. Either the A5AD-3A9C9E2
ters. device 65309"
management
ID or device ID
can be set.

logicPo No string 0 to - Logical port ID. "DBB702C3-77


rtId 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

logicS No string 0 to - Logical switch "DBB702C3-77


witchId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/port-map?
deviceIp=192.168.1.1&deviceId=DBB702C3-7719-4FE6-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1490


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

A5AD-3A9C9E265309&logicPortId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicSwitchId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1163 LogicPortPhysicalMapDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

port ARRAY For details, see Table "" -


_REFER 1-1164.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of logical ports.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1164 LogicPortPhysicalMapDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Object ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 255 - Object name. "name1"


characters.

bridge int32 [1-16777215] - Broadcast 10


Domai domain.
nId

logicS string 0 to 256 - Logical switch "DBB702C3-77


witchId characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1491


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicS string 1 to 255 - Logical switch "switch1"


witchN characters. name.
ame

physic ARRAY For details, see Table "" -


alPortli _REFER 1-1161.
st ENCE

endPor ARRAY For details, see Table "" -


t _REFER 1-1165.
ENCE

Table 1-1165 EndPortDtoPhy parameters


Param Type Value Range Defaul Description Example
eter t Value

endPor string 0 to 256 - End port ID. "DBB702C3-77


tId characters. 19-4FE6-
A5AD-3A9C9E2
65309"

endPor string 1 to 255 - End port IP "192.168.1.1"


tIp characters. address.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"port" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name1",
"bridgeDomainId" : 10,
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicSwitchName" : "switch1",
"physicalPortlist" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ifname" : "ifName1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1492


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"ifstatus" : "DOWN",
"deviceIp" : "192.168.1.1",
"devicePortName" : "devicePort1"
}
],
"endPort" : [
{
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortIp" : "192.168.1.1"
}
]
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11.4 Query the Device Mapping Information of All Logical Routers Based on a
Specified Condition

Typical Scenarios
The device mapping information of all logical routers needs to be queried based
on a specified condition.

Functions
Query the device mapping information of all logical routers based on a specified
device (with a logical router) or a specified logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/logictopo/router-map

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1493


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1166 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to 36 - Logical router "192.168.1.1"


p charac ID.
ters.

deviceI No string 0 to - Device "DBB702C3-77


d 256 management 19-4FE6-
charac ID. Either the A5AD-3A9C9E2
ters. device 65309"
management
ID or device ID
can be set.

logicR No string 0 to - Logical router "DBB702C3-77


outerId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/router-map?
deviceIp=192.168.1.1&deviceId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1494


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1167 LogicRouterDtoListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

router ARRAY For details, see Table "" -


_REFER 1-1168.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of queried
logical routers.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1168 LogicRouterDto parameters


Param Type Value Range Defaul Description Example
eter t Value

vrfNa string 0 to 255 - VRF name of a "vrfName"


me characters. logical router.

import array< - - Import RT of ["10:111"]


RouteT string> the BGP EVPN
argets on a logical
router. The
value is a
string.

name string 1 to 255 - Logical router "name"


characters. name.

id string 0 to 256 - Logical router "DBB702C3-77


characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

vni int32 [1-16000000] - VNI of a logical 10


router.

export array< 0-255 items. - Export RT of ["10:111"]


RouteT string> the BGP EVPN
argets a logical
switch. The
value is a
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1495


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table "" -


List _REFER 1-1169.
ENCE

fabricL ARRAY For details, see Table "" -


ist _REFER 1-1170.
ENCE

Table 1-1169 DeviceListDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 256 - Device group "DBB702C3-77


GroupI characters. ID of a physical 19-4FE6-
d device. A5AD-3A9C9E2
65309"

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

deviceI string 0 to 255 - Device "192.168.1.1"


p characters. management
IP address.

routeD string [0-255] - Logical router "RD"


istingui RD.
sher

Table 1-1170 FabricListDto parameters


Param Type Value Range Defaul Description Example
eter t Value

fabricI string 0 to 256 - Fabric ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

fabricI string 1 to 255 - Fabric name. "fabricId1"


dNam characters.
e

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1496


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"router" : [
{
"vrfName" : "vrfName",
"importRouteTargets" : ["10:111"],
"name" : "name",
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vni" : 10,
"exportRouteTargets" : ["10:111"],
"deviceList" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1",
"routeDistinguisher" : "RD"
}
],
"fabricList" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricIdName" : "fabricId1"
}
]
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11.5 Query the Device Mapping Information of All Logical Switches

Typical Scenarios
The device mapping information of all logical switches needs to be queried based
on a specified condition.

Functions
Query the device mapping information of all logical switches based on a specified
condition.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1497


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/logictopo/switch-map

Table 1-1171 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to 36 - Device "192.168.1.1"


p charac management
ters. IP address.
Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

deviceI No string 0 to - Device "DBB702C3-77


d 256 management 19-4FE6-
charac ID. Either the A5AD-3A9C9E2
ters. device 65309"
management
ID or device ID
can be set.

logicS No string 0 to - Logical switch "DBB702C3-77


witchId 256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1498


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/switch-map?
deviceIp=192.168.1.1&deviceId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicSwitchId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1172 LogicSwitchDevicemapDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

switch ARRAY For details, see Table "" -


_REFER 1-1173.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of logical
switches.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1173 LogicSwitchDevicemapDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Logical switch "DBB702C3-77


characters. ID. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1499


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

import array< Each item has 0 - Import RT of ["10:111"]


RouteT string> to 255 the BGP EVPN
argets characters. on a logical
switch. The
value is a
string.

name string 1 to 255 - Logical switch "name1"


characters. name.

bridge int32 [0-16777215] - Bridge domain 10


Domai ID.
nId

vni int32 [0-16000000] - Logical switch 10


VNI.

export array< 0-255 items. - Export RT of ["10:111"]


RouteT string> Each item has 0 the BGP EVPN
argets to 255 a logical
characters. switch. The
value is a
string.

device ARRAY For details, see Table "" -


List _REFER 1-1169.
ENCE

fabricL ARRAY For details, see Table "" -


ist _REFER 1-1170.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"switch" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"importRouteTargets" : ["10:111"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1500


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"name" : "name1",
"bridgeDomainId" : 10,
"vni" : 10,
"exportRouteTargets" : ["10:111"],
"deviceList" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "192.168.1.1",
"routeDistinguisher" : "RD"
}
],
"fabricList" : [
{
"fabricId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"fabricIdName" : "fabricId1"
}
]
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11.6 Query VXLAN Tunnels

Typical Scenarios
VXLAN tunnels need to be queried by device.

Functions
Query VXLAN tunnels by device.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/logictopo/vxlan-tunnels

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1501


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1174 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to 36 - Query All "192.168.1.1"


p charac VXLAN Ingress
ters. Replication
Tables

deviceI No string 0 to - Device "DBB702C3-77


d 256 management 19-4FE6-
charac ID. Either the A5AD-3A9C9E2
ters. device 65309"
management
ID or device ID
can be set.

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/vxlan-tunnels?
deviceIp=192.168.1.1&deviceId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&pageIndex=1&pageSize=1
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1502


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1175 VxlanTunnelDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

vxlanT ARRAY For details, see Table "" -


unnels _REFER 1-1176.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of VXLAN
tunnels.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1176 VxlanTunnelDto parameters


Param Type Value Range Defaul Description Example
eter t Value

status string 0 to 255 DOWN VXLAN tunnel "DOWN"


characters. status, which
can be UP,
DOWN,
ERROR, or
UNKNOWN.

peerVt string 0 to 255 - Peer VTEP IP "192.168.1.1"


epIp characters. address.

localVt string 1 to 255 - Source VTEP IP "192.168.1.2"


epIp characters. address.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1503


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vxlanTunnels" : [
{
"status" : "DOWN",
"peerVtepIp" : "192.168.1.1",
"localVtepIp" : "192.168.1.2"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.11.7 Query All VXLAN Ingress Replication Tables

Typical Scenarios
VXLAN ingress replication tables need to be queried by device.

Functions
Query all VXLAN ingress replication tables by device.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/logictopo/vni-peers

Table 1-1177 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to 36 - Total number "192.168.1.1"


p charac of end ports.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1504


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to - Object ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page index. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/logictopo/vni-peers?
deviceIp=192.168.1.1&deviceId=DBB702C3-7719-4FE6-A5AD-3A9C9E265309&pageIndex=1&pageSize=1
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1178 VniPeerDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

vniPee ARRAY For details, see Table "" -


r _REFER 1-1179.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of VNI peers.

pageIn int32 [1-2147483647 - Page index. 1


dex ]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1505


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

pageSi int32 [1-2147483647 - Page size. 1


ze ]

Table 1-1179 VniPeerDto parameters

Param Type Value Range Defaul Description Example


eter t Value

localVt string 1 to 255 - Source VTEP IP "192.168.1.1"


epIp characters. address.

vni int64 [1-16000000] - VNI. 10

peerVt string 1 to 255 - Destination "192.168.1.2"


epIp characters. VTEP IP
address.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vniPeer" : [
{
"localVtepIp" : "192.168.1.1",
"vni" : 10,
"peerVtepIp" : "192.168.1.2"
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1506


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.7.12 Logical Topology


# Logical topology APIs for querying VAS devices

1.9.7.12.1 Query Device Information Based on Conditions

Typical Scenarios
Devices need to be queried.

Functions
Query the device mapping information of all logical VAS devices based on a
specified condition, such as a logical VAS device, logical router, or specified device.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/logictopo/vas-map

Table 1-1180 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicV No UUID - - ID of a "DBB702C3-77


asId specified 19-4FE6-
logical VAS. A5AD-3A9C9E2
6530"

logicR No UUID - - Logical router "DBB702C3-77


outerId ID 19-4FE6-
A5AD-3A9C9E2
6530"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1507


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No string 0 to - Device "172.16.0.1"


p 255 management
charac IP address.
ters. Either the
device ID or
the device
management
ID can be set.
This field
cannot be
updated.

deviceI No UUID - - Device ID. "DBB702C3-77


d Either the 19-4FE6-
device ID or A5AD-3A9C9E2
device 6530"
management
IP address can
be set.

pageIn No string - - Current page "1"


dex number.

pageSi No string - - Page size. "4000"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/logictopo/vas-map?logicVasId=DBB702C3-7719-4FE6-
A5AD-3A9C9E26530&logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E26530&deviceIp=172.16.0.1&deviceId=DBB702C3-7719-4FE6-
A5AD-3A9C9E26530&pageIndex=1&pageSize=4000 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1508


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1181 LogicVASDevicemapsDto parameters


Param Type Value Range Defaul Description Example
eter t Value

vas ARRAY For details, see Table - -


_REFER 1-1182.
ENCE

totalN int64 - - Total number 100


um of results.

pageIn int64 - - Page index. 1


dex

pageSi int64 - - Page size. 4000


ze

Table 1-1182 LogicVASDevicemapDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI ARRAY For details, see Table Device -


nfo _REFER 1-1183. information
ENCE list.

logicR UUID - - Logical router "CCB702C3-77


outerId connected to a 19-4FE6-
logical VAS A5AD-3A9C9E2
device. This 65309"
parameter is
mandatory
when the VAS
type is firewall
or
firewallOutCon
trol.

vrfNa string 0 to 255 - VRF name "tenant1_route


me characters. corresponding r1_1"
to a logical
router.

id UUID - - VAS object ID. "CCB702C3-77


19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 31 - VAS object "logicfw1"


characters. name.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1509


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

type string 1 to 255 - Logical VAS NE "Firewall"


characters. list.

vsysNa string 0 to 255 - Virtual system "vsys1"


me characters. name, which is
valid only
when the
logical VAS
type is firewall.

fabricD ARRAY For details, see Table Device -


eviceIn _REFER 1-1184. information list
fo ENCE on the fabric
side.

interna ARRAY For details, see Table Physical -


llink _REFER 1-1185. information list
ENCE of internal link
mapping.

extern ARRAY For details, see Table Physical -


allink _REFER 1-1188. information list
ENCE of external link
mapping.

Table 1-1183 VasDeviceInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

vasPoo UUID - - VAS resource "CBB702C3-77


lId pool. 19-4FE6-
A5AD-3A9C9E2
65309"

deviceI UUID - - Device "CBB702C3-77


d management 19-4FE6-
IP address. A5AD-3A9C9E2
65309"

deviceI string 0 to 255 - Device "172.16.0.1"


p characters. management
IP address.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1510


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1184 FabricDeviceInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

router UUID - - Device "BB702C3-7719


DeviceI management -4FE6-
d IP address. A5AD-3A9C9E2
65309"

router string 0 to 255 - Device "10.1.1.1"


DeviceI characters. management
p IP address.

fabricI string 0 to 255 - Fabric ID. "BB702C3-7719


d characters. -4FE6-
A5AD-3A9C9E2
65309"

device string 0 to 255 - Device group "BB702C3-7719


GroupI characters. ID. -4FE6-
d A5AD-3A9C9E2
65309"

Table 1-1185 DeviceInternalLinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

interna ARRAY For details, see Table Internal link -


llink _REFER 1-1186. set.
ENCE

vasIfN string 0 to 255 - Interface name "vlanif100"


ame characters. on a logical
VAS device.

routerI string 0 to 255 - Interface name "vBDIF100"


fName characters. on a logical
router.

link ARRAY For details, see Table Physical link -


_REFER 1-1187. set.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1511


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1186 InternalLinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID - - Internal link ID. "a915f8c1-


d06f-46cd-
a968-38328e0a
b2d3"

name string 1 to 255 - Internal link "internal_link1"


characters. name.

routerI string 1 to 255 - IP address and "10.1.1.1/24"


p characters. mask for a
logical
interface on a
logical router.

vasIp string 1 to 255 - IP address and "10.1.1.1/24"


characters. mask for a
logical
interface on a
logical VAS
device.

vlan string 1 to 255 - Interconnection "100"


characters. VLAN.

vaspor UUID - - VAS port ID. "a915f8c1-


tId d06f-46cd-
a968-38328e0a
b2d3"

routerI string 1 to 255 - Logical IPv6 "FE80:0000:000


pv6 characters. address of a 0:0000:0000:00
logical router. 44:0000:0032/1
27"

vasIpv string 1 to 255 - IPv6 address of "FE80:0000:000


6 characters. a logical 0:0000:0000:00
interface on a 44:0000:0032/1
logical VAS 28"
device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1512


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1187 LinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI UUID - - Device ID on a "CCB702C3-77


d VAS NE. 19-4FE6-
A5AD-3A9C9E2
65309"

deviceI string 0 to 255 - Device "172.16.0.1"


p characters. management
IP address.

port string 0 to 255 - Port name. "ETH-TRUNK


characters. 10"

fabricD UUID - - Device name "CDD702C3-77


eviceId on a fabric 19-4FE6-
device. A5AD-3A9C9E2
65311"

fabricD string 0 to 255 - Device "172.16.0.2"


eviceIp characters. management
IP address on a
fabric device.

fabricP string 0 to 255 - Port name on a "ETH-TRUNK


ort characters. fabric device. 10"

Table 1-1188 DeviceExternalLinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

extern ARRAY For details, see Table External link -


allink _REFER 1-1189. set.
ENCE

vasIfN string 0 to 255 - Interface name "vlanif100"


ame characters. on a logical
VAS device.

routerI string 0 to 255 - Interface name "vBDIF100"


fName characters. on a logical
router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1513


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extern string 0 to 255 - Virtual system "vBDIF100"


alVsys characters. name, which is
Name valid only
when the
logical VAS
type is firewall.

link ARRAY For details, see Table Physical link -


_REFER 1-1187. set.
ENCE

Table 1-1189 ExternalLinkDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID - - External link "a915f8c1-


ID. d06f-46cd-
a968-38328e0a
b2d3"

name string 1 to 255 - External link "external_link1


characters. name. "

extern UUID - - External "a915f8c1-


alGate gateway d06f-46cd-
wayId connected to a a968-38328e0a
logical VAS b2d3"
device.

extern UUID - - External "a915f8c1-


alNetw network d06f-46cd-
orkId domain a968-38328e0a
connected to a b2d3"
logical VAS
device.

vaspor UUID - - VAS port ID. "a915f8c1-


tId d06f-46cd-
a968-38328e0a
b2d3"

routerI string 0 to 255 - IPv6 "FE80:0000:000


pv6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032/1
router. 27"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1514


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

vasIpv string 0 to 255 - IPv6 "FE80:0000:000


6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032/1
VAS device. 28"

ipv4Ac boolea - - Whether an -


cessExt n IPv4 address is
ernalE reachable to an
nable external
network.

ipv6Ac boolea - - Whether an -


cessExt n IPv6 address is
ernalE reachable to an
nable external
network.

routerI string 1 to 255 - IP address and "10.1.1.1/30"


p characters. mask for a
logical
interface on an
external
gateway.

vasIp string 1 to 255 - IP address and "10.1.1.1/30"


characters. mask for a
logical
interface on a
logical VAS
device.

vlan string 0 to 64 - Interconnection "100"


characters. VLAN.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1515


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"vas" : [
{
"deviceInfo" : [
{
"vasPoolId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "172.16.0.1"
}
],
"logicRouterId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrfName" : "tenant1_router1_1",
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"type" : "Firewall",
"vsysName" : "vsys1",
"fabricDeviceInfo" : [
{
"routerDeviceId" : "BB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerDeviceIp" : "10.1.1.1",
"fabricId" : "BB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupId" : "BB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"internallink" : [
{
"internallink" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "internal_link1",
"routerIp" : "10.1.1.1/24",
"vasIp" : "10.1.1.1/24",
"vlan" : "100",
"vasportId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128"
}
],
"vasIfName" : "vlanif100",
"routerIfName" : "vBDIF100",
"link" : [
{
"deviceId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "172.16.0.1",
"port" : "ETH-TRUNK 10",
"fabricDeviceId" : "CDD702C3-7719-4FE6-A5AD-3A9C9E265311",
"fabricDeviceIp" : "172.16.0.2",
"fabricPort" : "ETH-TRUNK 10"
}
]
}
],
"externallink" : [
{
"externallink" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "external_link1",
"externalGatewayId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"externalNetworkId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"vasportId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"routerIp" : "10.1.1.1/30",
"vasIp" : "10.1.1.1/30",
"vlan" : "100"
}
],
"vasIfName" : "vlanif100",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1516


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"routerIfName" : "vBDIF100",
"externalVsysName" : "vBDIF100",
"link" : [
{
"deviceId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceIp" : "172.16.0.1",
"port" : "ETH-TRUNK 10",
"fabricDeviceId" : "CDD702C3-7719-4FE6-A5AD-3A9C9E265311",
"fabricDeviceIp" : "172.16.0.2",
"fabricPort" : "ETH-TRUNK 10"
}
]
}
]
}
],
"totalNum" : 100,
"pageIndex" : 1,
"pageSize" : 4000
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect. example, the parameter type or
value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.13 Logical Topology (Not Recommended)


# Description of logical interfaces:

1. Query the information about a logical port

2. Query information about a logical router

3. Query the logical switch list

4. Query subnet information

5. Logical port mapping

6. Query the tenant list

1.9.7.13.1 Query the Information About the Logical Port Pair

Typical Scenarios
A logical port pair needs to be queried.

Functions
Query information about logical port pairs based on conditions.

Constraints
User role: northbound operator.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1517


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/acdcn/v3/gbpapi/getLogicportpeers

Request Parameters

Table 1-1190 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Query -


NCE 1-1191. criteria of
logical
port pairs.
It is an
input
paramete
r model
class.

Table 1-1191 PortPeerDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

logicPo No array< Each - ID of a logical -


rtIdList string> item port.
has 1
to 36
charac
ters.

endPor No array< Each - ID of the user -


tIdList string> item port.
has 1
to 36
charac
ters.

logicS No array< Each - ID of a logical -


witchId string> item switch.
List has 1
to 36
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1518


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /acdcn/v3/gbpapi/getLogicportpeers HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicPortIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"endPortIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"logicSwitchIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}

Response Parameters
Response status code 200: successfully

Table 1-1192 PortPeerListDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

portPe ARRAY For details, see Table - -


erList _REFER 1-1193.
ENCE

portPe int32 - - Total number. 20


erTotal
Num

Table 1-1193 PortPeerDto parameters


Param Type Value Range Defaul Description Example
eter t Value

logicPo UUID 1 to 36 - ID of a logical "DBB702C3-77


rtId characters. port. 19-4FE6-
A5AD-3A9C9E2
65309"

logicPo string - - - -
rtNam
e

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1519


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

endPor UUID 1 to 36 - ID of the user "DBB702C3-77


tId characters. port. 19-4FE6-
A5AD-3A9C9E2
65309"

endPor string - - Name of the "endPort"


tName end port.

endPor int32 - - Type of the 1


tType end port. The
value 1
indicates
automatic
creation, and
the value 2
indicates
manual
creation.

endPor string 1 to 36 - IP address of "10.168.11.22"


tIp characters. the user port.

endPor string 1 to 255 - MAC address "10"


tMac characters. of an end port.

endPor int32 - - VLAN ID of the 2000


tVlanId end port.

endPor string 1 to 255 - Returned host "Host1"


tHostN characters. name when
ame the end port is
a VM or BM.

endPor UUID 1 to 36 - Returned host "DBB702C3-77


tHostI characters. ID when the 19-4FE6-
d end port is a A5AD-3A9C9E2
VM or BM. 65309"

endPor string 1 to 255 - Returned VM "Vm1"


tVMNa characters. name when
me the end port is
a VM.

logicS UUID 1 to 36 - ID of a logical "DBB702C3-77


witchId characters. switch. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1520


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"portPeerList" : [
{
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortName" : "endPort",
"endPortType" : 1,
"endPortIp" : "10.168.11.22",
"endPortMac" : "10",
"endPortVlanId" : 2000,
"endPortHostName" : "Host1",
"endPortHostId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"endPortVMName" : "Vm1",
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"portPeerTotalNum" : 20
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.13.2 Query Logical Router Information

Typical Scenarios
Logical router information needs to be queried.

Functions
Query logical router information based on conditions.

Constraints
User role: northbound operator.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1521


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/acdcn/v3/gbpapi/getLogicrouters

Request Parameters

Table 1-1194 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Logical -


NCE 1-1195. router
query
criteria,
which is
an input
paramete
r model
class.

Table 1-1195 LogicRouterDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR No array< Each - ID of a logical -


outerId string> item router.
List has 1
to 36
charac
ters.

tenantI No UUID 1 to 36 - Tenant ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Sample Request
HTTP
POST /acdcn/v3/gbpapi/getLogicrouters HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicRouterIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1522


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}

Response Parameters
Response status code 200: successfully

Table 1-1196 LogicRouterDtoListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

logicR ARRAY For details, see Table - -


outerLi _REFER 1-1197.
st ENCE

Table 1-1197 LogicRouterDto parameters


Param Type Value Range Defaul Description Example
eter t Value

logicR UUID 1 to 36 - ID of a logical "DBB702C3-77


outerId characters. router. 19-4FE6-
A5AD-3A9C9E2
65309"

logicR string 1 to 255 - Name of a "router1"


outerN characters. logical router.
ame

vrfNa string 1 to 255 - VRF name. "Vrf1"


me characters.

vni int64 - - - -

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"logicRouterList" : [
{
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicRouterName" : "router1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1523


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vrfName" : "Vrf1"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.13.3 Query Logical Switch Information

Typical Scenarios
Logical switch information needs to be queried.

Functions
Query logical switch information based on conditions.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/gbpapi/getLogicswitches

Request Parameters

Table 1-1198 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Logical -


NCE 1-1199. switch
query
criteria,
which is
an input
paramete
r model
class.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1524


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1199 LogicSwitchDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicS No array< Each - ID of a logical -


witchId string> item switch.
List has 1
to 36
charac
ters.

logicR No UUID 1 to 36 - ID of a logical "DBB702C3-77


outerId charac router. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Sample Request
HTTP
POST /acdcn/v3/gbpapi/getLogicswitches HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicSwitchIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}

Response Parameters
Response status code 200: successfully

Table 1-1200 LogicSwitchDtoListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

logicS ARRAY For details, see Table - -


witchLi _REFER 1-1201.
st ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1525


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1201 LogicSwitchDto parameters

Param Type Value Range Defaul Description Example


eter t Value

logicS UUID 1 to 36 - ID of a logical "DBB702C3-77


witchId characters. switch. 19-4FE6-
A5AD-3A9C9E2
65309"

logicS string - - - -
witchN
ame

vni int32 - - - -

bd int32 - - - -

subnet array< Each item has 1 - Subnet ID. -


List string> to 36
characters.

subnet array< - - - -
NameL string>
ist

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"logicSwitchList" : [
{
"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1526


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.7.13.4 Query Subnet Information

Typical Scenarios
Subnet information needs to be queried.

Functions
Query subnet information based on search criteria.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/gbpapi/getSubnets

Request Parameters

Table 1-1202 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Subnet -


NCE 1-1203. search
criteria,
which is
an input
paramete
r model
class.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1527


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1203 SubnetInfoDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicS No array< Each - ID of a logical -


witchId string> item switch.
List has 1
to 36
charac
ters.

subnet No array< Each - Subnet ID. -


List string> item
has 1
to 36
charac
ters.

Sample Request
HTTP
POST /acdcn/v3/gbpapi/getSubnets HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicSwitchIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
],
"subnetList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}

Response Parameters
Response status code 200: successfully

Table 1-1204 SubnetInfoDtoListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

subnet ARRAY For details, see Table - -


List _REFER 1-1205.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1528


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1205 SubnetInfoDto parameters

Param Type Value Range Defaul Description Example


eter t Value

logicS UUID 1 to 36 - ID of a logical "DBB702C3-77


witchId characters. port. 19-4FE6-
A5AD-3A9C9E2
65309"

subnet string - - Subnet ID. "DBB702C3-77


Id 19-4FE6-
A5AD-3A9C9E2
65388"

subnet string 1 to 255 - Subnet name. "subnet1"


Name characters.

cidr string 1 to 255 - Subnet CIDR. "10.168.11.0/24


characters. "

allocat ARRAY For details, see Table - -


ion- _REFER 1-1206.
pools ENCE

Table 1-1206 L23OamAllocationPooLDto parameters

Param Type Value Range Defaul Description Example


eter t Value

start string 1 to 36 - Start IP "10.168.11.22"


characters. address.

end string 1 to 36 - End IP address. "10.168.11.22"


characters.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"subnetList" : [
{

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1529


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"logicSwitchId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265388",
"subnetName" : "subnet1",
"cidr" : "10.168.11.0/24",
"allocation-pools" : [
{
"start" : "10.168.11.22",
"end" : "10.168.11.22"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.13.5 Query Logical Port Mapping Information

Typical Scenarios
Logical port mapping information needs to be queried.

Functions
Query logical port mapping information based on conditions.

Constraints
User role: northbound operator.

HTTP Method
POST

URI
/acdcn/v3/gbpapi/mapping/logicport

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1530


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1207 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Logical -


NCE 1-1208. port
mapping
query
criteria,
which is
an input
paramete
r model
class.

Table 1-1208 LogicPortIdListWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicPo No array< Each - ID of a logical -


rtIdList string> item port.
has 1
to 36
charac
ters.

Sample Request
HTTP
POST /acdcn/v3/gbpapi/mapping/logicport HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"logicPortIdList" : [
"DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
]
}

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1531


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1209 PortMappingWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

portM ARRAY For details, see Table - -


apping _REFER 1-1210.
List ENCE

Table 1-1210 PortMappingDto parameters

Param Type Value Range Defaul Description Example


eter t Value

logicPo UUID 1 to 36 - ID of a logical "DBB702C3-77


rtId characters. port. 19-4FE6-
A5AD-3A9C9E2
65309"

underl ARRAY For details, see Table - -


ayPort _REFER 1-1211.
List ENCE

Table 1-1211 UnderlayPortDto parameters

Param Type Value Range Defaul Description Example


eter t Value

deviceI string - - Device ID. "DBB702C3-77


d 19-4FE6-
A5AD-3A9C9E2
65378"

portId UUID 1 to 36 - ID of a logical "DBB702C3-77


characters. port. 19-4FE6-
A5AD-3A9C9E2
65309"

portNa string 1 to 255 - Interface "port1"


me characters. name.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1532


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"portMappingList" : [
{
"logicPortId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"underlayPortList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265378",
"portId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"portName" : "port1"
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.13.6 Query Information About All Tenants

Typical Scenarios
Information about all tenants needs to be queried.

Functions
Query information about all tenants.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/acdcn/v3/gbpapi/tenant

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1533


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

GET /acdcn/v3/gbpapi/tenant HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1212 TenantResultList parameters


Param Type Value Range Defaul Description Example
eter t Value

tenant ARRAY For details, see Table - -


List _REFER 1-1213.
ENCE

Table 1-1213 TenantDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID 1 to 36 - Tenant ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

name string - - - -

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"tenantList" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1534


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14 VPC Communication

1.9.7.14.1 Create VPC Communication

Typical Scenarios
VPC interworking needs to be created.

Functions
Create a VPC communication instance.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
POST

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections

Request Parameters

Table 1-1214 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table VPC -


NCE 1-1215. interworki
ng entity
to be
created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1535


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1215 vpc-connections parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpc- No ARRAY For details, see List of VPC ["11000000-20


connec _REFER Table 1-1216. connection 00-0000-0000-
tion ENCE objects. 000000000020
"]

Table 1-1216 vpc-connection parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

uuid Yes string 36 - vpc-connection "11000000-200


charac ID 0-0000-0000-0
ters. 00000000020"
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

name No string 0 to - VPC connection "vpc-


255 name. connection"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1536


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

update No string 0 to - Update time. "2017-01-13T0


d-at 128 5:30:31"
charac
ters.

create No string 0 to - Creation time. "2017-01-13T0


d-at 128 5:30:31"
charac
ters.

cloud- Yes string 0 to - Cloud platform "openstack"


name 255 name.
charac
ters.

tenant Yes string 0 to - Tenant ID. "tenant"


-id 128
charac
ters.

status No string 0 to - Status. -


128
charac
ters.

admin- No boolea - - The true


state- n administrative
up state of the
object, which is
up (true) or
down (false).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1537


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

local- Yes string 36 - Local router ID "11000000-200


router- charac representation: 0-0000-0000-0
id ters. f81d4fae-7dec- 00000000020"
The 11d0-
value a765-00a0c91e
must 6bf6
meet
the router id
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

peer- No array< - - Peer subnet list -


subnet string> representation:
s f81d4fae-7dec-
11d0-
a765-00a0c91e
6bf6 router id

descrip No string 0 to - Description of "this is a


tion 256 the IKE policy. description"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1538


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peer- Yes string 36 - Peer router ID "11000000-200


router- charac representation: 0-0000-0000-0
id ters. f81d4fae-7dec- 00000000020"
The 11d0-
value a765-00a0c91e
must 6bf6
meet
the router id
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

local- No array< - - Subnet ID set. ["11000000-20


subnet string> 00-0000-0000-
s 000000000020
"]

local- No array< - - CIDR of the ["192.168.1.1/2


cidrs string> local subnet. 4"]
Either local-
subnets or
CIDR of the
local subnet is
selected.

local- No boolea - - Whether to false


firewal n enable the
l- traffic of the
enable local router to
pass through
the firewall.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1539


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peer- No array< - - CIDR of the ["192.168.2.1/2


cidrs string> peer subnet. 4"]
Either this
parameter or
peer-subnets is
selected.

peer- No boolea - - Whether to false


firewal n enable the
l- traffic of the
enable peer router to
pass through
the firewall.

mode No integer - - The value 0 0


indicates that
traffic is
automatically
diverted to the
video wall
based on
whether
firewall
services exist.
The value 1
indicates that
whether traffic
passes through
the firewall is
manually
specified.

priority No integer - - Route 1


preference.

Sample Request
HTTP
POST /restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vpc-connection" : ["11000000-2000-0000-0000-000000000020"]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1540


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 201: Response status code 201: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 201: Response status code 201: OK.
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.2 Query the VPC Interworking List

Typical Scenarios
VPC interworking needs to be queried.

Functions
Query all VPC interworking relationships.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1541


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-1217 vpc-connections parameters


Param Type Value Range Defaul Description Example
eter t Value

vpc- ARRAY For details, see Table List of VPC ["11000000-20


connec _REFER 1-1218. connection 00-0000-0000-
tion ENCE objects. 000000000020
"]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1542


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1218 vpc-connection parameters


Param Type Value Range Defaul Description Example
eter t Value

uuid string 36 characters. - vpc-connection "11000000-200


The value must ID 0-0000-0000-0
meet the 00000000020"
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

name string 0 to 255 - VPC connection "vpc-


characters. name. connection"

update string 0 to 128 - Update time. "2017-01-13T0


d-at characters. 5:30:31"

create string 0 to 128 - Creation time. "2017-01-13T0


d-at characters. 5:30:31"

cloud- string 0 to 255 - Cloud platform "openstack"


name characters. name.

tenant string 0 to 128 - Tenant ID. "tenant"


-id characters.

status string 0 to 128 - Status. -


characters.

admin- boolea - - The true


state- n administrative
up state of the
object, which is
up (true) or
down (false).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1543


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

local- string 36 characters. - Local router ID "11000000-200


router- The value must representation: 0-0000-0000-0
id meet the f81d4fae-7dec- 00000000020"
following 11d0-
regular a765-00a0c91e
expression: 6bf6
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}- router id
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

peer- array< - - Peer subnet list -


subnet string> representation:
s f81d4fae-7dec-
11d0-
a765-00a0c91e
6bf6 router id

descrip string 0 to 256 - Description of "this is a


tion characters. the IKE policy. description"

peer- string 36 characters. - Peer router ID "11000000-200


router- The value must representation: 0-0000-0000-0
id meet the f81d4fae-7dec- 00000000020"
following 11d0-
regular a765-00a0c91e
expression: 6bf6
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}- router id
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

local- array< - - Subnet ID set. ["11000000-20


subnet string> 00-0000-0000-
s 000000000020
"]

local- array< - - CIDR of the ["192.168.1.1/2


cidrs string> local subnet. 4"]
Either local-
subnets or
CIDR of the
local subnet is
selected.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1544


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

local- boolea - - Whether to false


firewal n enable the
l- traffic of the
enable local router to
pass through
the firewall.

peer- array< - - CIDR of the ["192.168.2.1/2


cidrs string> peer subnet. 4"]
Either this
parameter or
peer-subnets is
selected.

peer- boolea - - Whether to false


firewal n enable the
l- traffic of the
enable peer router to
pass through
the firewall.

mode integer - - The value 0 0


indicates that
traffic is
automatically
diverted to the
video wall
based on
whether
firewall
services exist.
The value 1
indicates that
whether traffic
passes through
the firewall is
manually
specified.

priority integer - - Route 1


preference.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1545


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connection" : ["11000000-2000-0000-0000-000000000020"]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.3 Query a VPC Interworking Connection by Name

Typical Scenarios
A VPC interworking connection needs to be queried by name.

Functions
Query VPC interworking by name.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 500 times/minute.
Single-interface performance: ≤ 105s.

HTTP Method
GET

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections/vpc-connection/
{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1546


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1219 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - VPC "11000000-200


128 interworking 0-0000-0000-0
charac ID. 00000000020"
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections/vpc-connection/
11000000-2000-0000-0000-000000000020 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.
vpc-connections parameters, For details, see Table 1-1217.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connection" : ["11000000-2000-0000-0000-000000000020"]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1547


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.4 Update a VPC Interworking Connection by Name

Typical Scenarios
The VPC interworking needs to be updated.

Functions
Update VPC interworking.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
PUT

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections/vpc-connection/
{id}

Table 1-1220 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - VPC "11000000-200


128 interworking 0-0000-0000-0
charac ID. 00000000020"
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1548


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1221 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table VPC -


NCE 1-1215. interworki
ng entity
to be
updated.

Sample Request
HTTP
PUT /restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections/vpc-connection/
11000000-2000-0000-0000-000000000020 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vpc-connection" : ["11000000-2000-0000-0000-000000000020"]
}

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.
Response status code 500: Response status code 500: Internal server error.
For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1549


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.5 Delete a VPC Interworking Connection by Name

Typical Scenarios
VPC interworking needs to be deleted.

Functions
Delete a VPC interworking connection based on the name.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 500 times/minute.

Single-interface performance: ≤ 105s.

HTTP Method
DELETE

URI
/restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections/vpc-connection/
{id}

Table 1-1222 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - VPC "11000000-200


128 interworking 0-0000-0000-0
charac ID. 00000000020"
ters.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1550


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
DELETE /restconf/data/huawei-ac-neutron:neutron-cfg/vpc-connections/vpc-connection/
11000000-2000-0000-0000-000000000020 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: Response status code 204: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Response status code 500: Response status code 500: Internal server error.

For details, see the response message body.

Sample Response
Response status code 204: Response status code 204: OK.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 500: Response status code 500: Internal server error.
HTTP/1.1 500 Internal Server Error
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.6 Create a VPC Communication Instance

Typical Scenarios
A VPC connection needs to be created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1551


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Create a VPC connection.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/vpc-connects

Request Parameters

Table 1-1223 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpccon Yes REFER For details, see Input -


nect ENCE Table 1-1224. parameter for
creating a VPC
communication
instance.

Table 1-1224 VpcConnectDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpc- Yes ARRAY For details, see VPC connection -


connec _REFER Table 1-1225. instance.
t ENCE

totalN No int32 - - Total number 100


um of results.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1552


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1225 VpcConnectDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

name Yes string 1 to - VPC connection "vpc001"


255 name.
charac
ters.

descrip No string 0 to - VPC connection "This is vpc"


tion 255 description.
charac
ters.

localLo Yes UUID 1 to - Source VPC ID. "a915f8c1-


gicRou 255 d06f-46cd-
terId charac a968-38328e0a
ters. b2d3"

localLo No string 1 to - Source VPC "vpc002"


gicRou 255 name.
terNa charac
me ters.

localLo No UUID 0 to - Logical firewall "a915f8c1-


gicVasI 255 ID of the d06f-46cd-
d charac source VPC. a968-38328e0a
ters. This parameter b2d3"
is optional. If
localFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the source
VPC.

localLo No string 1 to - Logical firewall "vas002"


gicVas 255 name of the
Name charac source VPC.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1553


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

localCr No ARRAY For details, see Local -


ossLink _REFER Table 1-1226. interconnection
ENCE link
information.

localIn No ARRAY For details, see Local internal -


ternalL _REFER Table 1-1227. link
ink ENCE information.

localCi No array< - - Source network -


drs string> segment list.
The value is a
string.

peerLo Yes UUID 1 to - ID of the "a915f8c1-


gicRou 255 destination d06f-46cd-
terId charac VPC. a968-38328e0a
ters. b2d3"

peerLo No string 1 to - Name of the "router002"


gicRou 255 destination
terNa charac VPC.
me ters.

peerLo No UUID 1 to - Logical firewall "a915f8c1-


gicVasI 250 ID of the d06f-46cd-
d charac destination a968-38328e0a
ters. VPC. This b2d3"
parameter is
optional. If
peerFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the
destination
VPC.

peerLo No string 1 to - Name of the "vas003"


gicVas 255 logical firewall
Name charac for the
ters. destination
VPC.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1554


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peerCr No ARRAY For details, see Peer -


ossLink _REFER Table 1-1226. interconnection
ENCE link
information.

peerInt No ARRAY For details, see Peer internal -


ernalLi _REFER Table 1-1227. link
nk ENCE information.

peerCi No array< - - List of -


drs string> destination
network
segments. The
value is a
string.

tenantI No UUID 0 to - Tenant ID. "DBB702C3-77


d 255 19-4FE6-
charac A5AD-3A9C9E2
ters. 6530"

tenant No string 1 to - Name of the "tenant1"


Name 255 tenant to
charac which the local
ters. router belongs.

peerTe No UUID 0 to - Tenant to "a915f8c1-


nantId 255 which the peer d06f-46cd-
charac router belongs. a968-38328e0a
ters. b2d3"

peerTe No string 1 to - Name of the "tenant1"


nantN 255 tenant to
ame charac which the peer
ters. router belongs.

additio No REFER For details, see - -


nal ENCE Table 1-1228.

localFir No boolea - false Whether the false


ewallE n firewall is
nable enabled on the
source VPC. It
is disabled by
default.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1555


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

peerFir No boolea - false Whether the true


ewallE n destination
nable VPC is
protected by a
firewall. By
default, this
function is
disabled.

isLocal No boolea - false Whether to false


All n enable
dynamic
routing on the
local end in the
MDC scenario.

isPeer No boolea - false Whether to true


All n enable
dynamic
routing on the
peer end in the
MDC scenario.

priority No int32 - - Priority of a 60


static route.

localPr No int32 - - Local 50


eferenc preference of
e BGP routes in a
routing policy.

dciGat No array< 0-2147 - DCI gateway -


ewayId string> 48364 device group
s 7 ID.
items.

connec No string 0 to - Route target "1:3,65537:3,0.


tRt 255 for VPC 0:3,192.168.122
charac communication .15:1."
ters. .

srcGw No array< 0-2147 - ID list of source -


DeviceI string> 48364 egress
ds 7 gateways for
items. VPC
communication
.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1556


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dstGw No array< 0-2147 - ID list of -


DeviceI string> 48364 destination
ds 7 egress
items. gateways for
VPC
communication
.

localR No string 1 to - Type of the "LogicRouter/


outerT 255 local router. ExternalTransit
ype charac Router/
ters. ExternalGatew
ay"

peerRo No string 1 to - Type of the "LogicRouter/


uterTy 255 peer router. ExternalTransit
pe charac Router/
ters. ExternalGatew
ay"

isAssoc No boolea - true Whether to true


iatedV n modify the VPC
pcCon interworking
nPolicy policy.

Table 1-1226 CrossLinkParam parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routerI No string 0 to - Interconnection "10.1.1.1"


p 255 IP address on a
charac router.
ters.

vasIp No string 0 to - Interconnection "10.1.1.1"


255 IP address on
charac the logical VAS
ters. device.

vlan No string 0 to 64 - Interconnection "100"


charac VLAN.
ters.

routerI No string 0 to - IPv6 "FE80:0000:000


pv6 255 interconnection 0:0000:0000:00
charac address on a 44:0000:0032"
ters. router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1557


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vasIpv No string 0 to - IPv6 "FE80:0000:000


6 255 interconnection 0:0000:0000:00
charac address on a 44:0000:0032"
ters. VAS device.

fabricI No string 0 to 36 - Unique ID of a "DBB702C3-77


d charac fabric. 19-4FE6-4488-
ters. 3A9C9E265322
"

Table 1-1227 InternalLinkParam parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

routerI No string 0 to - IP address of "10.1.1.1"


p 255 the router.
charac
ters.

vasIp No string 0 to - IP address of "10.1.1.1"


255 the logical VAS
charac device.
ters.

vlan No string 0 to 64 - VLAN. "100"


charac
ters.

routerI No string 0 to - IPv6 address of "FE80:0000:000


pv6 255 the router. 0:0000:0000:00
charac 44:0000:0032"
ters.

vasIpv No string 0 to - IPv6 address of "FE80:0000:000


6 255 the logical VAS 0:0000:0000:00
charac device. 44:0000:0032"
ters.

Table 1-1228 AdditionalDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1558


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

create No string 0 to - Creation time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/vpc-connects HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1559


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1560


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.7 Query VPC Connections

Typical Scenarios
Use this API to query the VPC communication instance list.

Functions
This API is used to query the VPC communication instance list based on the
producer or the tenant ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vpc-connects

Table 1-1229 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

isTrans No boolea - false Whether to -


it n query all
transit VPC
connections.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1561


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

tenantI No UUID - - ID of the "a915f8c1-


d tenant to d06f-46cd-
which the SFC a968-38328e0a
template b2d3"
belongs.

pageIn No string - - Page index. "1"


dex

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vpc-connects?producer=CloudPlatform1&tenantId=a915f8c1-
d06f-46cd-a968-38328e0ab2d3&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1230 VpcConnectDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

vpc- ARRAY For details, see Table VPC connection -


connec _REFER 1-1231. instance.
t ENCE

totalN int32 - - Total number 100


um of results.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1562


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1231 VpcConnectDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

name string 1 to 255 - VPC connection "vpc001"


characters. name.

descrip string 0 to 255 - VPC connection "This is vpc"


tion characters. description.

localLo UUID 1 to 255 - Source VPC ID. "a915f8c1-


gicRou characters. d06f-46cd-
terId a968-38328e0a
b2d3"

localLo string 1 to 255 - Source VPC "vpc002"


gicRou characters. name.
terNa
me

localLo UUID 0 to 255 - Logical firewall "a915f8c1-


gicVasI characters. ID of the d06f-46cd-
d source VPC. a968-38328e0a
This parameter b2d3"
is optional. If
localFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the source
VPC.

localLo string 1 to 255 - Logical firewall "vas002"


gicVas characters. name of the
Name source VPC.

localCr ARRAY For details, see Table Local -


ossLink _REFER 1-1232. interconnection
ENCE link
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1563


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

localIn ARRAY For details, see Table Local internal -


ternalL _REFER 1-1233. link
ink ENCE information.

localCi array< - - Source network -


drs string> segment list.
The value is a
string.

peerLo UUID 1 to 255 - ID of the "a915f8c1-


gicRou characters. destination d06f-46cd-
terId VPC. a968-38328e0a
b2d3"

peerLo string 1 to 255 - Name of the "router002"


gicRou characters. destination
terNa VPC.
me

peerLo UUID 1 to 250 - Logical firewall "a915f8c1-


gicVasI characters. ID of the d06f-46cd-
d destination a968-38328e0a
VPC. This b2d3"
parameter is
optional. If
peerFirewallEn
able is set to
true but the
logical firewall
ID is not
specified, the
controller
automatically
searches for or
allocates the
logical firewall
of the
destination
VPC.

peerLo string 1 to 255 - Name of the "vas003"


gicVas characters. logical firewall
Name for the
destination
VPC.

peerCr ARRAY For details, see Table Peer -


ossLink _REFER 1-1232. interconnection
ENCE link
information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1564


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

peerInt ARRAY For details, see Table Peer internal -


ernalLi _REFER 1-1233. link
nk ENCE information.

peerCi array< - - List of -


drs string> destination
network
segments. The
value is a
string.

tenantI UUID 0 to 255 - Tenant ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
6530"

tenant string 1 to 255 - Name of the "tenant1"


Name characters. tenant to
which the local
router belongs.

peerTe UUID 0 to 255 - Tenant to "a915f8c1-


nantId characters. which the peer d06f-46cd-
router belongs. a968-38328e0a
b2d3"

peerTe string 1 to 255 - Name of the "tenant1"


nantN characters. tenant to
ame which the peer
router belongs.

additio REFER For details, see Table - -


nal ENCE 1-1234.

localFir boolea - false Whether the false


ewallE n firewall is
nable enabled on the
source VPC. It
is disabled by
default.

peerFir boolea - false Whether the true


ewallE n destination
nable VPC is
protected by a
firewall. By
default, this
function is
disabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1565


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

isLocal boolea - false Whether to false


All n enable
dynamic
routing on the
local end in the
MDC scenario.

isPeer boolea - false Whether to true


All n enable
dynamic
routing on the
peer end in the
MDC scenario.

priority int32 - - Priority of a 60


static route.

localPr int32 - - Local 50


eferenc preference of
e BGP routes in a
routing policy.

dciGat array< 0-2147483647 - DCI gateway -


ewayId string> items. device group
s ID.

connec string 0 to 255 - Route target "1:3,65537:3,0.


tRt characters. for VPC 0:3,192.168.122
communication .15:1."
.

srcGw array< 0-2147483647 - ID list of source -


DeviceI string> items. egress
ds gateways for
VPC
communication
.

dstGw array< 0-2147483647 - ID list of -


DeviceI string> items. destination
ds egress
gateways for
VPC
communication
.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1566


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

localR string 1 to 255 - Type of the "LogicRouter/


outerT characters. local router. ExternalTransit
ype Router/
ExternalGatew
ay"

peerRo string 1 to 255 - Type of the "LogicRouter/


uterTy characters. peer router. ExternalTransit
pe Router/
ExternalGatew
ay"

isAssoc boolea - true Whether to true


iatedV n modify the VPC
pcCon interworking
nPolicy policy.

Table 1-1232 CrossLinkParam parameters


Param Type Value Range Defaul Description Example
eter t Value

routerI string 0 to 255 - Interconnection "10.1.1.1"


p characters. IP address on a
router.

vasIp string 0 to 255 - Interconnection "10.1.1.1"


characters. IP address on
the logical VAS
device.

vlan string 0 to 64 - Interconnection "100"


characters. VLAN.

routerI string 0 to 255 - IPv6 "FE80:0000:000


pv6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032"
router.

vasIpv string 0 to 255 - IPv6 "FE80:0000:000


6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032"
VAS device.

fabricI string 0 to 36 - Unique ID of a "DBB702C3-77


d characters. fabric. 19-4FE6-4488-
3A9C9E265322
"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1567


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1233 InternalLinkParam parameters

Param Type Value Range Defaul Description Example


eter t Value

routerI string 0 to 255 - IP address of "10.1.1.1"


p characters. the router.

vasIp string 0 to 255 - IP address of "10.1.1.1"


characters. the logical VAS
device.

vlan string 0 to 64 - VLAN. "100"


characters.

routerI string 0 to 255 - IPv6 address of "FE80:0000:000


pv6 characters. the router. 0:0000:0000:00
44:0000:0032"

vasIpv string 0 to 255 - IPv6 address of "FE80:0000:000


6 characters. the logical VAS 0:0000:0000:00
device. 44:0000:0032"

Table 1-1234 AdditionalDto parameters

Param Type Value Range Defaul Description Example


eter t Value

produc string 0 to 36 - Parameters for "CloudPlatform


er characters. configuring a 1"
condition.

create string 0 to 255 - Creation time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

update string 0 to 255 - Update time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1568


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1569


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.8 Query a VPC Communication Instance

Typical Scenarios
Use this API to query a VPC communication instance.

Functions
Query a VPC connection by ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1570


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1235 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

Request Parameters

Table 1-1236 header parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dtId No string 0 to - distribution "G2021110115


256 transaction ID. 2812691_b34d
charac 98a-57f9-49b2
ters. -910c-010bcfcc
97bcd"

N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/a915f8c1-d06f-46cd-a968-38328e0ab2d3
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20211101152812691_b34d98a-57f9-49b2-910c-010bcfcc97bcd"

Response Parameters
Response status code 200: successfully

VpcConnectDtoWrapper parameters, For details, see Table 1-1230.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1571


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1572


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.9 Update a VPC Communication Instance

Typical Scenarios
A VPC connection needs to be updated by ID.

Functions
Update a VPC connection by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
PUT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1573


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/{id}

Table 1-1237 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

Request Parameters

Table 1-1238 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpccon Yes REFER For details, see Input -


nect ENCE Table 1-1224. parameter for
creating a VPC
communication
instance.

Sample Request
HTTP
PUT /controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/a915f8c1-d06f-46cd-a968-38328e0ab2d3
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1574


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1575


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response Parameters
Response status code 200: successfully
VpcConnectDtoWrapper parameters, For details, see Table 1-1230.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"vpc-connect" : [
{
"id" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"name" : "vpc001",
"description" : "This is vpc",
"localLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicRouterName" : "vpc002",
"localLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"localLogicVasName" : "vas002",
"localCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"localInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"localCidrs" : [
"10.1.1.1/24"
],
"peerLogicRouterId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicRouterName" : "router002",
"peerLogicVasId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerLogicVasName" : "vas003",
"peerCrossLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1576


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"fabricId" : "DBB702C3-7719-4FE6-4488-3A9C9E265322"
}
],
"peerInternalLink" : [
{
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.1",
"vlan" : "100",
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032"
}
],
"peerCidrs" : [
"10.1.1.1/24"
],
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E26530",
"tenantName" : "tenant1",
"peerTenantId" : "a915f8c1-d06f-46cd-a968-38328e0ab2d3",
"peerTenantName" : "tenant1",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
},
"localFirewallEnable" : false,
"peerFirewallEnable" : true,
"isLocalAll" : false,
"isPeerAll" : true,
"priority" : 60,
"localPreference" : 50,
"dciGatewayIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"connectRt" : "1:3,65537:3,0.0:3,192.168.122.15:1.",
"srcGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"dstGwDeviceIds" : [
"a915f8c1-d06f-46cd-a968-38328e0ab2d3"
],
"localRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"peerRouterType" : "LogicRouter/ExternalTransitRouter/ExternalGateway",
"isAssociatedVpcConnPolicy" : true
}
],
"totalNum" : 100
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.14.10 Delete a VPC Communication Instance

Typical Scenarios
A VPC connection needs to be deleted by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1577


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Delete a VPC connection by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/{id}

Table 1-1239 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - VPC "a915f8c1-


communication d06f-46cd-
instance object a968-38328e0a
ID. b2d3"

Table 1-1240 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string - - Provider. "Agile-


er Controller-
MDC"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/vpc-connects/vpc-connect/a915f8c1-d06f-46cd-
a968-38328e0ab2d3?producer=Agile-Controller-MDC HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1578


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.15 Application Example of the VPC Communication Policy


# VPC communication policy application instance interface description:

1. VPC communication policy application instance service.

1.9.7.15.1 Create a VPC Communication Policy Application Instance

Typical Scenarios
A VPC communication policy application instance needs to be created.

Functions
Create a VPC communication policy application instance based on conditions.

Constraints
User role: northbound operator.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1579


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/sfco/vpcConnectPolicy

Request Parameters

Table 1-1241 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dtId No string 0 to - Transaction ID. "G2021100817


256 3530511_dbadc
charac 40-ece4-421c-
ters. bef8-
b6548c12d4c7d
"

Table 1-1242 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

scapp Yes REFER For details, see Input -


ENCE Table 1-1243. parameter for
creating a VPC
communication
policy
application
instance.

Table 1-1243 ScappDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

scapp Yes ARRAY For details, see SFC instance -


_REFER Table 1-1244. list.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1580


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1244 ScappDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - SFC application "CCB702C3-77


instance ID. 19-4FE6-
A5AD-3A9C9E2
65309"

name Yes string 1 to - SFC application "logicfw1"


255 instance name.
charac
ters.

descrip No string 0 to - SFC application "This is scapp"


tion 255 instance
charac description.
ters.

tenantI No UUID - - Tenant to "CCB702C3-77


d which an SFC 19-4FE6-
application A5AD-3A9C9E2
instance 65309"
belongs.

dstTen No UUID 36 - Destination "CCB702C3-77


antId charac tenant to 19-4FE6-
ters. which the A5AD-3A9C9E2
The service chain 65309"
value application
must instance
meet belongs. This
the field is read-
followi only.
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1581


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

srcApp No string 36 - Source app ID. "CCB702C3-77


Id charac This field is 19-4FE6-
ters. read-only. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1582


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dstApp No string 36 - Destination "CCB702C3-77


Id charac app ID. This 19-4FE6-
ters. field is read- A5AD-3A9C9E2
The only. 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

logicN No UUID - - Logical "CCB702C3-77


etwork network where 19-4FE6-
Id an SFC A5AD-3A9C9E2
application 65309"
instance is
located.

srcEpgI Yes UUID - - Source EPG. "CCB702C3-77


d 19-4FE6-
A5AD-3A9C9E2
65309"

dstEpg Yes UUID - - Destination "CCB702C3-77


Id EPG. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1583


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

filterAc Yes string ● FILT - Traffic policy. "FILTER"


tion ER The options are
● RED as follows:
IRE FILTER (SFC
CT policy applied)
REDIRECT
● FOR FORWARD
WA DENY
RD
● DE
NY

filterDi No string ● In Bothdir Policy delivery "Bothdirectiona


rection ectiona direction. The l"
● Out l options are as
● Bot follows: In:
hdir inbound
ecti direction Out:
ona outbound
l direction
Bothdirectional
: bidirectional.
This field is
required when
filterAction is
set to
REDIRECT,
FORWARD, or
DENY. In this
case, no policy
is selected for
the service
chain, and the
policy delivery
direction is
identified. The
default value is
Bothdirectional
.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1584


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

contra No string 36 - SFC ID. "CCB702C3-77


ctId charac 19-4FE6-
ters. A5AD-3A9C9E2
The 65309"
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

rules No ARRAY 0-512 items. For Policy that is -


_REFER details, see created for the
ENCE Table 1-1245. service chain.
This parameter
is mandatory
when
filterAction is
set to FILTER.
Either this
parameter or
contractId
must be set.
contractId is
used
preferentially.

sfp Yes REFER For details, see - -


ENCE Table 1-1248.

additio No REFER For details, see - -


nal ENCE Table 1-1250.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1585


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1245 ContractRuleDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - Rule ID. "DBB702C3-77


255 19-4FE6-
charac A5AD-3A9C9E2
ters. 65300"
36
charac
ters.
The
value
must
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

behavi Yes string 4 to 10 - Rule behavior, "DENY"


or charac which can be
ters. DENY,
FORWARD, or
REDIRECT.

order Yes int32 [0-655 - Rule order. 1


35]

classifi Yes REFER For details, see information -


er ENCE Table 1-1246. about service
chain policy.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1586


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1246 ClassifierDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ipFami Yes string 0 to - IP address "IPv4 or IPv6."


ly 255 family. The
charac value can be
ters. IPv4 or IPv6.

sourceI No string 0 to - Source IP "1.1.1.0/24 or


p 255 address FE80::/10,
charac which must be
ters. the same as
the address
family
configuration."

destina No string 0 to - Destination IP "1.1.1.0/24 or


tionIp 255 address FE80::/10,
charac which must be
ters. the same as
the address
family
configuration."

protoc Yes int32 [0-255 - The value is an 17


ol ] integer that
ranges from 0
to 255. The
value
expressed by
name can be
gre (47), icmp
(1), igmp (2),
ip (0), ipinip
(4), ospf (89),
tcp (6), udp
(17), or icmpv6
(58).

source No string 0 to - Source port "startPort :


PortRa 255 expressed in 3000"
nge charac the format of n
ters. or x:y, such as
4 or 6:8. The
value range is
from 0 to
65535 for n, x,
and y.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1587


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

destPo No string 0 to - Destination "startPort :


rtRang 255 port expressed 3000"
e charac in the format
ters. of n or x:y,
such as 4 or
6:8. The value
range is from 0
to 65535 for n,
x, and y.

directi No string ● In - Direction. "Bothdirectiona


on l"
● Out
● Bot
hdir
ecti
ona
l

loggin No boolea - - Log. true


g n

tcpFla No ARRAY 0-6 items. For TCP flag list. -


g _REFER details, see
ENCE Table 1-1247.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1588


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

icmpTy No string ● Add - ICMP flag. "Echo"


pe ress
Mas
kRe
ply
● Add
ress
Mas
kRe
que
st
● Ech
o
● Ech
oRe
ply
● Fra
gm
ent
nee
dDf
set
● Hos
tRe
dire
ct
● Hos
tTos
Red
irect
● Hos
tUn
reac
hab
le
● Info
rma
tion
Rep
ly
● Info
rma
tion
Req
uest

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1589


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

● Net
Red
irect
● Net
Tos
Red
irect
● Net
Unr
eac
hab
le
● Par
am
eter
Pro
ble
m
● Port
Unr
eac
hab
le
● Prot
ocol
Unr
eac
hab
le
● Rea
sse
mbl
yTi
me
out
● Sou
rce
Que
nch
● Sou
rceR
out
eFai
led
● Tim
esta

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1590


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

mp
Rep
ly
● Tim
esta
mp
Req
uest
● TtlE
xce
ede
d

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1591


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

icmp6 No string ● Red - ICMPv6 flag. "Echo"


Type irect
● Ech
o
● Ech
oRe
ply
● Err
Hea
der
Fiel
d
● Fra
gTi
me
Exc
eed
ed
● Hop
Limi
tExc
eed
ed
● Hos
tAd
min
Pro
hib
● Hos
tUn
reac
hab
le
● Nei
ghb
orA
dve
rtise
me
nt
● Nei
ghb
orS
olici
tati
on

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1592


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

● Net
wor
kUn
reac
hab
le
● Pac
ket
Too
Big
● Port
Unr
eac
hab
le
● Rou
terA
dve
rtise
me
nt
● Rou
terS
olici
tati
on
● Unk
now
nIpv
6Op
t
● Unk
now
nNe
xtH
dr

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1593


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1247 TcpFlagEnum parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

TcpFla Yes string ● Esta - TCP flag. "Established"


gEnum blis
hed
● Urg
● Ack
● Psh
● Rst
● Syn
● Fin

Table 1-1248 SfpDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

sfcId Yes UUID - - SFC (template) "CBB702C3-77


ID. 19-4FE6-
A5AD-3A9C9E2
653091"

sfPath No ARRAY For details, see SFC path ID. -


Hop _REFER Table 1-1249.
ENCE

Table 1-1249 SfPathHop parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

hopNu Yes int32 [1-255 - Node number 1


mber ] on an SFC
path.

logicSF Yes UUID - - SF ID. "CBB702C3-77


Id 19-4FE6-
A5AD-3A9C9E2
653091"

sfType Yes string 1 to - SF type. "NAT"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1594


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1250 AdditionalDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

create No string 0 to - Creation time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/sfco/vpcConnectPolicy HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20211008173530511_dbadc40-ece4-421c-bef8-b6548c12d4c7d"
{
"scapp" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"description" : "This is scapp",
"tenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstTenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterAction" : "FILTER",
"filterDirection" : "Bothdirectional",
"contractId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"rules" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265300",
"behavior" : "DENY",
"order" : 1,
"classifier" : {
"ipFamily" : "IPv4 or IPv6.",
"sourceIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"destinationIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"protocol" : 17,
"sourcePortRange" : "startPort : 3000",
"destPortRange" : "startPort : 3000",
"direction" : "Bothdirectional",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1595


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"logging" : true,
"tcpFlag" : [
"Established"
],
"icmpType" : "Echo",
"icmp6Type" : "Echo"
}
}
],
"sfp" : {
"sfcId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfPathHop" : [
{
"hopNumber" : 1,
"logicSFId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfType" : "NAT"
}
]
},
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: successfully

Table 1-1251 ScappDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

scapp ARRAY For details, see Table SFC instance -


_REFER 1-1252. list.
ENCE

Table 1-1252 ScappDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id UUID - - SFC application "CCB702C3-77


instance ID. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 255 - SFC application "logicfw1"


characters. instance name.

descrip string 0 to 255 - SFC application "This is scapp"


tion characters. instance
description.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1596


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

tenantI UUID - - Tenant to "CCB702C3-77


d which an SFC 19-4FE6-
application A5AD-3A9C9E2
instance 65309"
belongs.

dstTen UUID 36 characters. - Destination "CCB702C3-77


antId The value must tenant to 19-4FE6-
meet the which the A5AD-3A9C9E2
following service chain 65309"
regular application
expression: instance
[0-9a-fA-F]{8}- belongs. This
[0-9a-fA-F]{4}- field is read-
[0-9a-fA-F]{4}- only.
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

srcApp string 36 characters. - Source app ID. "CCB702C3-77


Id The value must This field is 19-4FE6-
meet the read-only. A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

dstApp string 36 characters. - Destination "CCB702C3-77


Id The value must app ID. This 19-4FE6-
meet the field is read- A5AD-3A9C9E2
following only. 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1597


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicN UUID - - Logical "CCB702C3-77


etwork network where 19-4FE6-
Id an SFC A5AD-3A9C9E2
application 65309"
instance is
located.

srcEpgI UUID - - Source EPG. "CCB702C3-77


d 19-4FE6-
A5AD-3A9C9E2
65309"

dstEpg UUID - - Destination "CCB702C3-77


Id EPG. 19-4FE6-
A5AD-3A9C9E2
65309"

filterAc string ● FILTER - Traffic policy. "FILTER"


tion The options are
● REDIRECT
as follows:
● FORWARD FILTER (SFC
● DENY policy applied)
REDIRECT
FORWARD
DENY

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1598


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

filterDi string ● In Bothdir Policy delivery "Bothdirectiona


rection ectiona direction. The l"
● Out l options are as
● Bothdirectio follows: In:
nal inbound
direction Out:
outbound
direction
Bothdirectional
: bidirectional.
This field is
required when
filterAction is
set to
REDIRECT,
FORWARD, or
DENY. In this
case, no policy
is selected for
the service
chain, and the
policy delivery
direction is
identified. The
default value is
Bothdirectional
.

contra string 36 characters. - SFC ID. "CCB702C3-77


ctId The value must 19-4FE6-
meet the A5AD-3A9C9E2
following 65309"
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1599


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

rules ARRAY 0-512 items. For details, Policy that is -


_REFER see Table 1-1253. created for the
ENCE service chain.
This parameter
is mandatory
when
filterAction is
set to FILTER.
Either this
parameter or
contractId
must be set.
contractId is
used
preferentially.

sfp REFER For details, see Table - -


ENCE 1-1256.

additio REFER For details, see Table - -


nal ENCE 1-1258.

Table 1-1253 ContractRuleDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 255 - Rule ID. "DBB702C3-77


characters. 36 19-4FE6-
characters. The A5AD-3A9C9E2
value must 65300"
meet the
following
regular
expression:
[0-9a-fA-F]{8}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-
[0-9a-fA-F]
{12}.

behavi string 4 to 10 - Rule behavior, "DENY"


or characters. which can be
DENY,
FORWARD, or
REDIRECT.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1600


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

order int32 [0-65535] - Rule order. 1

classifi REFER For details, see Table information -


er ENCE 1-1254. about service
chain policy.

Table 1-1254 ClassifierDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipFami string 0 to 255 - IP address "IPv4 or IPv6."


ly characters. family. The
value can be
IPv4 or IPv6.

sourceI string 0 to 255 - Source IP "1.1.1.0/24 or


p characters. address FE80::/10,
which must be
the same as
the address
family
configuration."

destina string 0 to 255 - Destination IP "1.1.1.0/24 or


tionIp characters. address FE80::/10,
which must be
the same as
the address
family
configuration."

protoc int32 [0-255] - The value is an 17


ol integer that
ranges from 0
to 255. The
value
expressed by
name can be
gre (47), icmp
(1), igmp (2),
ip (0), ipinip
(4), ospf (89),
tcp (6), udp
(17), or icmpv6
(58).

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1601


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

source string 0 to 255 - Source port "startPort :


PortRa characters. expressed in 3000"
nge the format of n
or x:y, such as
4 or 6:8. The
value range is
from 0 to
65535 for n, x,
and y.

destPo string 0 to 255 - Destination "startPort :


rtRang characters. port expressed 3000"
e in the format
of n or x:y,
such as 4 or
6:8. The value
range is from 0
to 65535 for n,
x, and y.

directi string ● In - Direction. "Bothdirectiona


on l"
● Out
● Bothdirectio
nal

loggin boolea - - Log. true


g n

tcpFla ARRAY 0-6 items. For details, see TCP flag list. -
g _REFER Table 1-1255.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1602


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

icmpTy string ● AddressMas - ICMP flag. "Echo"


pe kReply
● AddressMas
kRequest
● Echo
● EchoReply
● Fragmentne
edDfset
● HostRedirect
● HostTosRedir
ect
● HostUnreach
able
● Information
Reply
● Information
Request
● NetRedirect
● NetTosRedir
ect
● NetUnreach
able
● ParameterPr
oblem
● PortUnreach
able
● ProtocolUnre
achable
● ReassemblyT
imeout
● SourceQuen
ch
● SourceRoute
Failed
● TimestampR
eply
● TimestampR
equest
● TtlExceeded

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1603


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

icmp6 string ● Redirect - ICMPv6 flag. "Echo"


Type
● Echo
● EchoReply
● ErrHeaderFie
ld
● FragTimeExc
eeded
● HopLimitExc
eeded
● HostAdminP
rohib
● HostUnreach
able
● NeighborAd
vertisement
● NeighborSoli
citation
● NetworkUnr
eachable
● PacketTooBi
g
● PortUnreach
able
● RouterAdver
tisement
● RouterSolicit
ation
● UnknownIpv
6Opt
● UnknownNe
xtHdr

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1604


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1255 TcpFlagEnum parameters


Param Type Value Range Defaul Description Example
eter t Value

TcpFla string ● Established - TCP flag. "Established"


gEnum
● Urg
● Ack
● Psh
● Rst
● Syn
● Fin

Table 1-1256 SfpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

sfcId UUID - - SFC (template) "CBB702C3-77


ID. 19-4FE6-
A5AD-3A9C9E2
653091"

sfPath ARRAY For details, see Table SFC path ID. -


Hop _REFER 1-1257.
ENCE

Table 1-1257 SfPathHop parameters


Param Type Value Range Defaul Description Example
eter t Value

hopNu int32 [1-255] - Node number 1


mber on an SFC
path.

logicSF UUID - - SF ID. "CBB702C3-77


Id 19-4FE6-
A5AD-3A9C9E2
653091"

sfType string 1 to 255 - SF type. "NAT"


characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1605


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1258 AdditionalDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Parameters for "CloudPlatform


er characters. configuring a 1"
condition.

create string 0 to 255 - Creation time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

update string 0 to 255 - Update time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

Response status code 400: Response status code 400: Bad request.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"scapp" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"description" : "This is scapp",
"tenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstTenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterAction" : "FILTER",
"filterDirection" : "Bothdirectional",
"contractId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"rules" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265300",
"behavior" : "DENY",
"order" : 1,
"classifier" : {
"ipFamily" : "IPv4 or IPv6.",
"sourceIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"destinationIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"protocol" : 17,
"sourcePortRange" : "startPort : 3000",
"destPortRange" : "startPort : 3000",
"direction" : "Bothdirectional",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1606


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"logging" : true,
"tcpFlag" : [
"Established"
],
"icmpType" : "Echo",
"icmp6Type" : "Echo"
}
}
],
"sfp" : {
"sfcId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfPathHop" : [
{
"hopNumber" : 1,
"logicSFId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfType" : "NAT"
}
]
},
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.15.2 Query the VPC Communication Policy Application Instance List

Typical Scenarios
A VPC communication policy application instance list needs to be queried.

Functions
Query the list of VPC communication policy application instances based on
producer and tenant ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/controller/dc/v3/sfco/vpcConnectPolicy

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1607


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1259 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Source of the "CloudPlatform


er charac VPC 1"
ters. communication
policy.

tenantI No string 36 - Tenant to "00215123-100


d charac which the VPC 0-0000-0001-0
ters. communication 00000000001"
The policy
value application
must instance
meet belongs.
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

pageSi No string 0 to - Number of "10"


ze 255 results on each
charac page.
ters.

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1608


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/sfco/vpcConnectPolicy?
producer=CloudPlatform1&tenantId=00215123-1000-0000-0001-000000000001&pageIndex=1&pageSize=10
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully.

Table 1-1260 ScappListDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

scapp ARRAY For details, see Table SFC instance -


_REFER 1-1252. list.
ENCE

totalN int64 - - Total number 100


um of results.

pageIn int64 - - Page index. 1


dex

pageSi int64 - - Page size. 4000


ze

Response status code 400: Response status code 400: Bad request.
For details, see the response message body.

Sample Response
Response status code 200: successfully.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"scapp" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"description" : "This is scapp",
"tenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstTenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1609


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"dstAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterAction" : "FILTER",
"filterDirection" : "Bothdirectional",
"contractId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"rules" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265300",
"behavior" : "DENY",
"order" : 1,
"classifier" : {
"ipFamily" : "IPv4 or IPv6.",
"sourceIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"destinationIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"protocol" : 17,
"sourcePortRange" : "startPort : 3000",
"destPortRange" : "startPort : 3000",
"direction" : "Bothdirectional",
"logging" : true,
"tcpFlag" : [
"Established"
],
"icmpType" : "Echo",
"icmp6Type" : "Echo"
}
}
],
"sfp" : {
"sfcId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfPathHop" : [
{
"hopNumber" : 1,
"logicSFId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfType" : "NAT"
}
]
},
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
],
"totalNum" : 100,
"pageIndex" : 1,
"pageSize" : 4000
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.15.3 Query a VPC Communication Policy Application Instance

Typical Scenarios
A VPC communication policy application instance needs to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1610


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query the VPC communication policy application instance based on the ID.

Constraints
User role: northbound operator.

HTTP Method
GET

URI
/controller/dc/v3/sfco/vpcConnectPolicy/{id}

Table 1-1261 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 36 - ID of the "00215123-100


charac instance to 0-0000-0001-0
ters. which the VPC 00000000001"
The communication
value policy is
must applied.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1611


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/sfco/vpcConnectPolicy/00215123-1000-0000-0001-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully
ScappDtoWrapper parameters, For details, see Table 1-1251.
Response status code 400: Response status code 400: Bad request.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"scapp" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"description" : "This is scapp",
"tenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstTenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterAction" : "FILTER",
"filterDirection" : "Bothdirectional",
"contractId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"rules" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265300",
"behavior" : "DENY",
"order" : 1,
"classifier" : {
"ipFamily" : "IPv4 or IPv6.",
"sourceIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"destinationIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"protocol" : 17,
"sourcePortRange" : "startPort : 3000",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1612


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"destPortRange" : "startPort : 3000",


"direction" : "Bothdirectional",
"logging" : true,
"tcpFlag" : [
"Established"
],
"icmpType" : "Echo",
"icmp6Type" : "Echo"
}
}
],
"sfp" : {
"sfcId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfPathHop" : [
{
"hopNumber" : 1,
"logicSFId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfType" : "NAT"
}
]
},
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.15.4 Update a VPC Communication Policy Application Instance

Typical Scenarios
A VPC communication policy application instance needs to be updated.

Functions
Update the VPC communication policy application instance based on the ID.

Constraints
User role: northbound operator.

HTTP Method
PUT

URI
/controller/dc/v3/sfco/vpcConnectPolicy/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1613


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1262 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID of the "00215123-100


charac instance to 0-0000-0001-0
ters. which the VPC 00000000001"
The communication
value policy is
must applied.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-1263 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dtId No string 0 to - Transaction ID. "G2021100817


256 3530511_dbadc
charac 40-ece4-421c-
ters. bef8-
b6548c12d4c7d
"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1614


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1264 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

scapp Yes REFER For details, see Input and -


ENCE Table 1-1243. output
parameters of
the API for
updating a VPC
communication
policy instance.

Sample Request
HTTP
PUT /controller/dc/v3/sfco/vpcConnectPolicy/00215123-1000-0000-0001-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20211008173530511_dbadc40-ece4-421c-bef8-b6548c12d4c7d"
{
"scapp" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"description" : "This is scapp",
"tenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstTenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterAction" : "FILTER",
"filterDirection" : "Bothdirectional",
"contractId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"rules" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265300",
"behavior" : "DENY",
"order" : 1,
"classifier" : {
"ipFamily" : "IPv4 or IPv6.",
"sourceIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"destinationIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"protocol" : 17,
"sourcePortRange" : "startPort : 3000",
"destPortRange" : "startPort : 3000",
"direction" : "Bothdirectional",
"logging" : true,
"tcpFlag" : [
"Established"
],
"icmpType" : "Echo",
"icmp6Type" : "Echo"
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1615


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
],
"sfp" : {
"sfcId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfPathHop" : [
{
"hopNumber" : 1,
"logicSFId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfType" : "NAT"
}
]
},
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: successfully
ScappDtoWrapper parameters, For details, see Table 1-1251.
Response status code 400: Response status code 400: Bad request.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"scapp" : [
{
"id" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "logicfw1",
"description" : "This is scapp",
"tenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstTenantId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstAppId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"srcEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dstEpgId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterAction" : "FILTER",
"filterDirection" : "Bothdirectional",
"contractId" : "CCB702C3-7719-4FE6-A5AD-3A9C9E265309",
"rules" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265300",
"behavior" : "DENY",
"order" : 1,
"classifier" : {
"ipFamily" : "IPv4 or IPv6.",
"sourceIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family
configuration.",
"destinationIp" : "1.1.1.0/24 or FE80::/10, which must be the same as the address family

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1616


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

configuration.",
"protocol" : 17,
"sourcePortRange" : "startPort : 3000",
"destPortRange" : "startPort : 3000",
"direction" : "Bothdirectional",
"logging" : true,
"tcpFlag" : [
"Established"
],
"icmpType" : "Echo",
"icmp6Type" : "Echo"
}
}
],
"sfp" : {
"sfcId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfPathHop" : [
{
"hopNumber" : 1,
"logicSFId" : "CBB702C3-7719-4FE6-A5AD-3A9C9E2653091",
"sfType" : "NAT"
}
]
},
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.15.5 Delete a VPC Communication Policy Application Instance

Typical Scenarios
A VPC communication policy application instance needs to be deleted.

Functions
Delete a VPC communication policy application instance based on the ID.

Constraints
User role: northbound operator.

HTTP Method
DELETE

URI
/controller/dc/v3/sfco/vpcConnectPolicy/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1617


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1265 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - ID of the "00215123-100


charac instance to 0-0000-0001-0
ters. which the VPC 00000000001"
The communication
value policy is
must applied.
meet
the
followi
ng
regular
expres
sion:
[0-9a-
fA-F]
{8}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{4}-
[0-9a-
fA-F]
{12}.

Request Parameters

Table 1-1266 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dtId No string 0 to - Transaction ID. "G2021100817


256 3530511_dbadc
charac 40-ece4-421c-
ters. bef8-
b6548c12d4c7d
"

N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1618


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
DELETE /controller/dc/v3/sfco/vpcConnectPolicy/00215123-1000-0000-0001-000000000001 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20211008173530511_dbadc40-ece4-421c-bef8-b6548c12d4c7d"

Response Parameters
Response status code 204: successfully.

Response status code 400: Response status code 400: Bad request.
For details, see the response message body.

Sample Response
Response status code 204: successfully.
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.16 External Network Management


External network API description: 1. Query an external network.

1.9.7.16.1 Query All Logical Networks

Typical Scenarios
All logical networks need to be queried.

Functions
Query all logical networks.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1619


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/external-networks

Table 1-1267 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No string - - Page size. "10"


ze

pageIn No string - - Page index. "1"


dex

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/external-networks?pageSize=10&pageIndex=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1268 ExternalNetworkDtoPagedWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

extern ARRAY For details, see Table "" -


alnetw _REFER 1-1269.
ork ENCE

pageSi int32 - 4000 "" 4000


ze

pageIn int32 - 1 "" 1


dex

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1620


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

totalN int32 - - "" 5


um

Table 1-1269 ExNetDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 36 characters. - External "DBB702C3-77


network ID. 19-4FE6-
This field A5AD-3A9C9E2
cannot be 65309"
updated.

name string 1 to 255 - Name. "name"


characters.

networ int32 - - Network type. 0


kType The options are
as follows:
0:Public and
1:Private.

publicI array< - - Associated ["10.1.1.0/24"]


pPool string> CIDR network.

extern string 36 characters. - Associated "DBB702C3-77


alGate external 19-4FE6-
wayId gateway ID. A5AD-3A9C9E2
This field 65309"
cannot be
updated.

tenantI string 36 characters. - Tenant to "DBB702C3-77


d which a logical 19-4FE6-
network A5AD-3A9C9E2
belongs. If this 65309"
parameter is
left empty, it is
a public VPC.
This field
cannot be
updated.

public string 36 characters. - Public router "DBB702C3-77


Router ID. 19-4FE6-
Id A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1621


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

logicN string 36 characters. - Logical "DBB702C3-77


etwork network ID. 19-4FE6-
Id A5AD-3A9C9E2
65309"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalnetwork" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"networkType" : 0,
"publicIpPool" : ["10.1.1.0/24"],
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"publicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"pageSize" : 4000,
"pageIndex" : 1,
"totalNum" : 5
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.16.2 Query an External Network by ID

Typical Scenarios
An external network needs to be queried by ID.

Functions
Query an external network by ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1622


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/external-networks/external-network/{id}

Table 1-1270 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 36 - External "DBB702C3-77


charac network ID. 19-4FE6-
ters. This field A5AD-3A9C9E2
cannot be 65309"
updated.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/external-networks/external-network/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1623


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1271 ExternalNetworkRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

extern ARRAY For details, see Table "" -


alnetw _REFER 1-1269.
ork ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"externalnetwork" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "name",
"networkType" : 0,
"publicIpPool" : ["10.1.1.0/24"],
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"publicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.17 External Network Connection


# Description of external network connection interfaces:
1. Create an external network connection.

1.9.7.17.1 Create an External Network Connection

Typical Scenarios
An external network connection needs to be created.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1624


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Create an external network connection based on the request information.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/external-connects

Request Parameters

Table 1-1272 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1273. s for
creating
an
external
network
connectio
n.

Table 1-1273 ExternalConnectRestfulDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern Yes ARRAY For details, see - -


al- _REFER Table 1-1274.
connec ENCE
t

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1625


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1274 ExternalConnectDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Object ID. "DBB702C3-77


charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

name No string 1 to - Object name. "10"


255
charac
ters.

tenant No string - - Tenant name. "tenant1"


Name

tenantI No string 0 to - Tenant. The "DBB702C3-77


d 255 controller 19-4FE6-
charac automatically A5AD-3A9C9E2
ters. obtains the 65309"
tenant to
which the
logical router
belongs.

logicN No string 0 to - Logical "DBB702C3-77


etwork 255 network. The 19-4FE6-
Id charac controller A5AD-3A9C9E2
ters. automatically 65309"
obtains the
logical network
to which the
logical router
belongs.

routerI No string 1 to - Logical router. "DBB702C3-77


d 255 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

router No string 1 to - Logical router "logicRouter00


Name 255 name. 1"
charac
ters.

routerI No string 0 to - Interconnection "10.1.1.1"


p 255 IP address on a
charac router.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1626


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

vasIp No string 0 to - Interconnection "10.1.1.2"


255 IP address on a
charac VAS device.
ters.

mask No int64 - - Mask. 24

routerI No string 0 to - IPv6 "FE80:0000:000


pv6 255 interconnection 0:0000:0000:00
charac address on a 44:0000:0032/1
ters. router. 27"

vasIpv No string 0 to - IPv6 "FE80:0000:000


6 255 interconnection 0:0000:0000:00
charac address on a 44:0000:0032/1
ters. VAS device. 28"

maskv No int64 - - IPv6 mask. 64


6

vlan No int64 - - Interconnection 1


VLAN.

allcoM No string 0 to - Resource "automatic"


ode 255 allocation
charac mode.
ters. Currently, only
automatic
allocation is
supported.

extern No string 1 to - External "DBB702C3-77


alGate 255 gateway. 19-4FE6-
wayId charac A5AD-3A9C9E2
ters. 65309"

extern No string 1 to - External "DBB702C3-77


alNetw 255 network 19-4FE6-
orkId charac domain. A5AD-3A9C9E2
ters. 65309"

extern No string 0 to - External "aaa"


alNetw 255 network
orkNa charac domain name.
me ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1627


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

snatEn No boolea - false Whether to false


able n enable SNAT.
This function is
used to control
whether the
router needs to
perform
address
translation or
directly use the
private
network
address to
access an
external
network.

firewal No boolea - - Whether a -


lEnabl n logical router
e connected to
an external
gateway passes
through the
firewall.

logicV No string 0 to - Logical firewall "DBB702C3-77


asId 255 specified for an 19-4FE6-
charac external A5AD-3A9C9E2
ters. network 65309"
connection.

logicV No string 0 to - Logical firewall "vas001"


asNam 255 name.
e charac
ters.

ipv6En No boolea - - Whether to true


able n enable IPv6.

ipv6Fw No boolea - - Whether IPv6 true


Enable n traffic traverses
firewalls.

nat64P No array< 0-1 - NAT64 prefix. -


refixes string> items.

ipv4Ac No boolea - - Whether routes true


cessExt n are delivered
ernalE for IPv4 by
nable default.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1628


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipv6Ac No boolea - - Whether routes true


cessExt n are delivered
ernalE for IPv6 by
nable default.

localCi No array< 0-256 - Local network -


drs string> items. segment.

prefere No int32 [1-255 - Preference of a 230


nce ] route.

localPr No int32 [1-255 - Local priority 230


eferenc ] of a routing
e policy.

bgpPre No int32 [1-255 - BGP priority. 230


ference ]

flowRu No ARRAY For details, see - -


les _REFER Table 1-1275.
ENCE

additio No REFER For details, see Additional -


nal ENCE Table 1-1276. information.

Table 1-1275 FlowRuleDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string - - Flow rule ID. "12345678-123


4-1234-1234-1
234567890ab"

cidr Yes string - - Network "172.16.13.0/24


segment of the "
flow rule.

directi Yes string - - Direction. "ingress"


on

fwEna Yes boolea - - Whether the -


ble n firewall
function is
enabled.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1629


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

backha Yes boolea - - Whether a -


ulRout n route is a
eEnabl return route.
e

Table 1-1276 AdditionalDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - Parameters for "CloudPlatform


er charac configuring a 1"
ters. condition.

create No string 0 to - Creation time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-10-05T2


At 255 0:11:16.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/external-connects HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external-connect" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"tenantName" : "tenant1",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerName" : "logicRouter001",
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.2",
"mask" : 24,
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"maskv6" : 64,
"vlan" : 1,
"allcoMode" : "automatic",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1630


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkName" : "aaa",
"snatEnable" : false,
"logicVasId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicVasName" : "vas001",
"ipv6Enable" : true,
"ipv6FwEnable" : true,
"nat64Prefixes" : [
"10.1.1.0/24"
],
"ipv4AccessExternalEnable" : true,
"ipv6AccessExternalEnable" : true,
"localCidrs" : [
"10.1.1.1/24"
],
"preference" : 230,
"localPreference" : 230,
"bgpPreference" : 230,
"flowRules" : [
{
"id" : "12345678-1234-1234-1234-1234567890ab",
"cidr" : "172.16.13.0/24",
"direction" : "ingress"
}
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1631


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.17.2 Query External Network Connections

Typical Scenarios
External network connections need to be queried.

Functions
Query external network connections based on the request information.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/external-connects

Table 1-1277 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to - Parameters for -


er 255 configuring a
charac condition.
ters.

tenantI No UUID - - Tenant ID. "DBB702C3-77


d 19-4FE6-
A5AD-3A9C9E2
65309"

logicR No UUID - - Logical router "DBB702C3-77


outerId ID. 19-4FE6-
A5AD-3A9C9E2
65309"

extNet No UUID - - External "DBB702C3-77


WorkId network ID. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1632


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extern No UUID - - External "DBB702C3-77


alGate gateway ID. 19-4FE6-
wayId A5AD-3A9C9E2
65309"

exclud No string - - Producer that "mdc"


eProdu is not included.
cer

pageIn No string - - Page index. "1"


dex

pageSi No string - - Delete an "10"


ze External
Network
Connection

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/external-connects?tenantId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&logicRouterId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&extNetWorkId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&externalGatewayId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&excludeProducer=mdc&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-1278 ExternalConnectListRestfulDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

extern ARRAY For details, see Table - -


al- _REFER 1-1279.
connec ENCE
t

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1633


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

totalN int64 - - Total number 100


um of results.

pageIn int64 - - Page index. 1


dex

pageSi int64 - - Page size. 4000


ze

Table 1-1279 ExternalConnectDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id UUID 1 to 36 - Object ID. "DBB702C3-77


characters. 19-4FE6-
A5AD-3A9C9E2
65309"

name string 1 to 255 - Object name. "10"


characters.

tenant string - - Tenant name. "tenant1"


Name

tenantI string 0 to 255 - Tenant. The "DBB702C3-77


d characters. controller 19-4FE6-
automatically A5AD-3A9C9E2
obtains the 65309"
tenant to
which the
logical router
belongs.

logicN string 0 to 255 - Logical "DBB702C3-77


etwork characters. network. The 19-4FE6-
Id controller A5AD-3A9C9E2
automatically 65309"
obtains the
logical network
to which the
logical router
belongs.

routerI string 1 to 255 - Logical router. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1634


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

router string 1 to 255 - Logical router "logicRouter00


Name characters. name. 1"

routerI string 0 to 255 - Interconnection "10.1.1.1"


p characters. IP address on a
router.

vasIp string 0 to 255 - Interconnection "10.1.1.2"


characters. IP address on a
VAS device.

mask int64 - - Mask. 24

routerI string 0 to 255 - IPv6 "FE80:0000:000


pv6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032/1
router. 27"

vasIpv string 0 to 255 - IPv6 "FE80:0000:000


6 characters. interconnection 0:0000:0000:00
address on a 44:0000:0032/1
VAS device. 28"

maskv int64 - - IPv6 mask. 64


6

vlan int64 - - Interconnection 1


VLAN.

allcoM string 0 to 255 - Resource "automatic"


ode characters. allocation
mode.
Currently, only
automatic
allocation is
supported.

extern string 1 to 255 - External "DBB702C3-77


alGate characters. gateway. 19-4FE6-
wayId A5AD-3A9C9E2
65309"

extern string 1 to 255 - External "DBB702C3-77


alNetw characters. network 19-4FE6-
orkId domain. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1635


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

extern string 0 to 255 - External "aaa"


alNetw characters. network
orkNa domain name.
me

snatEn boolea - false Whether to false


able n enable SNAT.
This function is
used to control
whether the
router needs to
perform
address
translation or
directly use the
private
network
address to
access an
external
network.

firewal boolea - - Whether a -


lEnabl n logical router
e connected to
an external
gateway passes
through the
firewall.

logicV string 0 to 255 - Logical firewall "DBB702C3-77


asId characters. specified for an 19-4FE6-
external A5AD-3A9C9E2
network 65309"
connection.

logicV string 0 to 255 - Logical firewall "vas001"


asNam characters. name.
e

ipv6En boolea - - Whether to true


able n enable IPv6.

ipv6Fw boolea - - Whether IPv6 true


Enable n traffic traverses
firewalls.

nat64P array< 0-1 items. - NAT64 prefix. -


refixes string>

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1636


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

ipv4Ac boolea - - Whether routes true


cessExt n are delivered
ernalE for IPv4 by
nable default.

ipv6Ac boolea - - Whether routes true


cessExt n are delivered
ernalE for IPv6 by
nable default.

localCi array< 0-256 items. - Local network -


drs string> segment.

prefere int32 [1-255] - Preference of a 230


nce route.

localPr int32 [1-255] - Local priority 230


eferenc of a routing
e policy.

bgpPre int32 [1-255] - BGP priority. 230


ference

flowRu ARRAY For details, see Table - -


les _REFER 1-1280.
ENCE

additio REFER For details, see Table Additional -


nal ENCE 1-1281. information.

Table 1-1280 FlowRuleDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string - - Flow rule ID. "12345678-123


4-1234-1234-1
234567890ab"

cidr string - - Network "172.16.13.0/24


segment of the "
flow rule.

directi string - - Direction. "ingress"


on

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1637


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

fwEna boolea - - Whether the -


ble n firewall
function is
enabled.

backha boolea - - Whether a -


ulRout n route is a
eEnabl return route.
e

Table 1-1281 AdditionalDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Parameters for "CloudPlatform


er characters. configuring a 1"
condition.

create string 0 to 255 - Creation time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

update string 0 to 255 - Update time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external-connect" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"tenantName" : "tenant1",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1638


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"routerName" : "logicRouter001",
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.2",
"mask" : 24,
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"maskv6" : 64,
"vlan" : 1,
"allcoMode" : "automatic",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkName" : "aaa",
"snatEnable" : false,
"logicVasId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicVasName" : "vas001",
"ipv6Enable" : true,
"ipv6FwEnable" : true,
"nat64Prefixes" : [
"10.1.1.0/24"
],
"ipv4AccessExternalEnable" : true,
"ipv6AccessExternalEnable" : true,
"localCidrs" : [
"10.1.1.1/24"
],
"preference" : 230,
"localPreference" : 230,
"bgpPreference" : 230,
"flowRules" : [
{
"id" : "12345678-1234-1234-1234-1234567890ab",
"cidr" : "172.16.13.0/24",
"direction" : "ingress"
}
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
],
"totalNum" : 100,
"pageIndex" : 1,
"pageSize" : 4000
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.17.3 Query External Network Connections

Typical Scenarios
External network connections need to be queried.

Functions
Query an external network connection based on the condition information. The
query can be performed based on the ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1639


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/external-connects/external-connect/{id}

Table 1-1282 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Specifies the ID "DBB702C3-77


charac of the external 19-4FE6-
ters. network A5AD-3A9C9E2
connection to 65309"
be queried.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/external-connects/external-connect/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1640


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1283 ExternalConnectRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

extern ARRAY For details, see Table - -


al- _REFER 1-1279.
connec ENCE
t

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external-connect" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"tenantName" : "tenant1",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerName" : "logicRouter001",
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.2",
"mask" : 24,
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"maskv6" : 64,
"vlan" : 1,
"allcoMode" : "automatic",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkName" : "aaa",
"snatEnable" : false,
"logicVasId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicVasName" : "vas001",
"ipv6Enable" : true,
"ipv6FwEnable" : true,
"nat64Prefixes" : [
"10.1.1.0/24"
],
"ipv4AccessExternalEnable" : true,
"ipv6AccessExternalEnable" : true,
"localCidrs" : [
"10.1.1.1/24"
],
"preference" : 230,
"localPreference" : 230,
"bgpPreference" : 230,
"flowRules" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1641


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"id" : "12345678-1234-1234-1234-1234567890ab",
"cidr" : "172.16.13.0/24",
"direction" : "ingress"
}
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.17.4 Update an External Connection by ID (Only NAT64 Prefix Update Is


Supported)

Typical Scenarios
An external connection needs to be updated by ID.

Functions
Update an external connection by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
PUT

URI
/controller/dc/v3/servicenetwork/external-connects/external-connect/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1642


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1284 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID - - External "DBB702C3-77


connection ID. 19-4FE6-
A5AD-3A9C9E2
6530"

Request Parameters

Table 1-1285 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dtId Yes string - - Distributed "G2019081217


transaction ID. 2342232_3483
090-
f93d-422d-
a0f6-54c95fb2
ba68d"

Table 1-1286 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1273. s for
updating
an
external
connectio
n.

Sample Request
HTTP
PUT /controller/dc/v3/servicenetwork/external-connects/external-connect/DBB702C3-7719-4FE6-
A5AD-3A9C9E26530 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20190812172342232_3483090-f93d-422d-a0f6-54c95fb2ba68d"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1643


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"external-connect" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"tenantName" : "tenant1",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerName" : "logicRouter001",
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.2",
"mask" : 24,
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"maskv6" : 64,
"vlan" : 1,
"allcoMode" : "automatic",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkName" : "aaa",
"snatEnable" : false,
"logicVasId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicVasName" : "vas001",
"ipv6Enable" : true,
"ipv6FwEnable" : true,
"nat64Prefixes" : [
"10.1.1.0/24"
],
"ipv4AccessExternalEnable" : true,
"ipv6AccessExternalEnable" : true,
"localCidrs" : [
"10.1.1.1/24"
],
"preference" : 230,
"localPreference" : 230,
"bgpPreference" : 230,
"flowRules" : [
{
"id" : "12345678-1234-1234-1234-1234567890ab",
"cidr" : "172.16.13.0/24",
"direction" : "ingress"
}
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.
ExternalConnectRestfulDtoWrapper parameters, For details, see Table 1-1283.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1644


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external-connect" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "10",
"tenantName" : "tenant1",
"tenantId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"routerName" : "logicRouter001",
"routerIp" : "10.1.1.1",
"vasIp" : "10.1.1.2",
"mask" : 24,
"routerIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/127",
"vasIpv6" : "FE80:0000:0000:0000:0000:0044:0000:0032/128",
"maskv6" : 64,
"vlan" : 1,
"allcoMode" : "automatic",
"externalGatewayId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"externalNetworkName" : "aaa",
"snatEnable" : false,
"logicVasId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"logicVasName" : "vas001",
"ipv6Enable" : true,
"ipv6FwEnable" : true,
"nat64Prefixes" : [
"10.1.1.0/24"
],
"ipv4AccessExternalEnable" : true,
"ipv6AccessExternalEnable" : true,
"localCidrs" : [
"10.1.1.1/24"
],
"preference" : 230,
"localPreference" : 230,
"bgpPreference" : 230,
"flowRules" : [
{
"id" : "12345678-1234-1234-1234-1234567890ab",
"cidr" : "172.16.13.0/24",
"direction" : "ingress"
}
],
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1645


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.17.5 Delete an External Network Connection

Typical Scenarios
An external network connection needs to be deleted.

Functions
Delete an external network connection based on the condition information. The
external network connection can be deleted based on the ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/external-connects/external-connect/{id}

Table 1-1287 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - ID of the "DBB702C3-77


charac external 19-4FE6-
ters. network A5AD-3A9C9E2
connection to 65309"
be deleted.

Table 1-1288 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string - - Provider. "Agile-


er Controller-
MDC"

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1646


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/external-connects/external-connect/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309?producer=Agile-Controller-MDC HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.17.6 Add a Subnet to an External Network

Typical Scenarios
The address of a tenant to access an external network or the address of an
external network to a tenant needs to be added.

Functions
Add a subnet from an external network.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1647


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/external-connects/external-connect/{id}/action/
add-cidrs

Table 1-1289 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes UUID 1 to 36 - ID of an "DBB702C3-77


charac external 19-4FE6-
ters. network to A5AD-3A9C9E2
which a subnet 65309"
belongs.

Request Parameters

Table 1-1290 header parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dtId Yes string - - Distributed "G2019081217


transaction ID. 2342232_3483
090-
f93d-422d-
a0f6-54c95fb2
ba68d"

Table 1-1291 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1292. s for
adding a
subnet to
an
external
network.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1648


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1292 ExternalConnectCidrListRestfulDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extern Yes ARRAY For details, see - -


al- _REFER Table 1-1293.
connec ENCE
t-cidr

Table 1-1293 ExternalConnectCidrDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

cidrs Yes array< - - CIDR network -


string> segment.

cidrTyp Yes string 1 to 36 - CIDR type. "ingress/


e charac egress"
ters.

additio No REFER For details, see Additional -


nal ENCE Table 1-1276. information.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/external-connects/external-connect/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309/action/add-cidrs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20190812172342232_3483090-f93d-422d-a0f6-54c95fb2ba68d"
{
"external-connect-cidr" : [
{
"cidrs" : [
"10.1.1.1/24"
],
"cidrType" : "ingress/egress",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1649


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.17.7 Remove a Subnet from an External Network

Typical Scenarios
The address of a tenant to access an external network or the address of an
external network to a tenant needs to be deleted.

Functions
Remove a subnet from an external network.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/external-connects/external-connect/{id}/action/
remove-cidrs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1650


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1294 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - ID of an "DBB702C3-77


charac external 19-4FE6-
ters. network to A5AD-3A9C9E2
which a subnet 65309"
belongs.

Request Parameters

Table 1-1295 header parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

dtId Yes string - - Distributed "G2019081217


transaction ID. 2342232_3483
090-
f93d-422d-
a0f6-54c95fb2
ba68d"

Table 1-1296 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1292. s for
removing
a subnet
from an
external
network.

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/external-connects/external-connect/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309/action/remove-cidrs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1651


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
dtId: "G20190812172342232_3483090-f93d-422d-a0f6-54c95fb2ba68d"
{
"external-connect-cidr" : [
{
"cidrs" : [
"10.1.1.1/24"
],
"cidrType" : "ingress/egress",
"additional" : {
"producer" : "CloudPlatform1",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00"
}
}
]
}

Response Parameters
Response status code 200: Response status code 200: OK.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.17.8 Query Subnets Connecting to an External Network

Typical Scenarios
The address of a tenant to access an external network or the address of an
external network to a tenant needs to be queried.

Functions
Query subnets connecting to an external network. By default, subnets are sorted
by cidrType and cidr.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1652


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
GET

URI
/controller/dc/v3/servicenetwork/external-connects/external-connect/{id}/action/
query-cidrs

Table 1-1297 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - ID of an "DBB702C3-77


charac external 19-4FE6-
ters. network to A5AD-3A9C9E2
which a subnet 65309"
belongs.

Table 1-1298 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to - Parameters for "CloudPlatform


er 255 configuring a 1"
charac condition.
ters.

cidrTyp No string - - Subnet type. "ingress/


e egress/
extEgress/
intIngress"

pageIn No string - - Page index. "1"


dex

pageSi No string - - Page size. "10"


ze

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1653


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/servicenetwork/external-connects/external-connect/DBB702C3-7719-4FE6-
A5AD-3A9C9E265309/action/query-cidrs?producer=CloudPlatform1&cidrType=ingress/egress/extEgress/
intIngress&pageIndex=1&pageSize=10 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: Response status code 200: OK.

Table 1-1299 ExternalConnectCidrQueryListRestfulDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

extern ARRAY For details, see Table - -


al- _REFER 1-1300.
connec ENCE
t-flat-
cidr

totalN int64 - - Total number 100


um of results.

pageIn int64 - - Page index. 1


dex

pageSi int64 - - Page size. 4000


ze

Table 1-1300 ExternalConnectFlatCidrDto parameters


Param Type Value Range Defaul Description Example
eter t Value

cidr string - - Subnet "172.16.13.0/24


connected to "
an external
network.

cidrTyp string 1 to 36 - CIDR type. "ingress/


e characters. egress/ext-
egress/int-
ingress"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1654


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

create string 0 to 255 - Creation time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

update string 0 to 255 - Update time. "2016-10-05T2


At characters. 0:11:16.000+00:
00"

produc string 0 to 36 - Parameters for "CloudPlatform


er characters. configuring a 1"
condition.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: Response status code 200: OK.
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external-connect-flat-cidr" : [
{
"cidr" : "172.16.13.0/24",
"cidrType" : "ingress/egress/ext-egress/int-ingress",
"createAt" : "2016-10-05T20:11:16.000+00:00",
"updateAt" : "2016-10-05T20:11:16.000+00:00",
"producer" : "CloudPlatform1"
}
],
"totalNum" : 100,
"pageIndex" : 1,
"pageSize" : 4000
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.18 DHCP Group Management


# DHCP group management interface description
1. Query the DHCP group list.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1655


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

2. If the DHCP server connects to the M-LAG consisting of access switches, the
loopback interface cannot be used.

1.9.7.18.1 Create a DHCP Group

Typical Scenarios
A DHCP group needs to be created.

Functions
Create DHCP groups based on parameters.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/publicservice/dhcpgroups

Request Parameters

Table 1-1301 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1302. s for
udpating
a DHCP
group.

Table 1-1302 DhcpGroupsDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dhcpgr Yes ARRAY For details, see Create a VPC -


oup _REFER Table 1-1303. Connection
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1656


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1303 DhcpGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - DHCP server "DBB702C3-77


256 ID. This field 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

name Yes string 1 to - DHCP server "dhcpserver1"


255 name. This
charac field can be
ters. updated.

descrip No string 0 to - Description. "description1"


tion 255 This field can
charac be updated.
ters.

logicR No string 0 to - ID of the "DBB702C3-77


outerId 256 logical router 19-4FE6-
charac to which the A5AD-3A9C9E2
ters. DHCP server 65309"
belongs. Either
the DHCP
server or the
VRF name
needs to be
set. This field
cannot be
updated.

vrfNa No string 0 to 31 - VRF name of "vrfname"


me charac the logical
ters. router to which
the DHCP
server belongs.
Either the VRF
name or the
logical router
ID needs to be
set. This field
cannot be
updated.

serverI Yes array< 1-4000 - DHCP server ["192.168.192.


p string> items. address. This 1"]
field can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1657


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

dhcpgr No ARRAY For details, see IP address pool -


oupl2v _REFER Table 1-1304. of the DHCP
ni ENCE server.

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

device No ARRAY For details, see Device group -


GroupI _REFER Table 1-1305. information to
nfos ENCE be delivered.
This parameter
is optional. A
maximum of
two device
groups can be
specified. All of
the
deviceGroupInf
os, l3Vni, and
routeTarget
parameters
must be set or
left empty.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1658


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l3Vni No int32 [0-214 0 DHCP Layer 3 10


74836 VNI. This
47] parameter is
optional. The
value can be
changed. All of
the
deviceGroupInf
os, l3Vni, and
routeTarget
parameters
must be set or
left empty.

routeT No string 0 to - Route target "0:5006"


arget 255 specified by a
charac user. The value
ters. can be
changed. All of
the
deviceGroupInf
os, l3Vni, and
routeTarget
parameters
must be set or
left empty.

Table 1-1304 DhcpGroupL2vniDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

l2Vni Yes int32 [0-214 0 DHCP L2 VNI. 10


74836 This field can
47] be updated.

ipv4Ci No string 0 to - DHCP IPv4 "192.168.168.0/


dr 255 CIDR. This field 24"
charac can be
ters. updated.

ipv6Ci No string 1 to 31 - DHCP IPv6 "FE80::/126"


dr charac CIDR. This field
ters. can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1659


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1305 DeviceGroupInfoDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device Yes string 1 to 36 - ID of the "DBB702C3-77


GroupI charac device group to 19-4FE6-
d ters. be delivered. A5AD-3A9C9E2
The value can 65309"
be changed.

device No string 1 to - Name of the "CE_45"


Group 255 device group to
Name charac be delivered.
ters. This parameter
is used only for
query and
display.

Sample Request
HTTP
POST /controller/dc/v3/publicservice/dhcpgroups HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"dhcpgroup" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "dhcpserver1",
"description" : "description1",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrfName" : "vrfname",
"serverIp" : ["192.168.192.1"],
"dhcpgroupl2vni" : [
{
"l2Vni" : 10,
"ipv4Cidr" : "192.168.168.0/24",
"ipv6Cidr" : "FE80::/126"
}
],
"producer" : "default",
"deviceGroupInfos" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45"
}
],
"l3Vni" : 10,
"routeTarget" : "0:5006"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1660


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 201: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.18.2 Query DHCP Groups

Typical Scenarios
DHCP groups need to be queried.

Functions
Query DHCP groups based on the search criteria. Query by page is supported.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/dhcpgroups

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1661


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1306 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string [1-400 - Page size. "1"


ze 0]

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/publicservice/dhcpgroups?pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1307 DhcpGroupsPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

dhcpgr ARRAY For details, see Table Create a VPC -


oup _REFER 1-1308. Connection
ENCE

totalN int64 1 to - Number of 1


um 2147483647 returned data
characters. records.

pageIn int32 1 to - Page index. 1


dex 2147483647
characters.

pageSi int32 1 to - Page size. 1


ze 2147483647
characters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1662


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1308 DhcpGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - DHCP server "DBB702C3-77


characters. ID. This field 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

name string 1 to 255 - DHCP server "dhcpserver1"


characters. name. This
field can be
updated.

descrip string 0 to 255 - Description. "description1"


tion characters. This field can
be updated.

logicR string 0 to 256 - ID of the "DBB702C3-77


outerId characters. logical router 19-4FE6-
to which the A5AD-3A9C9E2
DHCP server 65309"
belongs. Either
the DHCP
server or the
VRF name
needs to be
set. This field
cannot be
updated.

vrfNa string 0 to 31 - VRF name of "vrfname"


me characters. the logical
router to which
the DHCP
server belongs.
Either the VRF
name or the
logical router
ID needs to be
set. This field
cannot be
updated.

serverI array< 1-4000 items. - DHCP server ["192.168.192.


p string> address. This 1"]
field can be
updated.

dhcpgr ARRAY For details, see Table IP address pool -


oupl2v _REFER 1-1309. of the DHCP
ni ENCE server.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1663


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

device ARRAY For details, see Table Device group -


GroupI _REFER 1-1310. information to
nfos ENCE be delivered.
This parameter
is optional. A
maximum of
two device
groups can be
specified. All of
the
deviceGroupInf
os, l3Vni, and
routeTarget
parameters
must be set or
left empty.

l3Vni int32 [0-2147483647 0 DHCP Layer 3 10


] VNI. This
parameter is
optional. The
value can be
changed. All of
the
deviceGroupInf
os, l3Vni, and
routeTarget
parameters
must be set or
left empty.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1664


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

routeT string 0 to 255 - Route target "0:5006"


arget characters. specified by a
user. The value
can be
changed. All of
the
deviceGroupInf
os, l3Vni, and
routeTarget
parameters
must be set or
left empty.

Table 1-1309 DhcpGroupL2vniDto parameters


Param Type Value Range Defaul Description Example
eter t Value

l2Vni int32 [0-2147483647 0 DHCP L2 VNI. 10


] This field can
be updated.

ipv4Ci string 0 to 255 - DHCP IPv4 "192.168.168.0/


dr characters. CIDR. This field 24"
can be
updated.

ipv6Ci string 1 to 31 - DHCP IPv6 "FE80::/126"


dr characters. CIDR. This field
can be
updated.

Table 1-1310 DeviceGroupInfoDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 1 to 36 - ID of the "DBB702C3-77


GroupI characters. device group to 19-4FE6-
d be delivered. A5AD-3A9C9E2
The value can 65309"
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1665


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device string 1 to 255 - Name of the "CE_45"


Group characters. device group to
Name be delivered.
This parameter
is used only for
query and
display.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"dhcpgroup" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "dhcpserver1",
"description" : "description1",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrfName" : "vrfname",
"serverIp" : ["192.168.192.1"],
"dhcpgroupl2vni" : [
{
"l2Vni" : 10,
"ipv4Cidr" : "192.168.168.0/24",
"ipv6Cidr" : "FE80::/126"
}
],
"producer" : "default",
"deviceGroupInfos" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45"
}
],
"l3Vni" : 10,
"routeTarget" : "0:5006"
}
],
"totalNum" : 1,
"pageIndex" : 1,
"pageSize" : 1
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1666


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.18.3 Query a DHCP Group by ID

Typical Scenarios
A DHCP group needs to be queried by ID.

Functions
Query a DHCP group by ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/publicservice/dhcpgroups/dhcpgroup/{id}

Table 1-1311 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a fabric. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/publicservice/dhcpgroups/dhcpgroup/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1667


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1312 DhcpGroupsDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

dhcpgr ARRAY For details, see Table Create a VPC -


oup _REFER 1-1308. Connection
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"dhcpgroup" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "dhcpserver1",
"description" : "description1",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrfName" : "vrfname",
"serverIp" : ["192.168.192.1"],
"dhcpgroupl2vni" : [
{
"l2Vni" : 10,
"ipv4Cidr" : "192.168.168.0/24",
"ipv6Cidr" : "FE80::/126"
}
],
"producer" : "default",
"deviceGroupInfos" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45"
}
],
"l3Vni" : 10,
"routeTarget" : "0:5006"
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1668


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.18.4 Update a DHCP Group

Typical Scenarios
A DHCP group needs to be updated.

Functions
Update a DHCP group.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/publicservice/dhcpgroups/dhcpgroup/{id}

Table 1-1313 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a DHCP group. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1669


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1314 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1302. s for
udpating
a DHCP
group.

Sample Request
HTTP
PUT /controller/dc/v3/publicservice/dhcpgroups/dhcpgroup/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"dhcpgroup" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "dhcpserver1",
"description" : "description1",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrfName" : "vrfname",
"serverIp" : ["192.168.192.1"],
"dhcpgroupl2vni" : [
{
"l2Vni" : 10,
"ipv4Cidr" : "192.168.168.0/24",
"ipv6Cidr" : "FE80::/126"
}
],
"producer" : "default",
"deviceGroupInfos" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45"
}
],
"l3Vni" : 10,
"routeTarget" : "0:5006"
}
]
}

Response Parameters
Response status code 200: successfully

DhcpGroupsDtoWrapper parameters, For details, see Table 1-1312.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1670


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"dhcpgroup" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "dhcpserver1",
"description" : "description1",
"logicRouterId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"vrfName" : "vrfname",
"serverIp" : ["192.168.192.1"],
"dhcpgroupl2vni" : [
{
"l2Vni" : 10,
"ipv4Cidr" : "192.168.168.0/24",
"ipv6Cidr" : "FE80::/126"
}
],
"producer" : "default",
"deviceGroupInfos" : [
{
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceGroupName" : "CE_45"
}
],
"l3Vni" : 10,
"routeTarget" : "0:5006"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.18.5 Delete a DHCP Group

Typical Scenarios
A DHCP group needs to be deleted.

Functions
Delete a DHCP group.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1671


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/publicservice/dhcpgroups/dhcpgroup/{id}

Table 1-1315 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "DBB702C3-77


256 a fabric. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/publicservice/dhcpgroups/dhcpgroup/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1672


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.19 Flow Rule


# External connection flow rule API description: 1.Create a flow rule. 2.Delete a
flow rule.

1.9.7.19.1 Create a Flow Rule

Typical Scenarios
A flow rule needs to be created.

Functions
Create a flow rule based on the request information.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

Single-interface performance: ≤ 3600s.

HTTP Method
POST

URI
/controller/dc/v3/servicenetwork/flow-rule/{extConId}/add

Table 1-1316 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extCon Yes UUID - - External "12345678-123


Id connection ID. 4-1234-1234-1
234567890ab"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1673


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1317 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1318. s for
creating a
flow rule.

Table 1-1318 FlowRuleDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string - - Flow rule ID. "12345678-123


4-1234-1234-1
234567890ab"

cidr Yes string - - Network "172.16.13.0/24


segment of the "
flow rule.

directi Yes string - - Direction. "ingress"


on

fwEna Yes boolea - - Whether the -


ble n firewall
function is
enabled.

backha Yes boolea - - Whether a -


ulRout n route is a
eEnabl return route.
e

Sample Request
HTTP
POST /controller/dc/v3/servicenetwork/flow-rule/12345678-1234-1234-1234-1234567890ab/add HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "12345678-1234-1234-1234-1234567890ab",
"cidr" : "172.16.13.0/24",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1674


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"direction" : "ingress"
}

Response Parameters
Response status code 200: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.19.2 Delete a Flow Rule

Typical Scenarios
Delete a Flow Rule.

Functions
Delete a flow rule based on the ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.
Single-interface performance: ≤ 3600s.

HTTP Method
DELETE

URI
/controller/dc/v3/servicenetwork/flow-rule/{extConId}/remove/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1675


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1319 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extCon Yes UUID - - External "12345678-123


Id connection ID. 4-1234-1234-1
234567890ab"

id Yes UUID - - ID for deleting "12345678-123


an external 4-1234-1234-1
network 234567890ab"
connection.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/servicenetwork/flow-rule/12345678-1234-1234-1234-1234567890ab/remove/
12345678-1234-1234-1234-1234567890ab HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1676


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.20 DHCP Relay Management of Subnet


# DHCP relay management APIs

1.9.7.20.1 Associate a Subnet with a DHCP Group

Typical Scenarios
A subnet needs to be associated with a DHCP group.

Functions
Associate a subnet with a DHCP group.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/subnet-dhcprelay

Request Parameters

Table 1-1320 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Parameter -


NCE 1-1321. s for
udpating
a DHCP
group.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1677


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1321 SubnetDHCPRelayDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

subnet Yes ARRAY For details, see - -


DhcpR _REFER Table 1-1322.
elay ENCE

Table 1-1322 SubnetDHCPRelayDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

subnet Yes UUID 1 to 36 - Object ID. "DBB702C3-77


Id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

dhcpGr Yes UUID 0 to - DHCP server "DBB702C3-77


oupId 255 group 19-4FE6-
charac associated with A5AD-3A9C9E2
ters. the subnet. 65309"

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/subnet-dhcprelay HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"subnetDhcpRelay" : [
{
"subnetId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"dhcpGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
]
}

Response Parameters
Response status code 201: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1678


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.20.2 Disassociate a Subnet from a DHCP Group

Typical Scenarios
A subnet needs to be disassociated from a DHCP group.

Functions
Disassociate a subnet from a DHCP group.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/subnet-dhcprelay/{subnet-id}

Table 1-1323 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

subnet Yes UUID 1 to 36 - ID for deleting "DBB702C3-77


-id charac a DHCP group. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1679


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/subnet-dhcprelay/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.21 Logical Router Configuration Management


# APIs for managing the device group configuration services of a logical router: 1.
Query all the device group configuration services of a logical router, including the
best-effort path and FRR. 2. Create a device group configuration service on a
logical router, including the best-effort path and FRR. 3. Query details on a device
group configuration service of a logical router, including the best-effort path and
FRR. 4. Update a device group configuration service of a logical router, including
the best-effort path and FRR. 5. Delete a device group configuration service from
a logical router, including the best-effort path and FRR.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1680


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.21.1 Create a Device Group Configuration Service on a Logical Router,


Including the Best-Effort Path and FRR

Typical Scenarios
A device group configuration service needs to be created on a logical router.

Functions
Create a device group configuration service on a logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/router/devicecfgs

Request Parameters

Table 1-1324 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

wrapp Yes REFER For details, see Parameters for -


er ENCE Table 1-1325. creating a
device group
configuration
service on a
logical router.

Table 1-1325 RouterDeviceCfgDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

Router No REFER For details, see Logical router -


Device ENCE Table 1-1326. information.
Cfg

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1681


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1326 RouterDeviceCfgDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Object ID of "dc417c43-442


256 the device 6-4244-
charac group be45-44b0c6ff
ters. configuration 2864"
service on a
logical router.

name No string 1 to - ID of the "name1"


255 associated
charac logical router.
ters. This field
cannot be
updated.

descrip No string 0 to - Description. "10"


tion 255 This field can
charac be updated.
ters.

logicR Yes string 0 to - ID of the "dc417c43-442


outerId 256 associated 6-4244-
charac logical router. be45-44b0c6ff
ters. This field 2864"
cannot be
updated.

device No string 0 to - ID of the "dc417c43-442


GroupI 256 device group. 6-4244-
d charac Either the be45-44b0c6ff
ters. device group 2864"
ID or device
management
IP address can
be set. This
field cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1682


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No array< 0-255 - Device ["192.168.1.1"]


ps string> items. management
IP address list,
which must
include the
management
IP addresses of
all devices in
the same
device group.
Either the
device
management
IP address or
the device
group ID can
be set. This
field cannot be
updated.

enable No boolea - - Whether to false


Escape n enable the
best-effort
path. This field
can be
updated.

enable No boolea - - Whether to false


Frr n enable FRR.
This field can
be updated.

escape No string - - Whether to "Unknown"


IpVersi deliver BGP
on configurations.
This field
cannot be
updated.

enable No boolea - - Whether to false


Escape n deliver BGP
Bgp configurations.
This field
cannot be
updated.

extInte No string - - API type. This "Vbdif"


rfaceTy field cannot be
pe updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1683


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

enable No boolea - - Whether to false


Null0R n enable black-
oute hole route. This
field can be
updated.

null0Ip No string - - Indicates "Ipv4"


Versio whether to
n enable the DCI
routing policy.

escape No string 0 to 20 - Best-effort "manual"


Mode charac path mode.
ters. manual:
manual;
automatic:
automatic.

escape No int32 [2-409 - Manually 2000


Vlan 4] specified VLAN
ID.

escape No ARRAY 0-2 items. For IP address of -


IpList _REFER details, see the device that
ENCE Table 1-1327. is manually
specified.

enable No boolea - - Indicates false


DciRou n whether to
tePolic enable the DCI
y routing policy.

dciApp No array< - - apply -


lyRTs string> extcommunity
rt information
configured on
the node in the
routing policy.

additio No REFER For details, see Additional -


nal ENCE Table 1-1328. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1684


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1327 EscapeIpDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to 36 - Device ID. "e22e0885-6c0


d charac 5-4cc1-8ddc-
ters. b7d0a21edbf3"

ipv4 No string 0 to - IPv4 address of "10.1.1.1/30"


200 the best-effort
charac path.
ters.

ipv6 No string 0 to - IPv6 address of "fc00::1/7"


200 the best-effort
charac path.
ters.

Table 1-1328 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2017-08-10


At 255 16:30:40"
charac
ters.

update No string 0 to - Update time. "2017-08-10


At 255 16:30:40"
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1685


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/router/devicecfgs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"RouterDeviceCfg" : {
"id" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"name" : "name1",
"description" : "10",
"logicRouterId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceGroupId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceIps" : ["192.168.1.1"],
"enableEscape" : false,
"enableFrr" : false,
"escapeIpVersion" : "Unknown",
"enableEscapeBgp" : false,
"extInterfaceType" : "Vbdif",
"enableNull0Route" : false,
"null0IpVersion" : "Ipv4",
"escapeMode" : "manual",
"escapeVlan" : 2000,
"escapeIpList" : [
{
"deviceId" : "e22e0885-6c05-4cc1-8ddc-b7d0a21edbf3",
"ipv4" : "10.1.1.1/30",
"ipv6" : "fc00::1/7"
}
],
"enableDciRoutePolicy" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 201: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1686


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.21.2 Query Device Group Configuration Services of a Logical Router, Including


the Best-Effort Path and FRR

Typical Scenarios
Device group configuration services of a logical router need to be queried.

Functions
Query all device group configuration services of a logical router under a specified
condition.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/router/devicecfgs

Table 1-1329 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageSi No string 0 to - Page size. "10"


ze 255
charac
ters.

pageIn No string 0 to - Current page "1"


dex 255 number.
charac
ters.

logicR No string 0 to - ID of the "dc417c43-442


outerId 256 associated 6-4244-
charac Layer 3 logical be45-44b0c6ff
ters. router. 2864"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1687


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No string 0 to - ID of the "dc417c43-442


GroupI 256 device group. 6-4244-
d charac Either the be45-44b0c6ff
ters. device 2864"
management
IP address or
the device
group ID can
be set.

deviceI No string - - Management "192.168.1.1"


p IP address of
the device.
Either the
device
management
IP address or
the device
group ID can
be set.

produc No string 0 to 36 - Producer. This "default"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/router/devicecfgs?
pageSize=10&pageIndex=1&logicRouterId=dc417c43-4426-4244-
be45-44b0c6ff2864&deviceGroupId=dc417c43-4426-4244-
be45-44b0c6ff2864&deviceIp=192.168.1.1&producer=default HTTP/1.1
Host: 192.168.1.125:18002

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1688


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1330 RouterDeviceCfgDtoListWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

Router ARRAY 0-4000 items. For details, Logical router -


Device _REFER see Table 1-1331. information
Cfgs ENCE list.

totalN int64 [0-2147483647 - Total number 200


um ] of queried
results in the
device group
configuration
service list of a
logical router.

pageIn int32 [1-4000] - Current page 1


dex number.

pageSi int32 [1-4000] - Page size. 4000


ze

Table 1-1331 RouterDeviceCfgDto parameters

Param Type Value Range Defaul Description Example


eter t Value

id string 0 to 256 - Object ID of "dc417c43-442


characters. the device 6-4244-
group be45-44b0c6ff
configuration 2864"
service on a
logical router.

name string 1 to 255 - ID of the "name1"


characters. associated
logical router.
This field
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1689


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

descrip string 0 to 255 - Description. "10"


tion characters. This field can
be updated.

logicR string 0 to 256 - ID of the "dc417c43-442


outerId characters. associated 6-4244-
logical router. be45-44b0c6ff
This field 2864"
cannot be
updated.

device string 0 to 256 - ID of the "dc417c43-442


GroupI characters. device group. 6-4244-
d Either the be45-44b0c6ff
device group 2864"
ID or device
management
IP address can
be set. This
field cannot be
updated.

deviceI array< 0-255 items. - Device ["192.168.1.1"]


ps string> management
IP address list,
which must
include the
management
IP addresses of
all devices in
the same
device group.
Either the
device
management
IP address or
the device
group ID can
be set. This
field cannot be
updated.

enable boolea - - Whether to false


Escape n enable the
best-effort
path. This field
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1690


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

enable boolea - - Whether to false


Frr n enable FRR.
This field can
be updated.

escape string - - Whether to "Unknown"


IpVersi deliver BGP
on configurations.
This field
cannot be
updated.

enable boolea - - Whether to false


Escape n deliver BGP
Bgp configurations.
This field
cannot be
updated.

extInte string - - API type. This "Vbdif"


rfaceTy field cannot be
pe updated.

enable boolea - - Whether to false


Null0R n enable black-
oute hole route. This
field can be
updated.

null0Ip string - - Indicates "Ipv4"


Versio whether to
n enable the DCI
routing policy.

escape string 0 to 20 - Best-effort "manual"


Mode characters. path mode.
manual:
manual;
automatic:
automatic.

escape int32 [2-4094] - Manually 2000


Vlan specified VLAN
ID.

escape ARRAY 0-2 items. For details, see IP address of -


IpList _REFER Table 1-1332. the device that
ENCE is manually
specified.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1691


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

enable boolea - - Indicates false


DciRou n whether to
tePolic enable the DCI
y routing policy.

dciApp array< - - apply -


lyRTs string> extcommunity
rt information
configured on
the node in the
routing policy.

additio REFER For details, see Table Additional -


nal ENCE 1-1333. information.

Table 1-1332 EscapeIpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 0 to 36 - Device ID. "e22e0885-6c0


d characters. 5-4cc1-8ddc-
b7d0a21edbf3"

ipv4 string 0 to 200 - IPv4 address of "10.1.1.1/30"


characters. the best-effort
path.

ipv6 string 0 to 200 - IPv6 address of "fc00::1/7"


characters. the best-effort
path.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1692


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1333 AdditionDto parameters


Param Type Value Range Defaul Description Example
eter t Value

produc string 0 to 36 - Producer. This "default"


er characters. parameter is
optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create string 0 to 255 - Creation time. "2017-08-10


At characters. 16:30:40"

update string 0 to 255 - Update time. "2017-08-10


At characters. 16:30:40"

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"RouterDeviceCfgs" : [
{
"id" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"name" : "name1",
"description" : "10",
"logicRouterId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceGroupId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceIps" : ["192.168.1.1"],
"enableEscape" : false,
"enableFrr" : false,
"escapeIpVersion" : "Unknown",
"enableEscapeBgp" : false,
"extInterfaceType" : "Vbdif",
"enableNull0Route" : false,
"null0IpVersion" : "Ipv4",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1693


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"escapeMode" : "manual",
"escapeVlan" : 2000,
"escapeIpList" : [
{
"deviceId" : "e22e0885-6c05-4cc1-8ddc-b7d0a21edbf3",
"ipv4" : "10.1.1.1/30",
"ipv6" : "fc00::1/7"
}
],
"enableDciRoutePolicy" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
],
"totalNum" : 200,
"pageIndex" : 1,
"pageSize" : 4000
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.21.3 Configuring Service Parameters for a Logical Router Group, Including


Best-Effort Path and FRR

Typical Scenarios
Service parameters for a logical router group need to be configured.

Functions
Update service parameters for a device group based on the logical router ID,
device group ID, or device management IP address.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/router/devicecfgs/setparams

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1694


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1334 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Input -


er ENCE Table 1-1335. parameters for
configuring
services for a
logical router
group.

Table 1-1335 RouterDevCfgParamWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

Router No REFER For details, see Router -


Device ENCE Table 1-1336. information.
Cfg

Table 1-1336 RouterDevCfgParamDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

logicR Yes string 0 to - ID of the "dc417c43-442


outerId 256 associated 6-4244-
charac logical router. be45-44b0c6ff
ters. 2864"

device No string 0 to - ID of a "dc417c43-442


GroupI 256 specified device 6-4244-
d charac group. Either be45-44b0c6ff
ters. the device 2864"
group ID or the
device
management
IP address
must be
specified.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1695


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deviceI No array< 0-255 - List of device ["192.168.1.1"]


ps string> items. management
IP addresses,
which must be
the
management
IP addresses of
all devices in
the same
device group.
Either the
device
management
IP address or
the device
group ID must
be specified.

enable No boolea - - Whether the false


Escape n best-effort
path is
enabled.

enable No boolea - - Whether FRR is false


Frr n enabled.

escape No string - - IP address type "Unknown"


IpVersi of the best-
on effort path.
The value can
be Ipv4, Ipv6,
or Unknown. If
this parameter
is left empty,
Unknown is
used. This field
can be
updated.

enable No boolea - - Whether BGP false


Escape n configurations
Bgp are delivered.

extInte No string - - Interface type. "Vbdif"


rfaceTy
pe

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1696


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

enable No boolea - - Whether the false


Null0R n blackhole route
oute is enabled.

null0Ip No string - - IP address type "Ipv4"


Versio of the best-
n effort path.
The value can
be Ipv4, Ipv6,
or Unknown. If
this parameter
is left empty,
Unknown is
used. This field
can be
updated.

enable No boolea - - Indicates false


DciRou n whether to
tePolic enable the DCI
y routing policy.

escape No string 0 to 20 - Best-effort "manual"


Mode charac path mode.
ters. manual:
manual;
automatic:
automatic.

escape No int32 [2-409 - Manually 2000


Vlan 4] specified VLAN
ID.

escape No ARRAY 0-2 items. For IP address of -


IpList _REFER details, see the device that
ENCE Table 1-1327. is manually
specified.

dciApp No array< - - apply -


lyRTs string> extcommunity
rt information
configured on
the node in the
routing policy.

additio No REFER For details, see Additional -


nal ENCE Table 1-1328. information.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1697


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/router/devicecfgs/setparams HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"RouterDeviceCfg" : {
"logicRouterId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceGroupId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceIps" : ["192.168.1.1"],
"enableEscape" : false,
"enableFrr" : false,
"escapeIpVersion" : "Unknown",
"enableEscapeBgp" : false,
"extInterfaceType" : "Vbdif",
"enableNull0Route" : false,
"null0IpVersion" : "Ipv4",
"enableDciRoutePolicy" : false,
"escapeMode" : "manual",
"escapeVlan" : 2000,
"escapeIpList" : [
{
"deviceId" : "e22e0885-6c05-4cc1-8ddc-b7d0a21edbf3",
"ipv4" : "10.1.1.1/30",
"ipv6" : "fc00::1/7"
}
],
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response Parameters
Response status code 201: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 201: successfully
HTTP/1.1 201 Created
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1698


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.21.4 Query a Device Group Configuration Service by ID on a Logical Router,


Including the Best-Effort Path and FRR

Typical Scenarios
A device group configuration service needs to be queried by ID on a logical router.

Functions
Query a device group configuration service by ID on a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/router/devicecfgs/devicecfg/{id}

Table 1-1337 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Query a device "dc417c43-442


256 group 6-4244-
charac configuration be45-44b0c6ff
ters. service by ID 2864"
on a logical
router.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/router/devicecfgs/devicecfg/dc417c43-4426-4244-be45-44b0c6ff2864
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1699


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1338 RouterDeviceCfgDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

Router REFER For details, see Table Logical router -


Device ENCE 1-1331. information.
Cfg

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"RouterDeviceCfg" : {
"id" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"name" : "name1",
"description" : "10",
"logicRouterId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceGroupId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceIps" : ["192.168.1.1"],
"enableEscape" : false,
"enableFrr" : false,
"escapeIpVersion" : "Unknown",
"enableEscapeBgp" : false,
"extInterfaceType" : "Vbdif",
"enableNull0Route" : false,
"null0IpVersion" : "Ipv4",
"escapeMode" : "manual",
"escapeVlan" : 2000,
"escapeIpList" : [
{
"deviceId" : "e22e0885-6c05-4cc1-8ddc-b7d0a21edbf3",
"ipv4" : "10.1.1.1/30",
"ipv6" : "fc00::1/7"
}
],
"enableDciRoutePolicy" : false,
"additional" : {
"producer" : "default",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1700


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"createAt" : "2017-08-10 16:30:40",


"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.21.5 Update a Device Group Configuration Service by ID on a Logical Router,


Including the Best-Effort Path and FRR

Typical Scenarios
A device group configuration service needs to be updated by ID on a logical router.

Functions
Update a device group configuration service by ID on a logical router.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 200 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/router/devicecfgs/devicecfg/{id}

Table 1-1339 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID for updating "dc417c43-442


256 a device group 6-4244-
charac configuration be45-44b0c6ff
ters. service on a 2864"
logical router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1701


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1340 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

wrapp Yes REFER For details, see Parameters for -


er ENCE Table 1-1325. updating a
device group
configuration
service on a
logical router.
The values of
logicRouterId,
deviceIps, and
deviceGroupId
cannot be
updated.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/router/devicecfgs/devicecfg/dc417c43-4426-4244-be45-44b0c6ff2864
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"RouterDeviceCfg" : {
"id" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"name" : "name1",
"description" : "10",
"logicRouterId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceGroupId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceIps" : ["192.168.1.1"],
"enableEscape" : false,
"enableFrr" : false,
"escapeIpVersion" : "Unknown",
"enableEscapeBgp" : false,
"extInterfaceType" : "Vbdif",
"enableNull0Route" : false,
"null0IpVersion" : "Ipv4",
"escapeMode" : "manual",
"escapeVlan" : 2000,
"escapeIpList" : [
{
"deviceId" : "e22e0885-6c05-4cc1-8ddc-b7d0a21edbf3",
"ipv4" : "10.1.1.1/30",
"ipv6" : "fc00::1/7"
}
],
"enableDciRoutePolicy" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1702


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"updateAt" : "2017-08-10 16:30:40"


}
}
}

Response Parameters
Response status code 200: successfully
RouterDeviceCfgDtoWrapper parameters, For details, see Table 1-1338.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"RouterDeviceCfg" : {
"id" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"name" : "name1",
"description" : "10",
"logicRouterId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceGroupId" : "dc417c43-4426-4244-be45-44b0c6ff2864",
"deviceIps" : ["192.168.1.1"],
"enableEscape" : false,
"enableFrr" : false,
"escapeIpVersion" : "Unknown",
"enableEscapeBgp" : false,
"extInterfaceType" : "Vbdif",
"enableNull0Route" : false,
"null0IpVersion" : "Ipv4",
"escapeMode" : "manual",
"escapeVlan" : 2000,
"escapeIpList" : [
{
"deviceId" : "e22e0885-6c05-4cc1-8ddc-b7d0a21edbf3",
"ipv4" : "10.1.1.1/30",
"ipv6" : "fc00::1/7"
}
],
"enableDciRoutePolicy" : false,
"additional" : {
"producer" : "default",
"createAt" : "2017-08-10 16:30:40",
"updateAt" : "2017-08-10 16:30:40"
}
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1703


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Content-Length: 250
Connection: keep-alive

1.9.7.21.6 Delete a Device Group Configuration Service by ID from a Logical Router,


Including the Best-Effort Path and FRR

Typical Scenarios
A device group configuration service needs to be deleted by ID from a logical
router.

Functions
ID for deleting a device group configuration service from a logical router.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 200 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/router/devicecfgs/devicecfg/{id}

Table 1-1341 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID for deleting "dc417c43-442


256 a device group 6-4244-
charac configuration be45-44b0c6ff
ters. service from a 2864"
logical router.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1704


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1342 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

produc No string 0 to 36 - This parameter "North"


er charac is optional. If it
ters. is specified by
a user, the
user-specified
value is used. If
it is not
specified, the
default value
North is used.

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/router/devicecfgs/devicecfg/dc417c43-4426-4244-
be45-44b0c6ff2864?producer=North HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1705


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.22 Loopback Interface Management


Loopback interface APIs:
1. Add, delete, modify, and query loopback interfaces.
2. Query loopback interfaces created by using APIs.
3. Configure loopback interfaces for specified devices.

1.9.7.22.1 Create a Loopback Interface

Typical Scenarios
A loopback interface needs to be created.

Functions
Create a loopback interface.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/loopbacks

Request Parameters

Table 1-1343 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1344. paramete
r model
class for
creating a
loopback
interface.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1706


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1344 LoopbackDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

loopba Yes ARRAY For details, see "" -


ck _REFER Table 1-1345.
ENCE

Table 1-1345 LoopbackDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to 36 - Object ID. This "DBB702C3-77


charac field cannot be 19-4FE6-
ters. updated. A5AD-3A9C9E2
65309"

name No string 1 to - Loopback "bfd1"


255 interface name,
charac which can be
ters. updated.

descrip No string 0 to - Description. "This is for


tion 255 This field can tenant1."
charac be updated.
ters.

owner No int32 - - Type of the 1


Type object to which
the loopback
interfaces
belong. 1:
Logical router.
2: External
gateway. This
parameter
cannot be
updated.

routerI No string 1 to 36 - Associated "DBB702C3-77


d charac logicRouterId 19-4FE6-
ters. or external A5AD-3A9C9E2
gateway's 65309"
LogicRouterId,
which cannot
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1707


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

loopba No string [1-214 - Loopback "200"


ckId 74836 interface ID,
47] which can be
specified. If it is
not specified,
the controller
automatically
allocates a
loopback
interface ID
based on the
device group
resource pool.
This parameter
cannot be
updated.

ip No array< 0-255 - Loopback -


string> items. interface IP
addresses, in
CIDR format.
The maximum
number of IPv4
and IPv6
addresses
configured for
each loopback
interface is
subject to the
number of
valid device
groups.

device No string 1 to 36 - Device group, "DBB702C3-77


GroupI charac which cannot 19-4FE6-
d ters. be updated. A5AD-3A9C9E2
65309"

device No ARRAY For details, see Devices for -


List _REFER Table 1-1346. which loopback
ENCE IP addresses
are configured.
This parameter
is optional. If it
is not specified,
the controller
automatically
allocates
devices.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1708


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1346 deviceList parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI Yes string 1 to 36 - Device ID. "DBB702C3-77


d charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

ip No array< 0-255 - Loopback -


string> items. interface IP
addresses
deployed on
the local
device, in CIDR
format.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/loopbacks HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"loopback" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackId" : "200",
"ip" : [
"192.168.1.0/24"
],
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip" : [
"192.168.1.0/24"
]
}
]
}
]
}

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1709


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.22.2 Query the Loopback Interface List

Typical Scenarios
The loopback interface list needs to be queried.

Functions
Query the loopback interface list by condition.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/loopbacks

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1710


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1347 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

owner No int32 - - Type of the 1


Type object to which
the loopback
interfaces to be
queried belong.
1: Logical
router. 2:
External
gateway.

routerI No string 1 to 36 - Associated "DBB702C3-77


d charac logicRouterId 19-4FE6-
ters. or external A5AD-3A9C9E2
gateway's 65309"
LogicRouterId.

loopba No string [1-214 - Loopback "200"


ckId 74836 interface ID.
47]

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/loopbacks?ownerType=1&routerId=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309&loopbackId=200&pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1711


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1348 LoopbackPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

loopba ARRAY For details, see Table "" -


ck _REFER 1-1349.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of loopback
interfaces
queried.

pageIn int32 [1-4000] - Page index. 10


dex

pageSi int32 [1-4000] - Page size. 10


ze

Table 1-1349 LoopbackDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 1 to 36 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

name string 1 to 255 - Loopback "bfd1"


characters. interface name,
which can be
updated.

descrip string 0 to 255 - Description. "This is for


tion characters. This field can tenant1."
be updated.

owner int32 - - Type of the 1


Type object to which
the loopback
interfaces
belong. 1:
Logical router.
2: External
gateway. This
parameter
cannot be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1712


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

routerI string 1 to 36 - Associated "DBB702C3-77


d characters. logicRouterId 19-4FE6-
or external A5AD-3A9C9E2
gateway's 65309"
LogicRouterId,
which cannot
be updated.

loopba string [1-2147483647 - Loopback "200"


ckId ] interface ID,
which can be
specified. If it is
not specified,
the controller
automatically
allocates a
loopback
interface ID
based on the
device group
resource pool.
This parameter
cannot be
updated.

ip array< 0-255 items. - Loopback -


string> interface IP
addresses, in
CIDR format.
The maximum
number of IPv4
and IPv6
addresses
configured for
each loopback
interface is
subject to the
number of
valid device
groups.

device string 1 to 36 - Device group, "DBB702C3-77


GroupI characters. which cannot 19-4FE6-
d be updated. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1713


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Devices for -


List _REFER 1-1350. which loopback
ENCE IP addresses
are configured.
This parameter
is optional. If it
is not specified,
the controller
automatically
allocates
devices.

Table 1-1350 deviceList parameters

Param Type Value Range Defaul Description Example


eter t Value

deviceI string 1 to 36 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

ip array< 0-255 items. - Loopback -


string> interface IP
addresses
deployed on
the local
device, in CIDR
format.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"loopback" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1714


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"name" : "bfd1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackId" : "200",
"ip" : [
"192.168.1.0/24"
],
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip" : [
"192.168.1.0/24"
]
}
]
}
],
"totalNum" : 200,
"pageIndex" : 10,
"pageSize" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.22.3 Query a Loopback Interface

Typical Scenarios
A loopback interface needs to be queried.

Functions
Query a loopback interface.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/loopbacks/loopback/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1715


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1351 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to 36 - ID used for the "DBB702C3-77


charac query. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/loopbacks/loopback/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1352 LoopbackDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

loopba ARRAY For details, see Table "" -


ck _REFER 1-1349.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1716


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Connection: keep-alive
{
"loopback" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackId" : "200",
"ip" : [
"192.168.1.0/24"
],
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip" : [
"192.168.1.0/24"
]
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.22.4 Update a Loopback Interface

Typical Scenarios
A loopback interface needs to be updated.

Functions
Update a loopback interface by ID. Parameters of a loopback interface can be
modified only when no services reference the loopback interface.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/loopbacks/loopback/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1717


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1353 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 1 to 36 - ID of the "DBB702C3-77


charac loopback 19-4FE6-
ters. interface to be A5AD-3A9C9E2
updated. 65309"

Request Parameters

Table 1-1354 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1344. paramete
r model
class for
updating
a
loopback
interface.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/loopbacks/loopback/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"loopback" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackId" : "200",
"ip" : [
"192.168.1.0/24"
],
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip" : [
"192.168.1.0/24"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1718


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

]
}
]
}
]
}

Response Parameters
Response status code 200: successfully

LoopbackDtoWrapper parameters, For details, see Table 1-1352.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"loopback" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"loopbackId" : "200",
"ip" : [
"192.168.1.0/24"
],
"deviceGroupId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceList" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ip" : [
"192.168.1.0/24"
]
}
]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1719


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.22.5 Delete a Loopback Interface

Typical Scenarios
A loopback interface needs to be deleted by ID.

Functions
Delete a loopback interface by ID. A loopback interface can be deleted only when
no services reference it.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/loopbacks/loopback/{id}

Table 1-1355 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 1 to - Loopback "DBB702C3-77


255 interface ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/loopbacks/loopback/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1720


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.23 L2 and L3 Logical API Management


Logical resource management API:

1. Query sub-resources by resource.

1.9.7.23.1 L2 and L3 Logical API Management

Typical Scenarios
The name and usage of a logical resource need to be queried.

Functions
Query the name and usage of child resources based on the parent resource ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1721


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/logicnetwork/logicresusage

Request Parameters

Table 1-1356 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1357. paramete
r for
querying
the sub-
resource.

Table 1-1357 queryResDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Resource ID. "5"


255
charac
ters.

pageIn No int32 0 to - Page index. 5


dex 255
charac
ters.

pageSi No int32 0 to - Page size. 5


ze 255
charac
ters.

order No string 0 to - Order. "desc"


255
charac
ters.

orderV No string 0 to - Order. "logicResource


alue 255 Name"
charac
ters.

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1722


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

POST /controller/dc/v3/logicnetwork/logicresusage HTTP/1.1


Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"id" : "5",
"pageIndex" : 5,
"pageSize" : 5,
"order" : "desc",
"orderValue" : "logicResourceName"
}

Response Parameters
Response status code 200: successfully

Table 1-1358 LogicResourceUsageDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

resInfo ARRAY For details, see Table "" -


es _REFER 1-1359.
ENCE

totalN int32 - - ResourceTotalN -


um um

Table 1-1359 LogicResourceUsageDto parameters

Param Type Value Range Defaul Description Example


eter t Value

service string - - LogicResource -


Parent name
Name

service string - - ResourceId -


ParentI
d

usedN int32 - - ResourceUsage -


um Num

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1723


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24 OSPF Process Management


OSPF process APIs:

1. Add, delete, modify, and query OSPF processes.

2. For a group of devices that function as a logic router or external gateway, only
one OSPF or OSPFv3 process can be deployed, with the same process ID. Different
processes can be deployed on different groups of devices. The process IDs that the
Agile Controller-DCN automatically allocates are different by default.

1.9.7.24.1 Create an OSPF Process

Typical Scenarios
An OSPF process needs to be created.

Functions
Create an OSPF process globally or in a tenant view. By default, an OSPF process
created in a tenant view is visible to the tenant.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/ospf/processs

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1724


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1360 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1361. paramete
r model
class for
creating
an OSPF
process.

Table 1-1361 OspfProcessDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

proces Yes ARRAY For details, see "" -


s _REFER Table 1-1362.
ENCE

Table 1-1362 OspfProcessDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

name Yes string 1 to - OSPF process "ospf1"


255 name, which
charac can be
ters. updated.

descrip No string 0 to - Description. "This is for


tion 255 This field can tenant1."
charac be updated.
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1725


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

owner Yes int32 [1-2] - OSPF process 1


Type owner. 1:
Logical router.
2: External
gateway. This
parameter
cannot be
updated.

routerI Yes string 0 to - Associated "DBB702C3-77


d 256 logicRouterId 19-4FE6-
charac or external A5AD-3A9C9E2
ters. gateway's 65309"
LogicRouterId,
which cannot
be updated.

type Yes int32 [1-2] - OSPF process 1


type. 1: Static.
2: Dynamic.
This parameter
cannot be
updated.

ospfPr No int64 [1-429 - ID of the OSPF 100


ocessId 49672 or OSPFv3
95] process on the
forwarding
plane. This
parameter is
optional. If this
parameter is
not specified, a
process ID will
be
automatically
applied for
from the
resource pool.

device No ARRAY For details, see Device group -


Group _REFER Table 1-1363. where the
ENCE OSPF process is
deployed. This
parameter is
mandatory for
static OSPF
processes.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1726


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ospfCf No REFER For details, see "" -


g ENCE Table 1-1365.

ospfV3 No REFER For details, see "" -


Cfg ENCE Table 1-1365.

Table 1-1363 OspfDeviceGroupDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

device No string 0 to - Device group "DBB702C3-77


Group 256 where the 19-4FE6-
charac OSPF process is A5AD-3A9C9E2
ters. deployed. 65309"

device No ARRAY For details, see Device -


Cfg _REFER Table 1-1364. configuration.
ENCE

Table 1-1364 DeviceCfgDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

deviceI No string 0 to - Device ID. "DBB702C3-77


d 256 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

ospfRo No string 0 to - OSPF/OSPFv3 "192.168.1.1"


uterId 255 router ID. This
charac parameter is
ters. mandatory for
static OSPF
processes. For
a dynamic
OSPF process,
the controller
automatically
applies for a
router ID from
the resource
pool for each
logical router
and device.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1727


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1365 ProcessDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

vpnCa No boolea - false Whether false


pabilit n routing loop
y detection is
disabled and
routes are
calculated
directly.

bandw No int32 [1-214 100 Bandwidth 100


idthRef 74836 reference value
erence 47] for link cost
calculation.

routeP No ARRAY For details, see OSPF route -


referen _REFER Table 1-1366. priority.
ce ENCE

stubRo No REFER For details, see "" -


uter ENCE Table 1-1367.

default No REFER For details, see "" -


Route ENCE Table 1-1368.

import No ARRAY For details, see Information -


Rtp _REFER Table 1-1369. about
ENCE redistributed
routes that are
learned from
other routing
protocols.

export No string 0 to - Associated "DBB702C3-77


2Evpn 256 router policy 19-4FE6-
RtpId charac ID. A5AD-3A9C9E2
ters. 65309"

filterI No string 0 to - Associated "DBB702C3-77


mport 256 router policy 19-4FE6-
RtpId charac ID. A5AD-3A9C9E2
ters. 65309"

timer No REFER For details, see "" -


ENCE Table 1-1370.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1728


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1366 RoutePreferenceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routeT No int32 - - 1: Default. 2: 1


ype ASE.

prefere No int32 [1-255 - OSPF route 10


nce ] priority. The
default value is
10. When the
router type is
ASE, the
default OSPF
route priority is
150.

Table 1-1367 StubRouterDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

flag No string ● NoC NoConf Stub device "NoConfig"


onfi ig flag.
g
● Stu
bOn
Han
d
● Stu
bOn
Boo
t

interva No int32 [5-655 500 Interval for 500


l 35] keeping the
device as a
stub device
when the
device is
restarted or
faulty, in
seconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1729


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

extern No boolea - false Whether true


alLsa n external-LSAs
with the
default
overriding
metric are
advertised.

extern No int32 [1-167 167116 User-defined 16711680


alCost 77215] 80 overriding
metric.

Table 1-1368 DefaultRouteDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

enable No boolea - false Whether the true


n default route is
advertised to a
common OSPF
area.

always No boolea - false Whether an true


n LSA that
describes a
default route is
generated and
advertised
regardless of
whether there
are active
default routes
of other OSPF
processes in
the routing
table of the
local device.

permit No boolea - false Whether IBGP true


-ibgp n routes are
imported.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1730


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1369 ImportRouteDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

protoc No int32 - - Protocol from 1


ol which routes
are imported.
1: Direct. 2:
Static. 3: BGP.

cost No int32 [0-167 - Route cost. 1


77214]

tag No int64 [0-429 - Tag of an 1


49672 external LSA.
95]

type No int32 - - Type of 1


external routes.
1: Type 1. 2:
Type 2.

permitI No boolea - false Whether IBGP true


bgp n routes can be
imported.

rtpId No string 0 to - Associated "DBB702C3-77


256 router policy 19-4FE6-
charac ID. A5AD-3A9C9E2
ters. 65309"

Table 1-1370 TimerDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

lsaArri No REFER For details, see "" -


val ENCE Table 1-1371.

lsaOrig No REFER For details, see "" -


inate ENCE Table 1-1372.

spfSch No REFER For details, see "" -


edule ENCE Table 1-1373.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1731


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1371 LsaArrivalDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

interva No boolea - false Whether the false


lEnabl n interval for
e receiving OSPF
LSAs is set.

interva No int32 [0-100 - Interval for 1


l 00] receiving LSAs,
in milliseconds.

intellig No boolea - false Whether an false


entTim n intelligent
erEnab timer is
le enabled to
specify the
interval for
receiving LSAs.

maxInt No int32 [1-300 1000 Maximum 1000


erval 000] interval for
receiving OSPF
LSAs, in
milliseconds.

startInt No int32 [0-600 500 Initial interval 500


erval 00] for receiving
OSPF LSAs, in
milliseconds.

holdInt No int32 [0-600 500 Hold interval 500


erval 00] for receiving
OSPF LSAs, in
milliseconds.

Table 1-1372 LsaOriginateDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

intellig No boolea - false Whether an false


entTim n intelligent
erEnab timer is
le enabled to
specify the
interval for
updating OSPF
LSAs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1732


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

maxInt No int32 [1-300 5000 Maximum 5000


erval 000] interval for
updating OSPF
LSAs, in
milliseconds.

startInt No int32 [0-600 500 Initial interval 500


erval 00] for updating
OSPF LSAs, in
milliseconds.

holdInt No int32 [1-600 1000 Hold interval 1000


erval 00] for updating
OSPF LSAs, in
milliseconds.

Table 1-1373 SpfScheduleDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

intellig No boolea - false Whether an false


entTim n intelligent
erEnab timer is
le enabled to
specify the
interval for
calculating the
SPF.

maxInt No int32 [1-300 5000 Maximum 5000


erval 000] interval for
calculating the
SPF, in
milliseconds.

startInt No int32 [1-600 50 Initial interval 50


erval 00] for calculating
the SPF, in
milliseconds.

holdInt No int32 [1-600 200 Hold interval 200


erval 00] for calculating
the SPF, in
milliseconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1733


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/ospf/processs HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"process" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "ospf1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : 1,
"ospfProcessId" : 100,
"deviceGroup" : [
{
"deviceGroup" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceCfg" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ospfRouterId" : "192.168.1.1"
}
]
}
],
"ospfCfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1734


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
},
"ospfV3Cfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1735


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"holdInterval" : 200
}
}
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.2 Query the OSPF Process List

Typical Scenarios
OSPF process information needs to be queried.

Functions
Query the OSPF process list by logical router or external gateway.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1736


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/logicnetwork/ospf/processs

Table 1-1374 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

vrfNa No string - - VRF name, "vrfName1"


me used as a
query
condition.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ospf/processs?pageIndex=1&pageSize=1&vrfName=vrfName1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1375 OspfProcessPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

proces ARRAY For details, see Table "" -


s _REFER 1-1376.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1737


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

totalN int64 [1-2147483647 - Total number 200


um ] of queried
OSPF
processes.

pageIn int32 [1-4000] - Page index. 10


dex

pageSi int32 [1-4000] - Page size. 10


ze

Table 1-1376 OspfProcessDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

name string 1 to 255 - OSPF process "ospf1"


characters. name, which
can be
updated.

descrip string 0 to 255 - Description. "This is for


tion characters. This field can tenant1."
be updated.

owner int32 [1-2] - OSPF process 1


Type owner. 1:
Logical router.
2: External
gateway. This
parameter
cannot be
updated.

routerI string 0 to 256 - Associated "DBB702C3-77


d characters. logicRouterId 19-4FE6-
or external A5AD-3A9C9E2
gateway's 65309"
LogicRouterId,
which cannot
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1738


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

type int32 [1-2] - OSPF process 1


type. 1: Static.
2: Dynamic.
This parameter
cannot be
updated.

ospfPr int64 [1-4294967295 - ID of the OSPF 100


ocessId ] or OSPFv3
process on the
forwarding
plane. This
parameter is
optional. If this
parameter is
not specified, a
process ID will
be
automatically
applied for
from the
resource pool.

device ARRAY For details, see Table Device group -


Group _REFER 1-1377. where the
ENCE OSPF process is
deployed. This
parameter is
mandatory for
static OSPF
processes.

ospfCf REFER For details, see Table "" -


g ENCE 1-1379.

ospfV3 REFER For details, see Table "" -


Cfg ENCE 1-1379.

Table 1-1377 OspfDeviceGroupDto parameters


Param Type Value Range Defaul Description Example
eter t Value

device string 0 to 256 - Device group "DBB702C3-77


Group characters. where the 19-4FE6-
OSPF process is A5AD-3A9C9E2
deployed. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1739


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device ARRAY For details, see Table Device -


Cfg _REFER 1-1378. configuration.
ENCE

Table 1-1378 DeviceCfgDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

ospfRo string 0 to 255 - OSPF/OSPFv3 "192.168.1.1"


uterId characters. router ID. This
parameter is
mandatory for
static OSPF
processes. For
a dynamic
OSPF process,
the controller
automatically
applies for a
router ID from
the resource
pool for each
logical router
and device.

Table 1-1379 ProcessDto parameters


Param Type Value Range Defaul Description Example
eter t Value

vpnCa boolea - false Whether false


pabilit n routing loop
y detection is
disabled and
routes are
calculated
directly.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1740


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

bandw int32 [1-2147483647 100 Bandwidth 100


idthRef ] reference value
erence for link cost
calculation.

routeP ARRAY For details, see Table OSPF route -


referen _REFER 1-1380. priority.
ce ENCE

stubRo REFER For details, see Table "" -


uter ENCE 1-1381.

default REFER For details, see Table "" -


Route ENCE 1-1382.

import ARRAY For details, see Table Information -


Rtp _REFER 1-1383. about
ENCE redistributed
routes that are
learned from
other routing
protocols.

export string 0 to 256 - Associated "DBB702C3-77


2Evpn characters. router policy 19-4FE6-
RtpId ID. A5AD-3A9C9E2
65309"

filterI string 0 to 256 - Associated "DBB702C3-77


mport characters. router policy 19-4FE6-
RtpId ID. A5AD-3A9C9E2
65309"

timer REFER For details, see Table "" -


ENCE 1-1384.

Table 1-1380 RoutePreferenceDto parameters


Param Type Value Range Defaul Description Example
eter t Value

routeT int32 - - 1: Default. 2: 1


ype ASE.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1741


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

prefere int32 [1-255] - OSPF route 10


nce priority. The
default value is
10. When the
router type is
ASE, the
default OSPF
route priority is
150.

Table 1-1381 StubRouterDto parameters


Param Type Value Range Defaul Description Example
eter t Value

flag string ● NoConfig NoConf Stub device "NoConfig"


ig flag.
● StubOnHand
● StubOnBoot

interva int32 [5-65535] 500 Interval for 500


l keeping the
device as a
stub device
when the
device is
restarted or
faulty, in
seconds.

extern boolea - false Whether true


alLsa n external-LSAs
with the
default
overriding
metric are
advertised.

extern int32 [1-16777215] 167116 User-defined 16711680


alCost 80 overriding
metric.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1742


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1382 DefaultRouteDto parameters

Param Type Value Range Defaul Description Example


eter t Value

enable boolea - false Whether the true


n default route is
advertised to a
common OSPF
area.

always boolea - false Whether an true


n LSA that
describes a
default route is
generated and
advertised
regardless of
whether there
are active
default routes
of other OSPF
processes in
the routing
table of the
local device.

permit boolea - false Whether IBGP true


-ibgp n routes are
imported.

Table 1-1383 ImportRouteDto parameters

Param Type Value Range Defaul Description Example


eter t Value

protoc int32 - - Protocol from 1


ol which routes
are imported.
1: Direct. 2:
Static. 3: BGP.

cost int32 [0-16777214] - Route cost. 1

tag int64 [0-4294967295 - Tag of an 1


] external LSA.

type int32 - - Type of 1


external routes.
1: Type 1. 2:
Type 2.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1743


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

permitI boolea - false Whether IBGP true


bgp n routes can be
imported.

rtpId string 0 to 256 - Associated "DBB702C3-77


characters. router policy 19-4FE6-
ID. A5AD-3A9C9E2
65309"

Table 1-1384 TimerDto parameters


Param Type Value Range Defaul Description Example
eter t Value

lsaArri REFER For details, see Table "" -


val ENCE 1-1385.

lsaOrig REFER For details, see Table "" -


inate ENCE 1-1386.

spfSch REFER For details, see Table "" -


edule ENCE 1-1387.

Table 1-1385 LsaArrivalDto parameters


Param Type Value Range Defaul Description Example
eter t Value

interva boolea - false Whether the false


lEnabl n interval for
e receiving OSPF
LSAs is set.

interva int32 [0-10000] - Interval for 1


l receiving LSAs,
in milliseconds.

intellig boolea - false Whether an false


entTim n intelligent
erEnab timer is
le enabled to
specify the
interval for
receiving LSAs.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1744


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

maxInt int32 [1-300000] 1000 Maximum 1000


erval interval for
receiving OSPF
LSAs, in
milliseconds.

startInt int32 [0-60000] 500 Initial interval 500


erval for receiving
OSPF LSAs, in
milliseconds.

holdInt int32 [0-60000] 500 Hold interval 500


erval for receiving
OSPF LSAs, in
milliseconds.

Table 1-1386 LsaOriginateDto parameters


Param Type Value Range Defaul Description Example
eter t Value

intellig boolea - false Whether an false


entTim n intelligent
erEnab timer is
le enabled to
specify the
interval for
updating OSPF
LSAs.

maxInt int32 [1-300000] 5000 Maximum 5000


erval interval for
updating OSPF
LSAs, in
milliseconds.

startInt int32 [0-60000] 500 Initial interval 500


erval for updating
OSPF LSAs, in
milliseconds.

holdInt int32 [1-60000] 1000 Hold interval 1000


erval for updating
OSPF LSAs, in
milliseconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1745


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1387 SpfScheduleDto parameters

Param Type Value Range Defaul Description Example


eter t Value

intellig boolea - false Whether an false


entTim n intelligent
erEnab timer is
le enabled to
specify the
interval for
calculating the
SPF.

maxInt int32 [1-300000] 5000 Maximum 5000


erval interval for
calculating the
SPF, in
milliseconds.

startInt int32 [1-60000] 50 Initial interval 50


erval for calculating
the SPF, in
milliseconds.

holdInt int32 [1-60000] 200 Hold interval 200


erval for calculating
the SPF, in
milliseconds.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"process" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "ospf1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : 1,
"ospfProcessId" : 100,
"deviceGroup" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1746


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"deviceGroup" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceCfg" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ospfRouterId" : "192.168.1.1"
}
]
}
],
"ospfCfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
},
"ospfV3Cfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1747


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
}
}
],
"totalNum" : 200,
"pageIndex" : 10,
"pageSize" : 10
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1748


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

1.9.7.24.3 Query OSPF Process Information

Typical Scenarios
OSPF process information needs to be queried.

Functions
Query OSPF process information.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/ospf/processs/process/{id}

Table 1-1388 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ospf/processs/process/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1749


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1389 OspfProcessDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

proces ARRAY For details, see Table "" -


s _REFER 1-1376.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"process" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "ospf1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : 1,
"ospfProcessId" : 100,
"deviceGroup" : [
{
"deviceGroup" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceCfg" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ospfRouterId" : "192.168.1.1"
}
]
}
],
"ospfCfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1750


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
},
"ospfV3Cfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1751


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.4 Update OSPF Process Information

Typical Scenarios
OSPF process information needs to be updated.

Functions
Update OSPF process information by ID. An OSPF process can be updated only
when no services reference it.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/ospf/processs/process/{id}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1752


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1390 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID of the OSPF "DBB702C3-77


256 process to be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

Request Parameters

Table 1-1391 body parameters

Paramet Type Value Default Descripti Example


er Range Value on

input REFERE For details, see Table Input -


NCE 1-1361. paramete
r model
class for
updating
an OSPF
process.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/ospf/processs/process/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"process" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "ospf1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : 1,
"ospfProcessId" : 100,
"deviceGroup" : [
{
"deviceGroup" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceCfg" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ospfRouterId" : "192.168.1.1"
}
]

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1753


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

}
],
"ospfCfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
},
"ospfV3Cfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1754


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
}
}
]
}

Response Parameters
Response status code 200: successfully
OspfProcessDtoWrapper parameters, For details, see Table 1-1389.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1755


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Connection: keep-alive
{
"process" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "ospf1",
"description" : "This is for tenant1.",
"ownerType" : 1,
"routerId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"type" : 1,
"ospfProcessId" : 100,
"deviceGroup" : [
{
"deviceGroup" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"deviceCfg" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ospfRouterId" : "192.168.1.1"
}
]
}
],
"ospfCfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1756


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
},
"ospfV3Cfg" : {
"vpnCapability" : false,
"bandwidthReference" : 100,
"routePreference" : [
{
"routeType" : 1,
"preference" : 10
}
],
"stubRouter" : {
"flag" : "NoConfig",
"interval" : 500,
"externalLsa" : true,
"externalCost" : 16711680
},
"defaultRoute" : {
"enable" : true,
"always" : true,
"permit-ibgp" : true
},
"importRtp" : [
{
"protocol" : 1,
"cost" : 1,
"tag" : 1,
"type" : 1,
"permitIbgp" : true,
"rtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309"
}
],
"export2EvpnRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"filterImportRtpId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"timer" : {
"lsaArrival" : {
"intervalEnable" : false,
"interval" : 1,
"intelligentTimerEnable" : false,
"maxInterval" : 1000,
"startInterval" : 500,
"holdInterval" : 500
},
"lsaOriginate" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 500,
"holdInterval" : 1000
},
"spfSchedule" : {
"intelligentTimerEnable" : false,
"maxInterval" : 5000,
"startInterval" : 50,
"holdInterval" : 200
}
}
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1757


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.5 Delete OSPF Process Information

Typical Scenarios
An OSPF process needs to be deleted by ID.

Functions
Delete an OSPF process by ID. An OSPF process can be deleted only when no
services reference it.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/ospf/processs/process/{id}

Table 1-1392 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - OSPF process "DBB702C3-77


256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/ospf/processs/process/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1758


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.6 Create an OSPF Neighbor

Typical Scenarios
An OSPF neighbor needs to be created.

Functions
Create an OSPF neighbor globally or in a tenant view. By default, an OSPF
neighbor created in a tenant view is visible to the tenant.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/ospf/peers

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1759


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1393 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1394. paramete
r model
class for
creating
an OSPF
neighbor.

Table 1-1394 OspfPeerDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

peer Yes ARRAY For details, see "" -


_REFER Table 1-1395.
ENCE

Table 1-1395 PeerDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - OSPF neighbor "DBB702C3-77


256 ID, which 19-4FE6-
charac cannot be A5AD-3A9C9E2
ters. updated. 65309"

proces Yes string 0 to - OSPF network "DBB702C3-77


sId 256 process ID, 19-4FE6-
charac which cannot A5AD-3A9C9E2
ters. be updated. 65309"

ipFami Yes int32 [1-2] - 1: IPv4 OSPF 1


ly neighbor. 2:
IPv6 OSPFv3
neighbor.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1760


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

sourceI Yes int32 - - OSPF source 1


fType interface type.
1: Gateway. 2:
Loopback
interface. 3.
Interconnection
interface. This
parameter
cannot be
updated.

sourceI Yes string 0 to - OSPF session "DBB702C3-77


fId 256 source 19-4FE6-
charac interface, A5AD-3A9C9E2
ters. which is a 65309"
logical switch
ID,
interconnection
interface ID, or
loopback
interface ID.
This parameter
cannot be
updated.

areaId Yes string 0 to - OSPF area ID. "192.168.2.2"


255 The default
charac value is 0.0.0.0.
ters.

networ Yes int32 - - Network type. 1


kType 1: Broadcast. 2:
P2P.

drPrior No int32 [0-255 1 Priority of the 100


ity ] interface that
participates in
the DR and
BDR election.

cost No int32 [1-655 - To set the cost 100


35] of an interface.

helloIn No int32 [1-655 - Interval for 100


terval 35] sending Hello
packets on an
interface, in
seconds.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1761


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deadIn No int32 [1-235 - Dead interval 100


terval 92600 of an OSPF
0] neighbor, in
seconds.

bfd No REFER For details, see "" -


ENCE Table 1-1396.

auth No REFER For details, see "" -


ENCE Table 1-1397.

Table 1-1396 BfdDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

enable Yes boolea - false Whether to false


n enable
dynamic BFD.

detect No int32 [3-50] 3 Detection 3


Multipl multiplier. The
ier default value is
3. This
parameter can
be updated.

minTxi No int32 [3-200 10 Minimum 10


nterval 00] transmit
interval, in
milliseconds.
The default
value is 10.
This parameter
can be
updated.

minRxi No int32 [3-200 10 Minimum 10


nterval 00] receive interval,
in milliseconds.
The default
value is 10.
This parameter
can be
updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1762


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1397 IfAuthDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

mode Yes int32 - - Authentication 1


mode. 1: None.
2: Simple. 3:
HMAC-
SHA256.

passw No string 1 to - This field may "passwordText"


ordTex 255 contain
t charac sensitive or
ters. personal data.
Keep it secure.
Password
character
string.

keyId No int32 [0-255 - Authentication 1


] key ID of the
interface's
cipher
authentication.
The key ID
must be
consistent with
that of the
peer.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/ospf/peers HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"peer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"processId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipFamily" : 1,
"sourceIfType" : 1,
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"areaId" : "192.168.2.2",
"networkType" : 1,
"drPriority" : 100,
"cost" : 100,
"helloInterval" : 100,
"deadInterval" : 100,
"bfd" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1763


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"enable" : false,
"detectMultiplier" : 3,
"minTxinterval" : 10,
"minRxinterval" : 10
},
"auth" : {
"mode" : 1,
"passwordText" : "passwordText",
"keyId" : 1
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.7 Query the OSPF Neighbor List

Typical Scenarios
OSPF neighbor information needs to be queried.

Functions
Query the OSPF neighbor list by the OSPF network process ID, VRF name,
interface name, or IP address family.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1764


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/ospf/peers

Table 1-1398 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

proces No string 0 to - OSPF process -


sId 256 ID, which can
charac be used as a
ters. query
condition.

ospfPr No int64 [1-429 - ID of an OSPF -


ocessId 49672 process on the
95] forwarding
plane, which
can be used as
a query
condition.

vrfNa No string 0 to 36 - VRF name, "vrfName1"


me charac which can be
ters. used as a
query
condition.

ifNam No string 0 to - Interface "ifName1"


e 255 name, which
charac can be used as
ters. a query
condition with
a VRF name.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1765


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

ipFami No int32 [1-2] - IP address -


ly family, which
can be used as
a query
condition with
a process ID.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ospf/peers?
pageIndex=1&pageSize=1&vrfName=vrfName1&ifName=ifName1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1399 OspfPeerPagedDtoWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

peer ARRAY For details, see Table "" -


_REFER 1-1400.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of queried
OSPF
processes.

pageIn int32 [1-4000] - Page index. 10


dex

pageSi int32 [1-4000] - Page size. 10


ze

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1766


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1400 PeerDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - OSPF neighbor "DBB702C3-77


characters. ID, which 19-4FE6-
cannot be A5AD-3A9C9E2
updated. 65309"

proces string 0 to 256 - OSPF network "DBB702C3-77


sId characters. process ID, 19-4FE6-
which cannot A5AD-3A9C9E2
be updated. 65309"

ipFami int32 [1-2] - 1: IPv4 OSPF 1


ly neighbor. 2:
IPv6 OSPFv3
neighbor.

sourceI int32 - - OSPF source 1


fType interface type.
1: Gateway. 2:
Loopback
interface. 3.
Interconnection
interface. This
parameter
cannot be
updated.

sourceI string 0 to 256 - OSPF session "DBB702C3-77


fId characters. source 19-4FE6-
interface, A5AD-3A9C9E2
which is a 65309"
logical switch
ID,
interconnection
interface ID, or
loopback
interface ID.
This parameter
cannot be
updated.

areaId string 0 to 255 - OSPF area ID. "192.168.2.2"


characters. The default
value is 0.0.0.0.

networ int32 - - Network type. 1


kType 1: Broadcast. 2:
P2P.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1767


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

drPrior int32 [0-255] 1 Priority of the 100


ity interface that
participates in
the DR and
BDR election.

cost int32 [1-65535] - To set the cost 100


of an interface.

helloIn int32 [1-65535] - Interval for 100


terval sending Hello
packets on an
interface, in
seconds.

deadIn int32 [1-235926000] - Dead interval 100


terval of an OSPF
neighbor, in
seconds.

bfd REFER For details, see Table "" -


ENCE 1-1401.

auth REFER For details, see Table "" -


ENCE 1-1402.

Table 1-1401 BfdDto parameters


Param Type Value Range Defaul Description Example
eter t Value

enable boolea - false Whether to false


n enable
dynamic BFD.

detect int32 [3-50] 3 Detection 3


Multipl multiplier. The
ier default value is
3. This
parameter can
be updated.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1768


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

minTxi int32 [3-20000] 10 Minimum 10


nterval transmit
interval, in
milliseconds.
The default
value is 10.
This parameter
can be
updated.

minRxi int32 [3-20000] 10 Minimum 10


nterval receive interval,
in milliseconds.
The default
value is 10.
This parameter
can be
updated.

Table 1-1402 IfAuthDto parameters


Param Type Value Range Defaul Description Example
eter t Value

mode int32 - - Authentication 1


mode. 1: None.
2: Simple. 3:
HMAC-
SHA256.

passw string 1 to 255 - This field may "passwordText"


ordTex characters. contain
t sensitive or
personal data.
Keep it secure.
Password
character
string.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1769


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

keyId int32 [0-255] - Authentication 1


key ID of the
interface's
cipher
authentication.
The key ID
must be
consistent with
that of the
peer.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"peer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"processId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipFamily" : 1,
"sourceIfType" : 1,
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"areaId" : "192.168.2.2",
"networkType" : 1,
"drPriority" : 100,
"cost" : 100,
"helloInterval" : 100,
"deadInterval" : 100,
"bfd" : {
"enable" : false,
"detectMultiplier" : 3,
"minTxinterval" : 10,
"minRxinterval" : 10
},
"auth" : {
"mode" : 1,
"passwordText" : "passwordText",
"keyId" : 1
}
}
],
"totalNum" : 200,
"pageIndex" : 10,
"pageSize" : 10
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1770


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.8 Query OSPF Neighbor Information

Typical Scenarios
OSPF neighbor information needs to be queried.

Functions
Query OSPF neighbor information.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/ospf/peers/peer/{id}

Table 1-1403 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ospf/peers/peer/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1771


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1404 OspfPeerDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

peer ARRAY For details, see Table "" -


_REFER 1-1400.
ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"peer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"processId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipFamily" : 1,
"sourceIfType" : 1,
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"areaId" : "192.168.2.2",
"networkType" : 1,
"drPriority" : 100,
"cost" : 100,
"helloInterval" : 100,
"deadInterval" : 100,
"bfd" : {
"enable" : false,
"detectMultiplier" : 3,
"minTxinterval" : 10,
"minRxinterval" : 10
},
"auth" : {
"mode" : 1,
"passwordText" : "passwordText",
"keyId" : 1
}
}
]
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1772


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.9 Update OSPF Neighbor Information

Typical Scenarios
OSPF neighbor information needs to be updated.

Functions
Update OSPF neighbor information by ID. An OSPF neighbor can be updated only
when no services reference it.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/ospf/peers/peer/{id}

Table 1-1405 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - ID of the OSPF "DBB702C3-77


256 neighbor to be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1773


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1406 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1394. paramete
r model
class for
updating
an OSPF
neighbor.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/ospf/peers/peer/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"peer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"processId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipFamily" : 1,
"sourceIfType" : 1,
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"areaId" : "192.168.2.2",
"networkType" : 1,
"drPriority" : 100,
"cost" : 100,
"helloInterval" : 100,
"deadInterval" : 100,
"bfd" : {
"enable" : false,
"detectMultiplier" : 3,
"minTxinterval" : 10,
"minRxinterval" : 10
},
"auth" : {
"mode" : 1,
"passwordText" : "passwordText",
"keyId" : 1
}
}
]
}

Response Parameters
Response status code 200: successfully
OspfPeerDtoWrapper parameters, For details, see Table 1-1404.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1774


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"peer" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"processId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"ipFamily" : 1,
"sourceIfType" : 1,
"sourceIfId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"areaId" : "192.168.2.2",
"networkType" : 1,
"drPriority" : 100,
"cost" : 100,
"helloInterval" : 100,
"deadInterval" : 100,
"bfd" : {
"enable" : false,
"detectMultiplier" : 3,
"minTxinterval" : 10,
"minRxinterval" : 10
},
"auth" : {
"mode" : 1,
"passwordText" : "passwordText",
"keyId" : 1
}
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.10 Delete OSPF Neighbor Information

Typical Scenarios
An OSPF neighbor needs to be deleted by ID.

Functions
Delete an OSPF neighbor by ID. An OSPF neighbor can be deleted only when no
services reference it.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1775


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/ospf/peers/peer/{id}

Table 1-1407 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes string 0 to - OSPF neighbor "DBB702C3-77


256 ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
DELETE /controller/dc/v3/logicnetwork/ospf/peers/peer/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1776


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.24.11 Query OSPF Neighbor States

Typical Scenarios
OSPF neighbor states need to be queried.

Functions
Query OSPF neighbor states on a device. If a logical switch is used as a neighbor
interface, the logical switch may be connected to multiple devices. In this case, the
interface will return the neighbor states of multiple devices simultaneously.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/ospf/peers/peer/{id}/running

Table 1-1408 path parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - ID used for the "DBB702C3-77


256 query. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1777


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/ospf/peers/peer/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/running
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1409 OspfPeerRunningDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

runnin ARRAY For details, see Table OSPF neighbor -


g _REFER 1-1410. states list.
ENCE

Table 1-1410 DevicePeerRunningDto parameters


Param Type Value Range Defaul Description Example
eter t Value

deviceI string 0 to 256 - Device ID. "DBB702C3-77


d characters. 19-4FE6-
A5AD-3A9C9E2
65309"

status string 0 to 255 - Neighbor "1"


characters. status. 0:
Down. 1: Init.
2: Attempt. 3:
2-Way. 4:
ExStart. 5:
Exchange. 6:
Loading. 7:
Full.

peerIp string 0 to 255 - Peer IP "1"


characters. address.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1778


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"running" : [
{
"deviceId" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"status" : "1",
"peerIp" : "1"
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25 VPC Routing Whitelist


Routing whitelist API description:

1. Create a routing whitelist.

2. Query routing whitelist information by ID.

3. Update routing whitelist information by ID.

4. Delete routing whitelist information by ID.

Interface SLA: (special design for special interfaces)

SLAs for query interfaces

Request success rate: ≥ 99%

Availability: Tier 1

Data consistency: Strong consistency

Throughput: 200 TPS

TP50 request delay: 50 ms

TP99.9 request delay: 100 ms

1.9.7.25.1 Query Routing Whitelist Information by Router ID

Typical Scenarios
Routing whitelist information needs to be queried by router ID.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1779


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query routing whitelist information by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}

Table 1-1411 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 0 to - Routing "DBB702C3-77


255 whitelist ID. 19-4FE6-
charac A5AD-3A9C9E2
ters. 65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1780


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1412 RouteWhiteListWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

extern REFER For details, see Table Whitelist -


al_whit ENCE 1-1413. parameter.
elist

Table 1-1413 WhiteListDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

id uuid - - uuid "00000000-000


0-0000-1234-0
00000000002"

router_ uuid - - uuid "00000000-000


id 0-0000-1234-0
00000000002"

routes array< 0-500 items. - Route IP ["192.168.1.0/2


string> Each item has 0 address. 4"]
to 50
characters.

subnet array< 0-500 items. - Subnet ID. ["00000000-00


s string> Each item has 0 00-0000-1234-
to 36 000000000003
characters. "]

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1781


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.2 Update Routes in the Whitelist

Typical Scenarios
A routing whitelist needs to be queried.

Functions
Query a routing whitelist.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}

Table 1-1414 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - ID used for the "DBB702C3-77


charac query. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1782


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1415 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

WhiteL Yes REFER For details, see Routing policy -


istDto ENCE Table 1-1416. entity to be
Wrapp updated.
er

Table 1-1416 RouteWhiteListWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern Yes REFER For details, see Whitelist -


al_whit ENCE Table 1-1417. parameter.
elist

Table 1-1417 WhiteListDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No uuid - - uuid "00000000-000


0-0000-1234-0
00000000002"

router_ Yes uuid - - uuid "00000000-000


id 0-0000-1234-0
00000000002"

routes Yes array< 0-500 - Route IP ["192.168.1.0/2


string> items. address. 4"]
Each
item
has 0
to 50
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1783


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

subnet Yes array< 0-500 - Subnet ID. ["00000000-00


s string> items. 00-0000-1234-
Each 000000000003
item "]
has 0
to 36
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309 HTTP/
1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response Parameters
Response status code 204: successfully
RouteWhiteListWrapper parameters, For details, see Table 1-1412.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1784


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.3 Delete routing whitelist information by routing whitelist ID.

Typical Scenarios
Delete Routes in the Whitelist.

Functions
Delete routing whitelist information by routing whitelist ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
DELETE

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}

Table 1-1418 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Routing "DBB702C3-77


charac whitelist ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters
N/A

Sample Request
HTTP

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1785


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

DELETE /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309
HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.4 Create a Routing Whitelist

Typical Scenarios
A routing whitelist needs to be created.

Functions
Create a routing whitelist.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
POST

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1786


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

URI
/controller/dc/v3/logicnetwork/external_whitelists

Request Parameters

Table 1-1419 body parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

route Yes REFER For details, see Parameters for -


WhiteL ENCE Table 1-1416. creating a
istWra subnet.
pper

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/external_whitelists HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1787


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 400 Bad Request


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.5 Query Routing Whitelist Information by Condition

Typical Scenarios
Routing whitelists need to be queried.

Functions
Query routing whitelist information by router ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/external_whitelists

Table 1-1420 query parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

router_ No UUID 1 to 36 - Router ID. "DBB702C3-77


id charac 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/external_whitelists?router_id=DBB702C3-7719-4FE6-
A5AD-3A9C9E265309 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1788


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Response Parameters
Response status code 200: successfully

Table 1-1421 RouteWhiteListsWrapper parameters

Param Type Value Range Defaul Description Example


eter t Value

extern ARRAY 0-255 items. For details, Whitelist -


al_whit _REFER see Table 1-1413. parameter.
elists ENCE

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 200: successfully
HTTP/1.1 200 OK
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelists" : [
{
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
]
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.6 Add Subnets to a Whitelist

Typical Scenarios
Add Subnets to a Whitelist.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1789


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Add subnets to a whitelist by subnet ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}/add_subnets

Table 1-1422 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Routing "DBB702C3-77


charac whitelist ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters

Table 1-1423 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1424. paramete
r model
class for
adding
subnets
to a
whitelist.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1790


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1424 SubnetIdsDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern Yes REFER For details, see - -


al_whit ENCE Table 1-1425.
elist

Table 1-1425 external_whitelist parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

subnet Yes array< 0-500 - Subnet ID. ["00000000-00


s string> items. 00-0000-1234-
Each 000000000003
item "]
has 0
to 36
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/
add_subnets HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external_whitelist" : {
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response Parameters
Response status code 204: successfully
RouteWhiteListWrapper parameters, For details, see Table 1-1412.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1791


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP/1.1 204 No Content


Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.7 Delete subnets from a whitelist by subnet ID.

Typical Scenarios
Remove Subnets from a Whitelist.

Functions
Delete subnets from a whitelist by subnet ID.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}/remove_subnets

Table 1-1426 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Routing "DBB702C3-77


charac whitelist ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1792


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1427 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Input -


NCE 1-1424. paramete
r model
class for
deleting
subnets
from a
whitelist.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/
remove_subnets HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external_whitelist" : {
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response Parameters
Response status code 204: successfully
RouteWhiteListWrapper parameters, For details, see Table 1-1412.
Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1793


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.8 Add routes to a whitelist by route ID.

Typical Scenarios
Add routes to a whitelist by route ID.

Functions
Add routes to a whitelist by route.

Constraints
User role: northbound operator.
Concurrency specification: ≤ 25 times/minute.

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}/add_routes

Table 1-1428 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Routing "DBB702C3-77


charac whitelist ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1794


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Request Parameters

Table 1-1429 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Model -


NCE 1-1430. class for
adding
routes to
a
whitelist.

Table 1-1430 RoutesDtoWrapper parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

extern Yes REFER For details, see - -


al_whit ENCE Table 1-1431.
elist

Table 1-1431 external_whitelist parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

routes Yes array< 0-500 - Route IP ["192.168.1.0/2


string> items. address. 4"]
Each
item
has 0
to 50
charac
ters.

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/
add_routes HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external_whitelist" : {

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1795


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"routes" : ["192.168.1.0/24"]
}
}

Response Parameters
Response status code 204: successfully

RouteWhiteListWrapper parameters, For details, see Table 1-1412.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.25.9 Delete Specified Routing Whitelist Information

Typical Scenarios
Delete Specified Routing Whitelist Information.

Functions
Delete specified routing whitelist information by routing whitelist ID.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 25 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1796


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
PUT

URI
/controller/dc/v3/logicnetwork/external_whitelists/{id}/remove_routes

Table 1-1432 path parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id Yes UUID 1 to 36 - Routing "DBB702C3-77


charac whitelist ID. 19-4FE6-
ters. A5AD-3A9C9E2
65309"

Request Parameters

Table 1-1433 body parameters


Paramet Type Value Default Descripti Example
er Range Value on

input REFERE For details, see Table Model -


NCE 1-1430. class for
deleting
routes
from a
whitelist

Sample Request
HTTP
PUT /controller/dc/v3/logicnetwork/external_whitelists/DBB702C3-7719-4FE6-A5AD-3A9C9E265309/
remove_routes HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"external_whitelist" : {
"routes" : ["192.168.1.0/24"]
}
}

Response Parameters
Response status code 204: successfully

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1797


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

RouteWhiteListWrapper parameters, For details, see Table 1-1412.

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive
{
"external_whitelist" : {
"id" : "00000000-0000-0000-1234-000000000002",
"router_id" : "00000000-0000-0000-1234-000000000002",
"routes" : ["192.168.1.0/24"],
"subnets" : ["00000000-0000-0000-1234-000000000003"]
}
}

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.26 Routing Policy Management


Routing policy APIs:

1. Add, delete, modify, and query routing policies.

1.9.7.26.1 Create a Routing Policy

Typical Scenarios
A routing policy needs to be created.

Functions
Create a routing policy globally or in a tenant view. By default, a routing policy
created in a tenant view is visible to the tenant.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1798


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

HTTP Method
POST

URI
/controller/dc/v3/logicnetwork/rtps

Request Parameters

Table 1-1434 body parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

rtp Yes REFER For details, see Input -


ENCE Table 1-1435. parameter
model class for
creating a
routing policy.

Table 1-1435 RtpDtoWrapper parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

rtp Yes ARRAY For details, see RTP -


_REFER Table 1-1436. information.
ENCE

Table 1-1436 RtpDto parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

id Yes string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

name No string 1 to - Name of a "bfd1"


200 routing policy
charac configured on
ters. a forwarding
device, which
cannot be
updated after
being
referenced.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1799


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

deploy No string 0 to - Alias of the "bfd1"


Policy 200 routing policy
Name charac configured on
ters. the forwarding
device. The
alias cannot be
changed after
the routing
policy is
referenced.

descrip No string 0 to - Description. "This is for


tion 255 This field can tenant1."
charac be updated.
ters.

rtpTyp Yes string ● best - Policy type, "general"


e Effo which cannot
rtPa be updated.
th
● nfvi
Exp
ort
● dci
● gen
eral

ipVersi No string 1 to 64 - IP version, "ipv4"


on charac which cannot
ters. be updated.

related No array< Each - Associated ["DBB702C3-7


Extern string> item external 719-4FE6-
alGate has 0 gateway ID. A5AD-3A9C9E2
wayIds to 50 65309"]
charac
ters.

device No array< Each - Device group ["DBB702C3-7


GroupI string> item ID. This 719-4FE6-
ds has 0 parameter is A5AD-3A9C9E2
to 50 valid only 65309"]
charac when the
ters. policy type is
set to common
policy. The
value cannot
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1800


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

device No array< Each - Device group ["deviceGroup


Group string> item name. This Name"]
Names has 0 parameter is
to 50 valid only
charac when the
ters. policy type is
set to common
policy. The
value cannot
be changed.

ipPrefi No array< - - IP prefix. This ["192.168.1.0/2


xes string> parameter is 4"]
valid only
when the
policy type is
set to Telco
Cloud Egress
Routing Policy.

dciRou No ARRAY For details, see DCI policy set. -


tePolic _REFER Table 1-1437. This parameter
y ENCE is valid only
when the
policy type is
DCI.

thirdPa No boolea - false Valid when the false


rtyEna n DCI routing
ble policy is
configured. If
this function is
enabled, the
DCI gateway
advertises
inclusive Type
3 routes
together with
IRB host
routes.

merge No boolea - false Whether to false


n incrementally
update the
node of the
routing policy.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1801


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

rtpNod No ARRAY For details, see DCI policy type, -


e _REFER Table 1-1438. which can be
ENCE DciImport,
DciExport, or
DciDyeing. The
value cannot
be changed.

additio No REFER For details, see Additional -


nal ENCE Table 1-1450. information.

Table 1-1437 DciRoutePolicyDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

id No string 0 to - Object ID. This "DBB702C3-77


256 field cannot be 19-4FE6-
charac updated. A5AD-3A9C9E2
ters. 65309"

name Yes string 1 to - Name of a "bfd1"


200 routing policy
charac configured on
ters. a forwarding
device, which
cannot be
updated after
being
referenced.

dciTyp No string 1 to 64 - DCI policy type, "DciImport"


e charac which can be
ters. DciImport,
DciExport, or
DciDyeing. The
value cannot
be changed.

startN No int32 [1-200 101 Start node ID 101


odeId 00] of the export
routing policy
applied by an
L3DCI service.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1802


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1438 RtpNodeDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

index Yes int32 [0-655 - Routing policy 1


35] node, which
cannot be
updated.

mode No int32 - - Whether to 1


deliver the
goto next-node
command.

gotoN No boolea - false Whether to false


extNod n deliver the
e goto next-node
command.

match No REFER For details, see Match -


ENCE Table 1-1439. information.

action No REFER For details, see Action -


ENCE Table 1-1444. Information.

Table 1-1439 MatchDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

ipPrefi No ARRAY For details, see IP prefix -


x _REFER Table 1-1440. information.
ENCE

tag No int64 [1-429 - Route tag, 82345


49672 which cannot
95] be updated.

comm No ARRAY For details, see Community -


unity _REFER Table 1-1441. information.
ENCE

extCo No ARRAY For details, see ExtCommunity -


mmuni _REFER Table 1-1442. information.
ty ENCE

asPath No ARRAY For details, see AS_Path -


_REFER Table 1-1443. information.
ENCE

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1803


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

l2vni No array<i 0-4000 - VNI IDs -


nteger items.
> Item
value
range:
[1-160
00000]

l3vni No array<i 0-4000 - VNI IDs -


nteger items.
> Item
value
range:
[1-160
00000]

routeT No array<i 1-16 - Route type. 1: -


ype nteger items. EVPN inclusive.
> Item 2: EVPN MAC.
value 3: EVPN prefix.
range:
[1-3]

Table 1-1440 IpPrefixDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

index Yes int64 [1-429 - IP prefix. 10


49672
95]

mode No int32 - 1 Node type. 1: 1


Permit. 2:
Deny. This
parameter
cannot be
updated.

prefix No string 1 to - IP prefix. "10.10.10.0/24"


255
charac
ters.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1804


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

match No boolea - false Whether a false


Netwo n network
rk address for
matching is
specified. This
parameter
cannot be
updated.

maskL No int32 [0-128 - Minimum 1


engthL ] subnet mask
ower length for
matching. This
parameter
cannot be
updated.

maskL No int32 [0-128 - Maximum 1


ength ] subnet mask
Upper length for
matching. This
parameter
cannot be
updated.

Table 1-1441 CommunityDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

index Yes int64 [1-429 - Extended 10


49672 community
95] attributes.

mode No int32 - 1 Node type. 1: 1


Permit. 2:
Deny. This
parameter
cannot be
updated.

value No array<i 0-255 - Community -


nteger items. attributes.
>

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1805


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1442 ExtCommunityDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

index Yes int64 [1-429 - SN, which 10


49672 cannot be
95] updated.

mode No int32 - 1 Node type. 1: 1


Permit. 2:
Deny. This
parameter
cannot be
updated.

rtValue No array< 0-255 - Extended -


string> items. community
attributes.

Table 1-1443 AsPathDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

index Yes int64 [1-429 - SN, which 10


49672 cannot be
95] updated.

mode No int32 - 1 Node type. 1: 1


Permit. 2:
Deny. This
parameter
cannot be
updated.

regular No string 1 to - AS path "_30_"


Expres 1024 regular
sion charac expression.
ters.

Table 1-1444 ActionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

applyC No REFER For details, see ApplyCommuni -


ommu ENCE Table 1-1445. ty information.
nity

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1806


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Mand Type Value Defaul Description Example


eter atory Range t Value

applyA No REFER For details, see ApplyAsPath -


sPath ENCE Table 1-1446. information.

applyC No REFER For details, see ApplyCost -


ost ENCE Table 1-1447. information.

applyL No REFER For details, see ApplyLocalpref -


ocalPre ENCE Table 1-1448. erence
ference information.

applyP No REFER For details, see ApplyPreferenc -


referen ENCE Table 1-1449. e information.
ce

applyG No boolea - false Whether to set false


ateway n the router's
Origin next-hop
Nextho address as the
p gateway IP
address for the
EVPN route.

Table 1-1445 ApplyCommunityDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

comm Yes array< 0-4 - Community -


unity string> items. attributes.
Each
item
has 0
to 255
charac
ters.

additiv No boolea - false Whether to false


e n add
community
attributes.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1807


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1446 ApplyAsPathDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

operati Yes int32 - 1 1: override 2: 1


on increase 3:
delete special
4: delete all.

asNum No array<i 0-64 - AS number. -


ber nteger items.
>

Table 1-1447 ApplyCostDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

operati Yes int32 - 1 1: override 2: 1


on increase 3:
delete special
4: delete all.

cost No int64 [0-429 - Protocol 10


49672 priority of a
95] route.

Table 1-1448 ApplyLocalpreferenceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

value Yes int64 [0-429 - Route cost. 10


49672
95]

Table 1-1449 ApplyPreferenceDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

value Yes int32 [1-255 - Protocol 10


] priority of a
route.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1808


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1450 AdditionDto parameters


Param Mand Type Value Defaul Description Example
eter atory Range t Value

produc No string 0 to 36 - Producer. This "10"


er charac parameter is
ters. optional. If it is
specified by the
user, the
specified value
is used. The
character string
starting with
component is
reserved. If no
value is
specified, the
default value
default is used.

create No string 0 to - Creation time. "2016-03-08T2


At 255 0:19:41.000+00:
charac 00"
ters.

update No string 0 to - Update time. "2016-03-08T2


At 255 0:19:41.000+00:
charac 00"
ters.

Sample Request
HTTP
POST /controller/dc/v3/logicnetwork/rtps HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan
{
"rtp" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",
"name" : "bfd1",
"deployPolicyName" : "bfd1",
"description" : "This is for tenant1.",
"rtpType" : "general",
"ipVersion" : "ipv4",
"relatedExternalGatewayIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"deviceGroupIds" : ["DBB702C3-7719-4FE6-A5AD-3A9C9E265309"],
"deviceGroupNames" : ["deviceGroupName"],
"ipPrefixes" : ["192.168.1.0/24"],
"dciRoutePolicy" : [
{
"id" : "DBB702C3-7719-4FE6-A5AD-3A9C9E265309",

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1809


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"name" : "bfd1",
"dciType" : "DciImport",
"startNodeId" : 101
}
],
"thirdPartyEnable" : false,
"merge" : false,
"rtpNode" : [
{
"index" : 1,
"mode" : 1,
"gotoNextNode" : false,
"match" : {
"ipPrefix" : [
{
"index" : 10,
"mode" : 1,
"prefix" : "10.10.10.0/24",
"matchNetwork" : false,
"maskLengthLower" : 1,
"maskLengthUpper" : 1
}
],
"tag" : 82345,
"community" : [
{
"index" : 10,
"mode" : 1,
"value" : [
100
]
}
],
"extCommunity" : [
{
"index" : 10,
"mode" : 1,
"rtValue" : [
"100:1"
]
}
],
"asPath" : [
{
"index" : 10,
"mode" : 1,
"regularExpression" : "_30_"
}
],
"l2vni" : [
"100"
],
"l3vni" : [
"100"
],
"routeType" : [
"1"
]
},
"action" : {
"applyCommunity" : {
"community" : [
"100:1"
],
"additive" : false
},
"applyAsPath" : {
"operation" : 1,
"asNumber" : [

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1810


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

"10"
]
},
"applyCost" : {
"operation" : 1,
"cost" : 10
},
"applyLocalPreference" : {
"value" : 10
},
"applyPreference" : {
"value" : 10
},
"applyGatewayOriginNexthop" : false
}
}
],
"additional" : {
"producer" : "10",
"createAt" : "2016-03-08T20:19:41.000+00:00",
"updateAt" : "2016-03-08T20:19:41.000+00:00"
}
}
]
}

Response Parameters
Response status code 204: successfully

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.

For details, see the response message body.

Sample Response
Response status code 204: successfully
HTTP/1.1 204 No Content
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

Response status code 400: Response status code 400: Bad request. For example,
the parameter type or value range is incorrect.
HTTP/1.1 400 Bad Request
Date: Thu,28 Apr 2022 10:00:00 GMT
Server: example-server
Content-Type: application/json;charset=UTF-8
Content-Length: 250
Connection: keep-alive

1.9.7.26.2 Query the Routing Policy List

Typical Scenarios
Routing policy information needs to be queried.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1811


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Functions
Query the routing policy list by condition.

Constraints
User role: northbound operator.

Concurrency specification: ≤ 100 times/minute.

HTTP Method
GET

URI
/controller/dc/v3/logicnetwork/rtps

Table 1-1451 query parameters

Param Mand Type Value Defaul Description Example


eter atory Range t Value

pageIn No string 0 to - Page index. "1"


dex 255
charac
ters.

pageSi No string 0 to - Page size. "1"


ze 255
charac
ters.

produc No string 0 to 36 - Producer of a -


er charac routing policy.
ters.

Request Parameters
N/A

Sample Request
HTTP
GET /controller/dc/v3/logicnetwork/rtps?pageIndex=1&pageSize=1 HTTP/1.1
Host: 192.168.1.125:18002
Content-Type: application/json
Accept: application/json
Accept-Language: en-US
X-ACCESS-TOKEN: x-
rwld6ng9vy2rg96llg85sbdisbmrfw1gdfamaoepoahcaq2nliams8s8epapiofx2r5druhi5g7wmmjzc5btftlduo7w88
bybuqp7xmlup9htd5gpg4bmmrufvnt4aan

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1812


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Response Parameters
Response status code 200: successfully

Table 1-1452 RtpPagedDtoWrapper parameters


Param Type Value Range Defaul Description Example
eter t Value

rtp ARRAY For details, see Table RTP -


_REFER 1-1453. information.
ENCE

totalN int64 [1-2147483647 - Total number 200


um ] of routing
policies
queried.

pageIn int32 [1-4000] - Page index. 10


dex

pageSi int32 [1-4000] - Page size. 10


ze

Table 1-1453 RtpDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

name string 1 to 200 - Name of a "bfd1"


characters. routing policy
configured on
a forwarding
device, which
cannot be
updated after
being
referenced.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1813


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

deploy string 0 to 200 - Alias of the "bfd1"


Policy characters. routing policy
Name configured on
the forwarding
device. The
alias cannot be
changed after
the routing
policy is
referenced.

descrip string 0 to 255 - Description. "This is for


tion characters. This field can tenant1."
be updated.

rtpTyp string ● bestEffortPat - Policy type, "general"


e h which cannot
● nfviExport be updated.
● dci
● general

ipVersi string 1 to 64 - IP version, "ipv4"


on characters. which cannot
be updated.

related array< Each item has 0 - Associated ["DBB702C3-7


Extern string> to 50 external 719-4FE6-
alGate characters. gateway ID. A5AD-3A9C9E2
wayIds 65309"]

device array< Each item has 0 - Device group ["DBB702C3-7


GroupI string> to 50 ID. This 719-4FE6-
ds characters. parameter is A5AD-3A9C9E2
valid only 65309"]
when the
policy type is
set to common
policy. The
value cannot
be changed.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1814


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

device array< Each item has 0 - Device group ["deviceGroup


Group string> to 50 name. This Name"]
Names characters. parameter is
valid only
when the
policy type is
set to common
policy. The
value cannot
be changed.

ipPrefi array< - - IP prefix. This ["192.168.1.0/2


xes string> parameter is 4"]
valid only
when the
policy type is
set to Telco
Cloud Egress
Routing Policy.

dciRou ARRAY For details, see Table DCI policy set. -


tePolic _REFER 1-1454. This parameter
y ENCE is valid only
when the
policy type is
DCI.

thirdPa boolea - false Valid when the false


rtyEna n DCI routing
ble policy is
configured. If
this function is
enabled, the
DCI gateway
advertises
inclusive Type
3 routes
together with
IRB host
routes.

merge boolea - false Whether to false


n incrementally
update the
node of the
routing policy.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1815


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Param Type Value Range Defaul Description Example


eter t Value

rtpNod ARRAY For details, see Table DCI policy type, -


e _REFER 1-1455. which can be
ENCE DciImport,
DciExport, or
DciDyeing. The
value cannot
be changed.

additio REFER For details, see Table Additional -


nal ENCE 1-1467. information.

Table 1-1454 DciRoutePolicyDto parameters


Param Type Value Range Defaul Description Example
eter t Value

id string 0 to 256 - Object ID. This "DBB702C3-77


characters. field cannot be 19-4FE6-
updated. A5AD-3A9C9E2
65309"

name string 1 to 200 - Name of a "bfd1"


characters. routing policy
configured on
a forwarding
device, which
cannot be
updated after
being
referenced.

dciTyp string 1 to 64 - DCI policy type, "DciImport"


e characters. which can be
DciImport,
DciExport, or
DciDyeing. The
value cannot
be changed.

startN int32 [1-20000] 101 Start node ID 101


odeId of the export
routing policy
applied by an
L3DCI service.

Issue 01 (2022-04-29) Copyright © Huawei Technologies Co., Ltd. 1816


iMaster NCE-Fabric
API Development Guide 1 RESTFul API Reference

Table 1-1455 RtpNodeDto parameters


Param Type Value Range Defaul Description Example
eter t Value

index int32 [0-65535] - Routing policy 1


node, which
cannot be
updated.

mode int32 - - Whether to 1


deliver the
goto next-node
command.

gotoN boolea - false Whether to false


extNod n deliver the
e goto next-node
command.

match REFER For details, see Table Match -


ENCE 1-1456. information.

action REFER For details, see Table Action -


ENCE 1-1461. Information.

Table 1-1456 MatchDto parameters


Param Type Value Range Defaul Description Example
eter t Value

ipPrefi ARRAY For details, see Table IP prefix -


x _REFER 1-1457. information.
ENCE

tag int64 [1-4294967295 - Route tag, 82345


] which cannot
be updated.

comm ARRAY For details, see Table Community -


unity _REFER 1-1458. information.
ENCE

extCo ARRAY For details, see Table ExtCommunity -


mmuni _REFER 1-1459.

You might also like