# Create NameSpace CIM Operation

The `CreateNameSpace` method creates a new namespace in the Pegasus repository.

NameSpace Defines the root namespace where the __Namespace class is defined. (DO NOT CHANGE)

New NameSpace Name String that defines the namespace to be created.

## Return Request

If successful, the return value defines the object path of the new CIM Instance relative to the target Namespace (i.e. the Model Path as defined by the CIM specification), created by the CIM Server. It is returned in case one or more of the new keys of the Instance are allocated dynamically during the creation process rather than specified in the request. If unsuccessful, one of the following status codes MUST be returned by this method, where the first applicable error in the list (starting with the first element of the list, and working down) is the error returned. Any additional method-specific interpretation of the error in is given in parentheses.

- CIM_ERR_ACCESS_DENIED
- CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class of which this is to be a new Instance does not exist)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists)
- CIM_ERR_FAILED (some other unspecified error occurred)

## Additional Description of Fields

Create Namespace is not an intrinsic CIM operation today. In accordance with the current CIM operations over HTTP specification, the creation of namespaces is executed instances of the class __Namespace. This class is defined with a single property, the name property which is the key. Creation of an instance of of this class causes a new namespace to be defined. If the namespace already exists, the create namespace returns the error CIM_ERR_ALREADY_EXISTS.

NOTE: In the next version of CIM Operations over HTTP, the technique will be changed to allow for intrinsic methods that permit both creation an deletion of namespaces.

In the Pegasus implementaiton, namespace manipulation is managed through a special provider __Namespace that is registered for the __Namespace class and returns creates and deletes namespaces as well as returning instances of __Namespace corresponding to the current set of namespaces.

## C++ API

The following is the CIM operation that is used to create a new namespace.

        virtual void createInstance(
    		const String& nameSpace,
    		CIMInstance& newInstance) =

Demonstration Prepared by the OpenGroup Manageability Work Group Pegasus Development Team

See (http://www.opengroup.org/management) for more information on Pegasus

Last Modified Friday, June 29, 2001 04:56:44 PM Copyright @ The Open Group 2001