//
// Component Name: SysAdminTypes.idl
//
// Description:
// The SysAdminTypes file defines types and data
// structures that are used frequently throughout the
// development of system administration applications.
//
#ifndef SYSADMINTYPES_IDL
#define SYSADMINTYPES_IDL
#include <orb.idl>
#include <CosNaming.idl>
module SysAdminTypes {
typedef sequence <CORBA::InterfaceDef> InterfaceDefList;
typedef CosNaming::NameComponent LabelType;
struct ObjectLabel {
Object objref;
LabelType label;
};
struct LabelExpression {
string id_regex;
string kind_regex;
};
typedef sequence <ObjectLabel> ObjectLabelList;
// The Platform structure defines elements for information
// related to the hardware and operating system of a
// client machine. The elements represent the following
// information.
struct Platform {
string host_name;
string machine_hardware_name;
string operating_system_name;
string operating_system_version;
string operating_system_release;
};
};
#endif //SYSADMINTYPES_IDL
//
// Component Name: Identification.idl
//
// Description:
// This module defines the methods that implement an object's
// label, which is a name that uniquely identifies the object
// within an environment.
//
#ifndef IDENTIFICATION_IDL
#define IDENTIFICATION_IDL
#include <SysAdminTypes.idl>
module Identification {
interface Labeled {
SysAdminTypes::LabelType get_label();
void set_label (in SysAdminTypes::LabelType label);
};
};
#endif //IDENTIFICATION_IDL
//
// Component Name: ManagedSets.idl
//
// Description:
// The following interfaces provide the functionality
// for support of managed sets.
//
#ifndef MANAGEDSETS_IDL
#define MANAGEDSETS_IDL
#include <SysAdminTypes.idl>
#include <SysAdminExcept.idl>
#include <Identification.idl>
module ManagedSets {
//--------------------------------------------------------------------
//Forward references
//--------------------------------------------------------------------
interface Member;
interface SetIterator;
interface MemberIterator;
interface MemberLabelIterator;
interface Set;
interface FilteredSet;
//--------------------------------------------------------------------
//typedefs needed for the managed set interfaces
//--------------------------------------------------------------------
typedef sequence <Set> SetList;
typedef sequence <Member> MemberList;
typedef SysAdminTypes::ObjectLabel MemberLabel;
typedef SysAdminTypes::ObjectLabelList MemberLabelList;
interface Member : Identification::Labeled {
void add_backref (
in Set s
);
void get_backrefs (
in unsigned long how_many,
out SetList s_list,
out SetIterator iterator
);
void remove_backref (
in Set s
) raises (
SysAdminException::ExNotFound
);
}; // End Member interface
interface SetIterator {
boolean next_one (
out Set s
);
boolean next_n (
in unsigned long how_many,
out SetList s_list
);
void destroy();
}; // End SetIterator interface
interface MemberIterator {
boolean next_one (
out Member m
);
boolean next_n (
in unsigned long how_many,
out MemberList m_list
);
void destroy();
}; // End of MemberIterator
interface ObjectLabelIterator {
boolean next_one (
out ObjectLabel ol
);
boolean next_n (
in unsigned long how_many,
out ObjectLabelList ol_list
);
void destroy();
}; // End of ObjectLabelIterator
typedef ObjectLabelIterator MemberLabelIterator;
interface Set : Member {
unsigned long get_cardinality();
void add_object (
in boolean add_backref,
in Member m
) raises (
SysAdminException::ExNotUniqueLabel
);
void add_n_objects (
in MemberList m_list,
out MemberList not_added
);
void remove_object (
in boolean remove_backref,
in Member m
) raises (
SysAdminException::ExNotFound
);
void remove_n_objects (
in boolean remove_backref,
in MemberList m_list,
out MemberList not_removed
);
void get_members (
in unsigned long how_many,
out MemberList m_list,
out MemberIterator iterator
);
void intersection_members (
in unsigned long how_many,
in SetList s_list,
out MemberList m_list,
out MemberIterator iterator
) raises (
SysAdminException::ExInvalid
);
void union_members (
in unsigned long how_many,
in SetList s_list,
out MemberList m_list,
out MemberIterator iterator
) raises (
SysAdminException::ExInvalid
);
}; // End of Set interface
interface FilteredSet : Set {
void find_members (
in SysAdminTypes::InterfaceDefList interfaces,
in SysAdminTypes::LabelExpression regular_expression,
in unsigned long how_many,
out MemberLabelList ml_list,
out MemberLabelIterator iterator
) raises (
SysAdminException::ExNotFound
);
Member lookup_object (
in SysAdminTypes::LabelType label,
in SysAdminTypes::InterfaceDefList interfaces
) raises (
SysAdminException::ExNotFound
);
SysAdminTypes::ObjectLabelList lookup_labels (
in MemberList m_list
);
}; // End of FilteredSet interface
}; // End ManagedSets module
#endif //MANAGEDSETS_IDL
//
// Component Name: ManagedInstances.idl
//
// Description:
// The following interfaces provide the functionality
// for support of instances and instance managers.
//
#ifndef MANAGEDINSTANCES_IDL
#define MANAGEDINSTANCES_IDL
#include <SysAdminTypes.idl>
#include <SysAdminExcept.idl>
#include <SysAdminLifeCycle.idl>
#include <CosLifeCycle.idl>
#include <Policies.idl>
#include <ManagedSets.idl>
module ManagedInstances {
// Forward reference
interface Instance;
interface BasicInstanceManager;
interface InstanceManager;
interface Library;
interface Instance :
CosLifeCycle::LifeCycleObject,
ManagedSets::Member
{
BasicInstanceManager get_manager();
string get_type_name();
SysAdminLifeCycle::Location get_resource_location();
}; // End of Instance interface
interface Library :
CosLifeCycle::FactoryFinder,
CosLifeCycle::GenericFactory,
ManagedSets::FilteredSet
{
}; // End of Library interface
interface BasicInstanceManager :
CosLifeCycle::LifeCycleObject,
CosLifeCycle::GenericFactory,
ManagedSets::FilteredSet
{
CORBA::InterfaceDef get_instances_interface();
}; // End of BasicInstanceManager interface
interface InstanceManager :
BasicInstanceManager,
Policies::PolicyObjectAdmin
{
}; // End of InstanceManager interface
interface PolicyRegionsInstanceManager :
InstanceManager
{
}; // End of PolicyRegionsInstanceManager interface
}; // End ManagedInstances module
#endif // MANAGEDINSTANCES_IDL
//
// Component Name: PolicyRegions.idl
//
// Description:
// The following interfaces provide the functionality
// for support of policy regions.
//
#ifndef POLICYREGIONS_IDL
#define POLICYREGIONS_IDL
#include <SysAdminTypes.idl>
#include <SysAdminExcept.idl>
#include <SysAdminLifeCycle.idl>
#include <CosLifeCycle.idl>
#include <ManagedSets.idl>
#include <ManagedInstances.idl>
module PolicyRegions {
// forward references
interface PolicyRegion;
interface PolicyDrivenBase;
struct PolicyResult {
PolicyDrivenBase object_verified;
PolicyRegion containing_region;
Policies::ValidationPolicy validation_object_used;
boolean passed_policy;
string description;
};
typedef sequence<PolicyResult> PolicyResultList;
enum SelectionCriteria {
all,
with_initialization,
with_validation,
with_validation_enabled,
with_initialization_or_validation,
with_initialization_or_validation_enabled
};
typedef sequence<PolicyRegion> PolicyRegionList;
interface PolicyResultIterator {
boolean next_one (
out PolicyResult pr;
};
boolean next_n (
in unsigned long how_many,
out PolicyResultList pr_list;
};
void destroy();
}; // End PolicyResultIterator interface
interface PolicyDrivenBase : ManagedInstances::Instance {
SysAdminTypes::ObjectLabelList get_policy_region_info();
void move_to_policy_region (
in PolicyRegions::PolicyRegion pr_from,
in PolicyRegions::PolicyRegion pr_to
) raises (
SysAdminException::ExObjNotFound,
SysAdminException::ExNotFound,
SysAdminException::ExInvalid
);
void add_to_policy_region (
in PolicyRegions::PolicyRegion pr
) raises (
SysAdminException::ExNotFound,
SysAdminException::ExInvalid
);
void remove_from_policy_region (
in PolicyRegions::PolicyRegion pr
) raises (
SysAdminException::ExObjNotFound,
SysAdminException::ExInvalid
);
SysAdminTypes::ObjectLabelList list_enabled_validation_policies (
in PolicyRegionList policy_regions,
in CORBA::InterfaceDef interface_def,
in boolean include_nested
) raises (
SysAdminException::ExNotFound
);
SysAdminTypes::ObjectLabelList list_initialization_policies
(
in PolicyRegionList policy_regions,
in CORBA::InterfaceDef interface_def,
in boolean include_nested
) raises (
SysAdminException::ExNotFound
);
}; // End of PolicyDrivenBase interface
interface PolicyRegion :
PolicyDrivenBase,
ManagedSets::FilteredSet,
CosLifeCycle::GenericFactory
{
void add_instance_manager (
in ManagedInstances::InstanceManager im,
in Policies::InitializationPolicy initialization_policy,
in Policies::ValidationPolicy validation_policy
) raises (
SysAdminException::ExExists
);
void remove_instance_manager (
in ManagedInstances::InstanceManager im
) raises (
SysAdminException::ExObjNotFound,
SysAdminException::ExExists
);
void get_instance_manager_list (
in SelectionCriteria select
in unsigned long how_many;
out SysAdminTypes::ObjectLabelList ol_list;
out ManagedSets::ObjectLabelIterator iterator;
);
void set_initialization_policy (
in ManagedInstances::InstanceManager im,
in Policies::InitializationPolicy initialization_policy
) raises (
SysAdminException::ExObjNotFound
);
SysAdminTypes::ObjectLabel get_initialization_policy (
in ManagedInstances::InstanceManager im
) raises (
SysAdminException::ExObjNotFound
);
void set_validation_policy (
in ManagedInstances::InstanceManager im,
in Policies::ValidationPolicy validation_policy
) raises (
SysAdminException::ExObjNotFound
);
SysAdminTypes::ObjectLabel get_validation_policy (
in ManagedInstances::InstanceManager im
) raises (
SysAdminException::ExObjNotFound
);
void policy_validation (
in ManagedInstances::InstanceManager im,
in boolean enable
) raises (
SysAdminException::ExObjNotFound
);
boolean is_validation_enabled (
in ManagedInstances::InstanceManager im
) raises (
SysAdminException::ExObjNotFound
);
void verify_policy (
in ManagedSets::Set scope,
in boolean included_nested,
in unsigned long how_many,
out PolicyResultList pr_list,
out PolicyResultIterator iterator
);
PolicyResultList get_policy_failures (
in ManagedSets::Set scope,
in boolean include_nested
in unsigned long how_many,
out PolicyResultList pr_list,
out PolicyResultIterator iterator
);
SysAdminTypes::ObjectLabelList get_all_initialization_policies
(
in ManagedInstances::InstanceManager im
) raises (
SysAdminException::ExNotFound
);
SysAdminTypes::ObjectLabelList get_all_enabled_validation_policies (
in ManagedInstances::InstanceManager im
) raises (
SysAdminException::ExNotFound
);
}; // End of PolicyRegion interface
}; // End of PolicyRegions module
#endif // POLICYREGIONS_IDL
//
// Component Name: Policies.idl
//
// Description:
// The following interfaces provide the functionality
// for support of policy objects.
//
#ifndef POLICIES_IDL
#define POLICIES_IDL
#include <SysAdminTypes.idl>
#include <SysAdminExcept.idl>
#include <Identification.idl>
#include <CosLifeCycle.idl>
#include <ManagedSets.idl>
module Policies {
// forward references
interface PolicyObject;
interface PolicyObjectAdmin;
interface InitializationPolicy;
interface ValidationPolicy;
interface PolicyObjectAdmin
{
SysAdminTypes::ObjectLabelList get_initialization_policies();
InitializationPolicy get_default_initialization (
) raises (
SysAdminException::ExNotFound
);
SysAdminTypes::ObjectLabelList get_validation_policies();
ValidationPolicy get_default_validation (
) raises (
SysAdminException::ExNotFound
);
void add_initialization (
in InitializationPolicy initialization_policy
) raises (
SysAdminException::ExExists,
SysAdminException::ExInvalid
);
void set_default_initialization (
in InitializationPolicy initialization_policy
) raises (
SysAdminException::ExInvalid
);
void remove_initialization (
in InitializationPolicy initialization_policy
) raises (
SysAdminException::ExObjNotFound
);
void add_validation (
in ValidationPolicy validation_policy
) raises (
SysAdminException::ExExists,
SysAdminException::ExInvalid
);
void remove_validation (
in ValidationPolicy validation_policy
) raises (
SysAdminException::ExObjNotFound
);
void set_default_validation (
in ValidationPolicy validation_policy
) raises (
SysAdminException::ExInvalid
);
void add_pr_backref (
in PolicyRegion pr
);
void remove_pr_backref (
in PolicyRegion pr
) raises (
SysAdminException::ExNotFound
);
void get_pr_backrefs (
in unsigned long how_many,
out SetList s_list,
out SetIterator iterator
);
}; // End of PolicyObjectAdmin interface
// The PolicyObject interface defines the common
// requirements of policy objects
interface PolicyObject :
Identification::Labeled
{
string get_policy_driven_object_type();
CORBA::InterfaceDef get_policy_driven_object_interface();
}; // End of PolicyObject interface
// The InitializationPolicy interface defines the
// requirements of an initialization policy object
interface InitializationPolicy :
PolicyObject
{
void initialize_policy_driven_object (
in Object object_to_initialize,
in CosLifeCycle::Criteria override_criteria
);
}; // End of InitializationPolicy interface
// The ValidationPolicy interface defines the
// requirements of an validation policy object
interface ValidationPolicy :
PolicyObject
{
boolean validate_policy_driven_object (
in Object object_to_validate,
out string description
);
}; // End of ValidationPolicy interface
}; // End of Policies module
#endif // POLICIES_IDL
//
// Component Name: SysAdminExcept.idl
//
// Description:
// The SysAdminExcept module defines the exceptions
// commonly used by system management applications.
//
#ifndef SYSADMINEXCEPT_IDL
#define SYSADMINEXCEPT_IDL
#include <SysAdminTypes.idl>
typedef sequence<any> MsgContext;
#define XPG_FIELDS \
string type_name; \
string catalog; \
long key; \
string default_msg; \
long time_stamp; \
MsgContext msg_context;
module SysAdminException {
exception ExException {
XPG_FIELDS
};
exception ExFailed {
XPG_FIELDS
string operation_name;
};
exception ExInvalid {
XPG_FIELDS
string resource_name;
};
exception ExNotUniqueLabel {
XPG_FIELDS
SysAdminTypes::LabelType label;
};
exception ExNotFound {
XPG_FIELDS
string resource_name;
};
exception ExExists {
XPG_FIELDS
string resource_name;
};
exception ExObjNotFound {
XPG_FIELDS
string resource_name;
};
};
#endif //SYSADMINEXCEPT_IDL
//
// Component Name: SysAdminLifecycle.idl
//
//
// Description:
// The SysAdminLifeCycle module defines interfaces
// for specifying objects. Currently interfaces for copying and
// moving objects are not supported. These will be added as needed.
//
#ifndef SYSADMINLIFECYCLE_IDL
#define SYSADMINLIFECYCLE_IDL
#include <SysAdminTypes.idl>
module SysAdminLifeCycle {
// The Location interface allows the specification of
// the location for lifecycle operations to occur.
interface Location {
};
// the HostLocation interface allows the specification
// of a particular client machine on which the
// lifecycle operation should execute
interface HostLocation : Location {
SysAdminTypes::Platform get_platform();
};
};
#endif // SYSADMINLIFECYCLE_IDL
Contents | Next section | Index |