1. A method implemented by a network controller for virtual network (VN) management, the method comprising: receiving a request via an application programming interface (API), wherein the request comprises program codes written in a declarative programming language, and wherein the program codes describe at least some aspects of a VN; and parsing the program codes into internal objects of the network controller, wherein the internal objects represent the aspects of the VN described by the program codes.