Modulemd.Defaults

g GObject.Object GObject.Object Modulemd.Defaults Modulemd.Defaults GObject.Object->Modulemd.Defaults

Subclasses:

Modulemd.DefaultsV1

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (version, module_name)

copy ()

equals (self_2)

get_mdversion ()

get_modified ()

get_module_name ()

set_modified (modified)

upgrade (mdversion)

validate ()

Virtual Methods

Inherited:

GObject.Object (7)

do_copy ()

do_equals (self_2)

do_get_mdversion ()

do_validate ()

Properties

Name

Type

Flags

Short Description

mdversion

int

r

The metadata version of this Defaults object. Read-only.

module-name

str

r/w/co

The name of the module to which these defaults apply.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Modulemd.Defaults(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Modulemd.DefaultsClass

classmethod new(version, module_name)
Parameters:
  • version (int) – The version of the defaults metadata to create.

  • module_name (str) – The name of the module to which these defaults apply.

Returns:

A newly created Modulemd.Defaults subtype of the requested version.

Return type:

Modulemd.Defaults

Create a new Modulemd.Defaults.

New in version 2.0.

copy()
Returns:

A newly-allocated copy of self.

Return type:

Modulemd.Defaults

New in version 2.0.

equals(self_2)
Parameters:

self_2 (Modulemd.Defaults) – A Modulemd.Defaults object

Returns:

True if both self and self_2 contain equal values, False if they differed.

Return type:

bool

New in version 2.2.

get_mdversion()
Returns:

The metadata version of this defaults object.

Return type:

int

New in version 2.0.

get_modified()
Returns:

The last modified time represented as a 64-bit integer (such as 201807011200)

Return type:

int

New in version 2.0.

get_module_name()
Returns:

The name of the module to which these defaults apply.

Return type:

str

New in version 2.0.

set_modified(modified)
Parameters:

modified (int) – The last modified time represented as a 64-bit integer (such as 201807011200)

New in version 2.0.

upgrade(mdversion)
Parameters:

mdversion (int) – The version to upgrade to.

Raises:

GLib.Error

Returns:

A newly-allocated copy of self upgraded to the requested defaults version. None if the upgrade cannot be performed and sets error appropriately. This function does not modify self.

Return type:

Modulemd.Defaults

New in version 2.0.

validate()
Raises:

GLib.Error

Returns:

True if validation passed, False and sets error appropriately if validation failed.

Return type:

bool

New in version 2.0.

do_copy() virtual
Returns:

A newly-allocated copy of self.

Return type:

Modulemd.Defaults

New in version 2.0.

do_equals(self_2) virtual
Parameters:

self_2 (Modulemd.Defaults) – A Modulemd.Defaults object

Returns:

True if both self_1 and self_2 contain equal values, False if they differed.

Return type:

bool

New in version 2.2.

do_get_mdversion() virtual
Returns:

The metadata version of this defaults object.

Return type:

int

New in version 2.0.

do_validate() virtual
Returns:

True if validation passed, False and sets error appropriately if validation failed.

Return type:

bool

New in version 2.0.

Property Details

Modulemd.Defaults.props.mdversion
Name:

mdversion

Type:

int

Default Value:

0

Flags:

READABLE

The metadata version of this Defaults object. Read-only.

Modulemd.Defaults.props.module_name
Name:

module-name

Type:

str

Default Value:

'__NAME_UNSET__'

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The name of the module to which these defaults apply.