Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Health Status Coverage Status Build Status

mgmtsystem

Introduction

mgmtsystem is a simple virtualization client with support (in varying degrees) for the following

  • Red Hat Enterprize Virtualization (RHEV)

  • Red Hat Openstack (RHOS)

  • Openshift

  • VMware vCenter

  • Microsoft SCVMM

  • Microsoft Azure

  • Google Compute Engine

  • Kubernetes

  • Hawkular

It can be used to control virtualization clients and offers operations such as

  • list_vm (returns a list of vm_names)

  • list_template (returns a list of templates/images)

  • start_vm (starts a vm)

  • stop_vm (stops a vm)

Though conceptually names differ between cloud and infrastructure virtualization technologies (e.g. instance/vm) it was decided to stick to one representation in the codebase and interface to give a singlar API across all systems.

Usage

Each management system is invoked usually with a hostname and some credentials

from mgmtsystem.virtualcenter import VMWareSystem

system = VMWareSystem(hostname='10.0.0.0', username="root", password="password")
system.list_vm()

Adding a new Management System

A management system should extend the Base class, and supply “Not Implemented” raises for items which it doesn’t support. This behaviour may change in the future as more and more diverse management systems.

from base import MgmtSystemAPIBase

class RHEVMSystem(MgmtSystemAPIBase):

  _stats_available = {
    'num_vm': lambda self: self.api.get_summary().get_vms().total,
    'num_host': lambda self: len(self.list_host()),
    'num_cluster': lambda self: len(self.list_cluster()),
    'num_template': lambda self: len(self.list_template()),
    'num_datastore': lambda self: len(self.list_datastore()),
  }

  def __init__(self, hostname, username, password, **kwargs):
    super(RHEVMSystem, self).__init__(kwargs)

The call to super is necessary to set up the logger if noe has not been passed in with the logger keyword.

The developer can then add their own methods to interact with their own management system. Commonly accessible statistics are generally all named the same across management systems. In this way we can treat multiple management systems the same and use an identical method to check the number of vms on a RHEV system, to a VMware system.

Exceptions currently sit in a single module, this will probably change later with each management system having it’s own package and exceptions stored there.

This module was originally developed for assisting in the ManageIQ testing team.

Contributing

The guidelines to follow for this project can be found in the cfme dev_guide.

Metadata

Release files for mgmtsystem 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mgmtsystem 1.6.1
File Size Uploaded
mgmtsystem-1.6.1.tar.gz 91.2 kB Details

Release files / mgmtsystem-1.6.1.tar.gz

Download URL mgmtsystem-1.6.1.tar.gz
Size 91.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8b2873e42d35733aefaef53ba9e1b29ae1f0ed0651a917744348e126707b5985
BLAKE2b-256 checksum
How to use checksums
c613edc9231be55340cc7981225565a0568af1a24cecd641453c0464cb03b1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.6.1 This release

1 release file

1.2.18

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page