> For the complete documentation index, see [llms.txt](https://enhance-manageiq.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enhance-manageiq.gitbook.io/docs/chapter-4/domain-and-namespaces.md).

# Domain and Namespaces

## Domain

A domain is a collection of namespaces, classes, instances and methods. ManageIQ ship with single domain having name as *ManageIQ*. By default, it is in locked state which means it is read-only. ManageIQ allow users to override this by using custom domains with higher priority.

To explore Datastores present in ManageIQ, navigate to **Automation → Automate → Explorer**. When on the page, click on Datastores to get list of available domains in ManageIQ.

![Datastores](https://876731040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9tsFBW0V7B8qu0eAKh%2F-L9tsJFCB8lhrTrHzSaF%2F-L9tsK8ckd6UTbxTxOsZ%2Fdatastore.png?generation=1523536977909851\&alt=media)

Custom domain can be added by user (TigerIQ is user-added domain). User-added domains can be enabled or disabled. User can import and export domains, which we will see further.

### Domain Priority

Automation functions are executed on their order of priority. To change priority order of user-added domains, select Datastores and click **Configuration → Edit Priority order of Domains**. Then we get options to prioritize domains.

![Domain Priority](https://876731040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9tsFBW0V7B8qu0eAKh%2F-L9tsJFCB8lhrTrHzSaF%2F-L9tsK8y9NZPsqCVTfFf%2Fdomains-priority.png?generation=1523536977530806\&alt=media)

| Note | Make sure that domain is at highest priority to use it. |
| ---- | ------------------------------------------------------- |

### Exporting Domain

An automate domain can be exported into a directory or a zip file.

To export domain into directory, use the following command,

```
# rake evm:automate:export DOMAIN=<domain_name> EXPORT_DIR=<export_path>
```

To export domain into a zip file, use the following,

```
# rake evm:automate:export DOMAIN=<domain_name> ZIP_FILE=<file_name.zip>
```

| Tip | For this, import/export script is available. This can be installed on appliance following instructions on <https://github.com/rhtconsulting/cfme-rhconsulting-scripts> |
| --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### Importing Domain

It is possible to import domain into a new domain. Domain can be imported from a directory or from a zip file.

To import domain from a directory use the following,

```
rake evm:automate:import DOMAIN=<domain_name> IMPORT_DIR=<path> PREVIEW=false
```

To import domain from a zip file,

```
rake evm:automate:import DOMAIN=<domain_name> ZIP_FILE=<file.zip> PREVIEW=false
```

| Note | After importing domain, check whether it is enabled or not. Domain must be enabled to use it. |
| ---- | --------------------------------------------------------------------------------------------- |

Also we can import Datastore classes as zip file from manageIQ web portal itself. To do this, Go to **Automation → Automate → Import/Export**.

![Import Datastore](https://876731040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9tsFBW0V7B8qu0eAKh%2F-L9tsJFCB8lhrTrHzSaF%2F-L9tsKAp7soFPTA3_wLW%2Fimport.png?generation=1523536977187288\&alt=media)

## Namespaces

Namespace contain classes, methods and sometime other namespaces. One such example of namespace is shown in following figure:

![Namespaces](https://876731040-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L9tsFBW0V7B8qu0eAKh%2F-L9tsJFCB8lhrTrHzSaF%2F-L9tsKB58j0E6Kjq-jNJ%2Fnamespaces.png?generation=1523536977019721\&alt=media)
