## osinfo_deployment

osinfo_deployment — An virtualization deployment

## Functions

OsinfoDeployment * | osinfo_deployment_new ()
OsinfoOs * | osinfo_deployment_get_os ()
OsinfoPlatform * | osinfo_deployment_get_platform ()
OsinfoDevice * | osinfo_deployment_get_preferred_device ()
OsinfoDeviceLink * | osinfo_deployment_get_preferred_device_link ()
OsinfoDeviceList * | osinfo_deployment_get_devices ()
OsinfoDeviceLinkList * | osinfo_deployment_get_device_links ()
OsinfoDeviceLink * | osinfo_deployment_add_device ()

## Types and Values

#define | OSINFO_TYPE_DEPLOYMENT

## Description

OsinfoDeployment is an entity representing an virtualization deployment. Deployments have a list of supported devices

## Functions

### osinfo_deployment_new ()

    OsinfoDeployment *
    osinfo_deployment_new (const gchar *id,
                           OsinfoOs *os,
                           OsinfoPlatform *platform);

Create a new deployment entity

#### Parameters

id | the unique identifier |
os | the operating system to deploy |
platform | the platform to deploy on |

#### Returns

A deployment entity.

[transfer full]

### osinfo_deployment_get_os ()

    OsinfoOs *
    osinfo_deployment_get_os (OsinfoDeployment *deployment);

Get the operating system for the deployment

#### Parameters

deployment | the deployment entity |

#### Returns

an OS, or NULL.

[transfer none]

### osinfo_deployment_get_platform ()

    OsinfoPlatform *
    osinfo_deployment_get_platform (OsinfoDeployment *deployment);

Get the platform for the deployment

#### Parameters

deployment | the deployment entity |

#### Returns

a platform, or NULL.

[transfer none]

### osinfo_deployment_get_preferred_device ()

    OsinfoDevice *
    osinfo_deployment_get_preferred_device
                                   (OsinfoDeployment *deployment,
                                    OsinfoFilter *filter);

Get the preferred device matching a given filter

#### Parameters

deployment | the deployment entity |
filter | a device metadata filter. | [transfer none][allow-none]

#### Returns

a device, or NULL.

[transfer none]

### osinfo_deployment_get_preferred_device_link ()

    OsinfoDeviceLink *
    osinfo_deployment_get_preferred_device_link
                                   (OsinfoDeployment *deployment,
                                    OsinfoFilter *filter);

Get the preferred device link matching a given filter and platform. The filter matches against attributes on the link, not the device.

#### Parameters

deployment | the deployment entity |
filter | a device metadata filter. | [transfer none][allow-none]

#### Returns

a device, or NULL.

[transfer none]

### osinfo_deployment_get_devices ()

    OsinfoDeviceList *
    osinfo_deployment_get_devices (OsinfoDeployment *deployment,
                                   OsinfoFilter *filter);

Retrieve all the associated devices matching the filter. The filter matches against the device, not the link.

#### Parameters

deployment | a deployment entity |
filter | an optional filter. | [transfer none][allow-none]

#### Returns

a list of OsinfoDevice entities.

[transfer full]

### osinfo_deployment_get_device_links ()

    OsinfoDeviceLinkList *
    osinfo_deployment_get_device_links (OsinfoDeployment *deployment,
                                        OsinfoFilter *filter);

Retrieve all the associated devices matching the filter. The filter matches against the link, not the device.

#### Parameters

deployment | a deployment entity |
filter | an optional filter. | [transfer none][allow-none]

#### Returns

a list of OsinfoDevice entities.

[transfer full]

### osinfo_deployment_add_device ()

    OsinfoDeviceLink *
    osinfo_deployment_add_device (OsinfoDeployment *deployment,
                                  OsinfoDevice *dev);

Associate a device with a deployment. The returned OsinfoDeviceLink can be used to record extra metadata against the link

#### Parameters

deployment | a deployment entity |
dev | the device to associate. | [transfer none]

#### Returns

the device association.

[transfer none]

## Types and Values

### OSINFO_TYPE_DEPLOYMENT

    #define OSINFO_TYPE_DEPLOYMENT (osinfo_deployment_get_type ())

## See Also

OsinfoOs, OsinfoDeployment