wlm_delete_class Subroutine

Purpose

Deletes a class.

Library

Workload Manager Library (libwlm.a)

Syntax

#include <sys/wlm.h>

int wlm_delete_class ( wlmargs)

struct wlm_args *wlmargs;

Description

The wlm_delete_class subroutine deletes an existing superclass or subclass. A superclass cannot be deleted if it still has subclasses other than Default and Shared defined.

  • If the name of a valid configuration is passed in the confdir field, the subroutine updates the Workload Manager (WLM) properties files for the target configuration, removing all references to the class to be deleted.
  • If a null string ('\0') is passed in the confdir field, the class is deleted only from the in-core WLM data structures. No WLM properties file is updated. This is normally used to delete a class which was also only created in the in-core WLM data structures. Otherwise, the class deletion is temporary and the class will be created again when WLM is updated or restarted with a configuration where the class exists in the classes file.

The caller must have root authority to delete a superclass and must have administrator authority on a superclass to delete a subclass of the superclass.

Note: Do not specify a set in the confdir field of the wlm_args structure. The wlm_delete_class subroutine cannot apply to a set of time-based configurations.

Parameter

Item Description
wlmargs Specifies the address of the struct wlm_args data structure containing the information about the class to be deleted.

The following fields of the wlm_args structure and the embedded substructures need to be provided:

Item Description
versflags Needs to be initialized with WLM_VERSION.
confdir Specifies the name of the WLM configuration the target class belongs to. It must be either the name of a valid subdirectory of /etc/wlm or an empty string (starting with '\0').

If the name is a valid subdirectory, the relevant class description files in the specified configuration are modified.

If the name is a null string, no description files are updated. The class is removed from the kernel WLM data structures.

name Specifies the name of the superclass or of the subclass to be deleted. If this is a subclass name, it must be of the form super_name.sub_name. There is no default for this field.

All the other fields can be left uninitialized for this call.

Return Values

Upon successful completion, the wlm_delete_class subroutine returns a value of 0. If the wlm_delete_class subroutine is unsuccessful, a non-0 value is returned.

Error Codes

For a list of the possible error codes returned by the WLM API functions, see the description of the wlm.h header file.