resourceforge

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package resourceforge contains different functions used to forge the different resources used into the FLUIDOS environment.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForgeAllocation added in v0.0.2

func ForgeAllocation(contract *reservationv1alpha1.Contract) *nodecorev1alpha1.Allocation

ForgeAllocation creates an Allocation from a Contract.

func ForgeConfigurationFromObj added in v0.1.0

func ForgeConfigurationFromObj(configuration models.Configuration) (*nodecorev1alpha1.Configuration, error)

ForgeConfigurationFromObj creates a Configuration CR from a Configuration object.

func ForgeConfigurationObj added in v0.1.0

func ForgeConfigurationObj(configuration *nodecorev1alpha1.Configuration) (*models.Configuration, error)

ForgeConfigurationObj creates a Configuration object from a Configuration CR.

func ForgeContract

func ForgeContract(flavor *nodecorev1alpha1.Flavor, transaction *models.Transaction,
	peeringTargetLiqoCredentials *nodecorev1alpha1.LiqoCredentials, sellerLiqoID string) *reservationv1alpha1.Contract

ForgeContract creates a Contract CR.

func ForgeContractFromObj

func ForgeContractFromObj(contract *models.Contract) (*reservationv1alpha1.Contract, error)

ForgeContractFromObj creates a Contract from a reservation.

func ForgeContractObj

func ForgeContractObj(contract *reservationv1alpha1.Contract) models.Contract

ForgeContractObj creates a new Contract object.

func ForgeDefaultServiceConfiguration added in v0.1.0

func ForgeDefaultServiceConfiguration(serviceFlavor *nodecorev1alpha1.ServiceFlavor) (*nodecorev1alpha1.ServiceConfiguration, error)

ForgeDefaultServiceConfiguration forges the default service configuration based on the category of the service.

func ForgeDiscovery

func ForgeDiscovery(selector *nodecorev1alpha1.Selector, solverID string) *advertisementv1alpha1.Discovery

ForgeDiscovery creates a Discovery CR from a FlavorSelector and a solverID.

func ForgeFlavorFromObj added in v0.1.0

func ForgeFlavorFromObj(flavor *models.Flavor) (*nodecorev1alpha1.Flavor, error)

ForgeFlavorFromObj creates a Flavor CR from a Flavor Object (REAR).

func ForgeFlavorFromRef added in v0.1.0

func ForgeFlavorFromRef(f *nodecorev1alpha1.Flavor, newFlavorType *nodecorev1alpha1.FlavorType) (flavor *nodecorev1alpha1.Flavor)

ForgeFlavorFromRef creates a new flavor starting from a Reference Flavor and the new Characteristics.

func ForgeHostingPolicyFromContract added in v0.1.0

func ForgeHostingPolicyFromContract(contract *reservationv1alpha1.Contract, cl client.Client) (nodecorev1alpha1.HostingPolicy, error)

ForgeHostingPolicyFromContract creates a HostingPolicy from a Contract.

func ForgeK8SliceConfiguration added in v0.1.0

ForgeK8SliceConfiguration creates a Configuration from a FlavorSelector.

func ForgeK8SliceFlavorFromMetrics added in v0.1.0

func ForgeK8SliceFlavorFromMetrics(node *models.NodeInfo, ni nodecorev1alpha1.NodeIdentity,
	ownerReferences []metav1.OwnerReference) (flavor *nodecorev1alpha1.Flavor)

ForgeK8SliceFlavorFromMetrics creates a new flavor custom resource from the metrics of the node.

func ForgeKnownCluster added in v0.1.0

func ForgeKnownCluster(id, address string) *networkv1alpha1.KnownCluster

ForgeKnownCluster creates a KnownCluster from cluster ID and IP address.

func ForgeLiqoCredentialsFromObj added in v0.1.0

func ForgeLiqoCredentialsFromObj(liqoCredentials *models.LiqoCredentials) (*nodecorev1alpha1.LiqoCredentials, error)

ForgeLiqoCredentialsFromObj creates a LiqoCredentials CR from a LiqoCredentials object.

func ForgeLiqoCredentialsObj added in v0.1.0

func ForgeLiqoCredentialsObj(liqoCredentials *nodecorev1alpha1.LiqoCredentials) (*models.LiqoCredentials, error)

ForgeLiqoCredentialsObj creates a LiqoCredentials object from a LiqoCredentials CR.

func ForgeNetworkAuthorizationsFromObj added in v0.1.0

func ForgeNetworkAuthorizationsFromObj(networkAuthorizations *models.NetworkAuthorizations) *nodecorev1alpha1.NetworkAuthorizations

ForgeNetworkAuthorizationsFromObj creates a NetworkAuthorizations CR from a NetworkAuthorizations Object.

func ForgeNetworkIntentFromObj added in v0.1.0

func ForgeNetworkIntentFromObj(networkIntent *models.NetworkIntent) *nodecorev1alpha1.NetworkIntent

ForgeNetworkIntentFromObj creates a NetworkIntent CR from a NetworkIntent Object.

func ForgeNodeIdentitiesFromObj added in v0.1.0

func ForgeNodeIdentitiesFromObj(nodeIdentity *models.NodeIdentity) *nodecorev1alpha1.NodeIdentity

ForgeNodeIdentitiesFromObj creates a NodeIdentity CR from a NodeIdentity Object.

func ForgePeeringCandidate

func ForgePeeringCandidate(flavorPeeringCandidate *nodecorev1alpha1.Flavor,
	solverID string, available bool) (pc *advertisementv1alpha1.PeeringCandidate)

ForgePeeringCandidate creates a PeeringCandidate CR from a Flavor and a Discovery.

func ForgePodOffloadingStrategy added in v0.1.0

func ForgePodOffloadingStrategy(hostingPolicy *nodecorev1alpha1.HostingPolicy) (offloadingv1alpha1.PodOffloadingStrategyType, error)

ForgePodOffloadingStrategy creates a PodOffloadingStrategy CR from a nodecorev1alpha1.HostingPolicy.

func ForgeReservation

ForgeReservation creates a Reservation CR from a PeeringCandidate.

func ForgeResourceSelectorFromObj added in v0.1.0

func ForgeResourceSelectorFromObj(resourceSelector *models.ResourceSelector) *nodecorev1alpha1.ResourceSelector

ForgeResourceSelectorFromObj creates a ResourceSelector CR from a ResourceSelector Object.

func ForgeSecretForService added in v0.1.0

func ForgeSecretForService(contract *reservationv1alpha1.Contract,
	serviceEndpoint *corev1.Service) (*corev1.Secret, error)

ForgeSecretForService creates a Secret based on a contract for the service going to be created, following default behaviors based on the service category.

func ForgeServiceFlavorFromBlueprint added in v0.1.0

func ForgeServiceFlavorFromBlueprint(serviceBlueprint *nodecorev1alpha1.ServiceBlueprint, ni *nodecorev1alpha1.NodeIdentity,
	ownerReferences []metav1.OwnerReference) (flavor *nodecorev1alpha1.Flavor)

ForgeServiceFlavorFromBlueprint creates a new flavor custom resource from a ServiceBlueprint.

func ForgeServiceManifests added in v0.1.0

func ForgeServiceManifests(ctx context.Context, c client.Client, contract *reservationv1alpha1.Contract) ([]string, error)

ForgeServiceManifests creates YAML Kubernetes manifests from a reservationv1alpha1.Contract.

func ForgeSourceDestinationFromObj added in v0.1.0

func ForgeSourceDestinationFromObj(sourceDestination *models.SourceDestination) *nodecorev1alpha1.SourceDestination

ForgeSourceDestinationFromObj creates a SourceDestination CR from a SourceDestination Object.

func ForgeTransactionFromObj

func ForgeTransactionFromObj(transaction *models.Transaction) *reservationv1alpha1.Transaction

ForgeTransactionFromObj creates a transaction from a Transaction object.

func ForgeTransactionObj

func ForgeTransactionObj(id string, req *models.ReserveRequest) *models.Transaction

ForgeTransactionObj creates a new Transaction object.

func RenderTemplate added in v0.1.0

func RenderTemplate(yamlTemplate string, data map[string]interface{}) (string, error)

RenderTemplate renders a template with the given data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL