1. A method for providing virtual network services, comprising: instantiating, in an operating system supporting software-programmed networking, a virtual network object that includes an identifier, properties, and internal methods for functionality encapsulated by the virtual network object, wherein the virtual network object represents a virtual network service provided to a user of the operating system, and wherein the virtual network service specifies virtual nodes and virtual links in a virtual network based on a physical network and the internal methods for functionality include operational functions for the virtual network object to perform network protection and restoration by monitoring and detecting network failures through an interface with the physical network and when a network failure is detected, executing a protection service pattern or a restoration service pattern for the physical network; enabling the user to communicate with the virtual network object using an application programming interface supported by the operating system; enabling the operating system to send control commands to the physical network to control physical network resources; and enabling, by an arbiter included in the operating system, network reoptimization of the physical network for a plurality of virtual network objects, wherein at least some of the physical network resources are reconfigured to new physical network resources, wherein a protection service pattern and a restoration service pattern is a mapping pattern that includes a virtual node-to-physical node mapping list, a virtual link-to-physical path mapping list, and node attributes, and wherein the protection service pattern specifies allocating dedicated or high-priority resources of the physical network to the protection service pattern and wherein the restoration service pattern specifies one or more restoration service patterns without allocating dedicated or high-priority resources of the physical network to the restoration service pattern.