engine: Drop network_name and port_mirroring from vm_interface

The patch removes the columns network_name and port_mirroring
from vm_interface since this information should be retrieved
via the vnic profile.

Change-Id: Ib03c3b3a923cc79f69509258cd45c7457df78c7e
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Introduce VmNicDao

The VmNicDao will serve as the DAO api for persisting
VmNetworkInterface entities to the data base.
It replaces the former VmNetworkInterfaceDao which will
serve as a read-only DAO to retrieve a viewable entity
to the clients.

Change-Id: Ib3d1ff6dfc415915244367c153ffc064ddd0d0df
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Utilize VmNicRowMapper base for VmNetworkInterfaceDao

The patch performs the following:
1. Standardize VmNetworkInterfaceDao by proper inheritance
2. Utilize VmNicRowMapperBase for VmNetworkInterfaceDao mapper
3. Standardize stored-procedure names and organize vm network
   interface views.
4. Some cleanup.
5. Remove methods which can be invoked from VmNicDao
6. Fix stored procedure to consider vnic_profiles as the
   mediator between vm nic and network.

Change-Id: Iea17ab1f7b686c5674b33b353794456450719f8f
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Change pciAndIdeWithinLimit to accept VmNics

The patch is the first of a sequence of patches which will
move backend internal code working with VmNic rather than
the VmNetworkInterface.

Change-Id: Ib1782b92098c763e0626a5de6cdb6087f986ce94
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Change uniqueInterfaceName to work with VmNic

The patch modifies the signature of uniqueInterfaceName to
accept VmNic list and its callers.

Change-Id: I89dd8ddfbf3a3777b9ce54d1649b01fb111bceab
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Replace use of VmNetworkInterfaceDao with VmNicDao

The patch replaces usages of VmNetworkInterfaceDao.getAllForTemplate()
with VmNicDao.getAllForTemplate()

Change-Id: I134594317521482d62ce8cad0320ab66c0499db7
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Replace use of VmNetworkInterface with VmNic

The patch replaces internal backend usages of VmNetworkInterface
with VmNic where possible.

Change-Id: I27a8b4821450297622cd35c12943c714d2654bb2
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Add method for checking existence of network in cluster

The patch adds a method to check if a given network is assigned
to a given cluster. The method will be used in can-do-action
validation where the vnic profile set for a vnic should be
verified as a vnic of a network within the cluster of the vm or
of the template.

Change-Id: I95e6f23ebc17f2b06c06590d634e5fa113f23a29
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Modify Vm Interface commands to work with VmNic

The patch modifies the vnic commands to work with the VmNic
entity rather with the view entity VmNetworkInterface.

Change-Id: I92480426f2e1d49d19a1859d4ef1008699568402
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Modify VM commands to work with VmNic

The patch modify VM command to prefer using VmNic
type where possible instead of the viewable entity
VmNetworkInterface.

In addition, the Vnic Profile logic for Import Vm/Template
is added to replace the former network-driven behaviour.

Change-Id: I2a5130e1d594a642e18460aa85692d86b8870a52
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine Use VmNic within ChangeVMClusterCommand

The patch uses the VmNic backend internal entity for vnic
related actions, specifically for fetching the entity
from the database.

Change-Id: I864201b27d1572bf73a40d692ef3bb503a0f36ca
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Use VmNic within UpdateVmCommand

Replaces usages of VmNetworkInterface with VmNic where
possible.

Change-Id: Id8f84060667f97c613ea7ee2da65bb17478c52aa
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Use VmNic within VmPoolHandler

Replaces usages of VmNetworkInterface with VmNic where
possible.

Change-Id: I721c6e60a97417c6f1cdbc43e46fd9c07572da85
Signed-off-by: Moti Asayag <masayag@redhat.com>
webadmin: removing port mirroring and custom props from vnic dialog

Port mirroring and custom properties are now part of the profile and
not the vnic.

Change-Id: I4a597b7a99d5ca155f93d41bfe8148254f18e6cf
Signed-off-by: Alona Kaplan <alkaplan@redhat.com>
engine: Require VnicProfile permission for vnic template

The patch requires permission on the vnic profile which is
used for adding or updating a template vnic.

Change-Id: I745b4f8bf1b658c7160362a4d98aca017a377483
Signed-off-by: Moti Asayag <masayag@redhat.com>
webadmin: add profiles instead of networks to vnic and vm dialogs

The profiles will be displayed using ListModelTypeAheadListBoxEditor.

Change-Id: I00ea69609acf8a8bfeb0a5357489141f726b6323
Signed-off-by: Alona Kaplan <alkaplan@redhat.com>
engine: cleanup and remove usage of network name

The patch performs a minor cleanup to the parameter
class and modifies the command to refer to network
obtained via the network profile id and not by the
network name.

Change-Id: I033ad326d41d9c339b69b284514f1e19f54b6f5f
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Add more validations for vnic profiles

The patch adds validation for the custom properties value
set for a vnic profile and also verifies a profile which
belongs to an external network is not set for port mirroring.

Change-Id: I2217e0d3bb6ee74f5c208964e2e06c4ecf916ebf
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Add vnic profile name to VmNetworkInterface

The patch adds the vnic profile name to VmNetworkInterface
so clients can get information on the vnic profile without
querying the engine for that info.

Change-Id: Ie9d4a6676a7ad244ef32c6e0bc3eb5b6ed69da25
Signed-off-by: Moti Asayag <masayag@redhat.com>
engine: Adding VnicProfileName to exported OVF

The patch adds the vnic profile name for each vnic (vm or template).
The vnic profile name will be kept on OtherResourceType field.

Change-Id: Icec2002238f446503403b1ef936f26543d188bc2
Signed-off-by: Moti Asayag <masayag@redhat.com>