1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-23 17:33:56 +03:00
one/include/ProtocolMessages.h
Ruben S. Montero 865908de1c
F #5989: Live update of Virtual Network attributes
co-authored-by: Pavel Czerný <pczerny@opennebula.systems>
co-authored-by: Frederick Borges <fborges@opennebula.io>
co-authored-by: Christian González <cgonzalez@opennebula.io>

* VNET updates trigger a driver action on running VMs with NICs in the
  network.

* VNET includes a sets with VM status: updated, outdated, error and
  updating. With VMs in each state.

* VNET flags error situations with a new state UPDATE_FAILURE.

* The same procedure is applied when an AR is updated (only VMs in that
  AR are updated).

* A new options in the one.vn.recover API call enable to recover or
  retry this VM update operations.

* The following attributes can be live-updated per VNET driver:
    - PHYDEV (novlan, vlan, ovs driver)
    - MTU (vlan, ovs driver)
    - VLAN_ID (vlan, ovs driver)
    - QINQ_TYPE (ovs driver)
    - CVLANS (ovs driver)
    - VLAN_TAGGED_ID (ovs driver)
    - OUTER_VLAN_ID (ovs driver)
    - INBOUND_AVG_BW (SG, ovs driver + KVM)
    - INBOUND_PEAK_BW (SG, ovs driver + KVM)
    - INBOUND_PEAK_KB (SG, ovs driver + KVM)
    - OUTBOUND_AVG_BW (SG, ovs driver + KVM)
    - OUTBOUND_PEAK_BW (SG, ovs driver + KVM)
    - OUTBOUND_PEAK_KB (SG, ovs driver + KVM)

* New API call one.vm.updatenic, allows to update individual NICs
  without the need of detach/attach (only QoS supported).

* Update operations for: 802.1Q, bridge, fw, ovswitch, ovswitch_vxlan
  and vxlan network drivers.

* VNET attributes (old values) stored in VNET_UPDATE to allow
  implementation of update operations. The attribute is removed after a
  successful update.

* Updates to CLI onevnet (--retry option) / onevm (nicupdate command)

* XSD files updated to reflect the new data model

* Ruby and JAVA bindings updated: new VNET state and recover option, new
  VM API call.

* Suntone and Fireedge implementation (lease status, recover option, new
  states)

TODO: Virtual Functions does not support this functionality

iii
2022-11-16 15:06:49 +01:00

203 lines
4.2 KiB
C

/* -------------------------------------------------------------------------- */
/* Copyright 2002-2022, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); you may */
/* not use this file except in compliance with the License. You may obtain */
/* a copy of the License at */
/* */
/* http://www.apache.org/licenses/LICENSE-2.0 */
/* */
/* Unless required by applicable law or agreed to in writing, software */
/* distributed under the License is distributed on an "AS IS" BASIS, */
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
/* See the License for the specific language governing permissions and */
/* limitations under the License. */
/* -------------------------------------------------------------------------- */
#ifndef PROTOCOL_MESSAGES_H
#define PROTOCOL_MESSAGES_H
#include "Message.h"
/**
* Messages between the Monitor daemon and OpenNebula daemon
*/
enum class InformationManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
HOST_LIST,
UPDATE_HOST,
DEL_HOST,
START_MONITOR,
STOP_MONITOR,
HOST_STATE,
VM_STATE,
HOST_SYSTEM,
RAFT_STATUS,
ENUM_MAX
};
using im_msg_t = Message<InformationManagerMessages, true, true, false, false>;
/**
* Image Manager Driver messages
*/
enum class ImageManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
CP,
CLONE,
STAT,
MKFS,
RM,
MONITOR,
SNAP_DELETE,
SNAP_REVERT,
SNAP_FLATTEN,
RESTORE,
LOG,
ENUM_MAX
};
using image_msg_t = Message<ImageManagerMessages, false, false, false, false>;
/**
* Auth Manager Driver messages
*/
enum class AuthManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
AUTHORIZE,
AUTHENTICATE,
LOG,
ENUM_MAX
};
using auth_msg_t = Message<AuthManagerMessages, false, false, false, false>;
/**
* IPAM Manager Driver messages
*/
enum class IPAMManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
REGISTER_ADDRESS_RANGE,
UNREGISTER_ADDRESS_RANGE,
GET_ADDRESS,
ALLOCATE_ADDRESS,
FREE_ADDRESS,
VNET_CREATE,
VNET_DELETE,
LOG,
ENUM_MAX
};
using ipam_msg_t = Message<IPAMManagerMessages, false, false, false, false>;
/**
* MarketPlace Manager Driver messages
*/
enum class MarketPlaceManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
IMPORT,
DELETE,
MONITOR,
LOG,
ENUM_MAX
};
using market_msg_t = Message<MarketPlaceManagerMessages, false, false, false, false>;
/**
* Transfer Manager Driver messages
*/
enum class TransferManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
TRANSFER,
DRIVER_CANCEL,
LOG,
ENUM_MAX
};
using transfer_msg_t = Message<TransferManagerMessages, false, false, false, false>;
/**
* Virtual Machine Driver messages
*/
enum class VMManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
DEPLOY,
SHUTDOWN,
RESET,
REBOOT,
CANCEL,
CLEANUP,
CHECKPOINT,
SAVE,
RESTORE,
MIGRATE,
ATTACHDISK,
DETACHDISK,
ATTACHNIC,
DETACHNIC,
SNAPSHOTCREATE,
SNAPSHOTREVERT,
SNAPSHOTDELETE,
DISKSNAPSHOTCREATE,
DISKSNAPSHOTREVERT,
RESIZEDISK,
UPDATECONF,
UPDATESG,
DRIVER_CANCEL,
LOG,
RESIZE,
BACKUP,
UPDATENIC,
ENUM_MAX
};
using vm_msg_t = Message<VMManagerMessages, false, false, false, false>;
/**
* Virtual Machine Driver messages
*/
enum class HookManagerMessages : unsigned short int
{
UNDEFINED = 0,
INIT,
FINALIZE,
EXECUTE,
RETRY,
LOG,
ENUM_MAX
};
using hook_msg_t = Message<HookManagerMessages, false, false, false, false>;
#endif /*PROTOCOL_MESSAGES_H*/