Modulemd.DefaultsV1

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

Subclasses:

None

Methods

Inherited:

Modulemd.Defaults (9), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (module_name)

add_default_profile_for_stream (stream_name, profile_name, intent)

get_default_profiles_for_stream (stream_name, intent)

get_default_stream (intent)

get_streams_with_default_profiles (intent)

remove_default_profiles_for_stream (stream_name, intent)

set_default_stream (default_stream, intent)

set_empty_default_profiles_for_stream (stream_name, intent)

Virtual Methods

Inherited:

Modulemd.Defaults (4), GObject.Object (7)

Properties

Inherited:

Modulemd.Defaults (2)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Modulemd.DefaultsV1(**kwargs)
Bases:

Modulemd.Defaults

Abstract:

No

Structure:

Modulemd.DefaultsV1Class

classmethod new(module_name)
Parameters:

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

Returns:

A newly-allocated Modulemd.DefaultsV1 object.

Return type:

Modulemd.DefaultsV1

New in version 2.0.

add_default_profile_for_stream(stream_name, profile_name, intent)
Parameters:
  • stream_name (str) – The name of the module stream to which to add this default profile.

  • profile_name (str) – The name of the default profile to add.

  • intent (str or None) – The name of the system intent to add profile defaults to. If None, this sets the generic fallback profiles for the stream.

Add a profile that will be installed for this stream if none are explicitly specified by the user. This function may be called any number of times for the same stream and will deduplicate input.

New in version 2.0.

get_default_profiles_for_stream(stream_name, intent)
Parameters:
  • stream_name (str) – The name of the string to retrieve the default profiles for.

  • intent (str or None) – The name of the system intent from which to retrieve the profile defaults for this stream.

Returns:

A sorted #GStrv list of unique profiles to be installed by default for this stream. None, if this stream_name is not present in the defaults.

Return type:

[str]

New in version 2.0.

get_default_stream(intent)
Parameters:

intent (str or None) – The name of the system intent whose default stream will be retrieved. If left None or the specified intent has no different default, it will return the generic default stream for this module.

Returns:

The name of the default stream for this module.

Return type:

str

New in version 2.0.

get_streams_with_default_profiles(intent)
Parameters:

intent (str or None) – The name of the system intent whose stream profiles will be retrieved. If left None or the specified intent has no separate defaults for this module, it will return the generic stream profiles.

Returns:

A sorted #GStrv list of unique stream names for which default profiles have been assigned.

Return type:

[str]

New in version 2.0.

remove_default_profiles_for_stream(stream_name, intent)
Parameters:
  • stream_name (str) – The name of the module stream from which to remove default profiles.

  • intent (str or None) – The name of the system intent from which to remove the profile defaults for this stream.

Removes this stream from the list of profiles entirely. It will not appear in the output document.

New in version 2.0.

set_default_stream(default_stream, intent)
Parameters:
  • default_stream (str or None) – The name of the default stream for this module. If None, it will remove the default stream.

  • intent (str or None) – If non-None, this indicates the system-intent to apply this default stream. If None, it will be added as common defaults.

Set the default stream for this module.

New in version 2.0.

set_empty_default_profiles_for_stream(stream_name, intent)
Parameters:
  • stream_name (str) – The name of the module stream for which to empty default profiles.

  • intent (str or None) – The name of the system intent from which to clear the profile defaults for this stream.

Sets the default profiles for stream_name to the empty set. When output to a file, it will appear as stream_name: [].

New in version 2.0.