Documentation ¶
Overview ¶
Package resourceforge contains different functions used to forge the different resources used into the FLUIDOS environment.
Index ¶
- func ForgeAllocation(contract *reservationv1alpha1.Contract) *nodecorev1alpha1.Allocation
- func ForgeConfigurationFromObj(configuration models.Configuration) (*nodecorev1alpha1.Configuration, error)
- func ForgeConfigurationObj(configuration *nodecorev1alpha1.Configuration) (*models.Configuration, error)
- func ForgeContract(flavor *nodecorev1alpha1.Flavor, transaction *models.Transaction, ...) *reservationv1alpha1.Contract
- func ForgeContractFromObj(contract *models.Contract) (*reservationv1alpha1.Contract, error)
- func ForgeContractObj(contract *reservationv1alpha1.Contract) models.Contract
- func ForgeDefaultServiceConfiguration(serviceFlavor *nodecorev1alpha1.ServiceFlavor) (*nodecorev1alpha1.ServiceConfiguration, error)
- func ForgeDiscovery(selector *nodecorev1alpha1.Selector, solverID string) *advertisementv1alpha1.Discovery
- func ForgeFlavorFromObj(flavor *models.Flavor) (*nodecorev1alpha1.Flavor, error)
- func ForgeFlavorFromRef(f *nodecorev1alpha1.Flavor, newFlavorType *nodecorev1alpha1.FlavorType) (flavor *nodecorev1alpha1.Flavor)
- func ForgeHostingPolicyFromContract(contract *reservationv1alpha1.Contract, cl client.Client) (nodecorev1alpha1.HostingPolicy, error)
- func ForgeK8SliceConfiguration(selector nodecorev1alpha1.K8SliceSelector, flavor *nodecorev1alpha1.K8Slice) *nodecorev1alpha1.K8SliceConfiguration
- func ForgeK8SliceFlavorFromMetrics(node *models.NodeInfo, ni nodecorev1alpha1.NodeIdentity, ...) (flavor *nodecorev1alpha1.Flavor)
- func ForgeLiqoCredentialsFromObj(liqoCredentials *models.LiqoCredentials) (*nodecorev1alpha1.LiqoCredentials, error)
- func ForgeLiqoCredentialsObj(liqoCredentials *nodecorev1alpha1.LiqoCredentials) (*models.LiqoCredentials, error)
- func ForgeNetworkAuthorizationsFromObj(networkAuthorizations *models.NetworkAuthorizations) *nodecorev1alpha1.NetworkAuthorizations
- func ForgeNetworkIntentFromObj(networkIntent *models.NetworkIntent) *nodecorev1alpha1.NetworkIntent
- func ForgeNodeIdentitiesFromObj(nodeIdentity *models.NodeIdentity) *nodecorev1alpha1.NodeIdentity
- func ForgePeeringCandidate(flavorPeeringCandidate *nodecorev1alpha1.Flavor, solverID string, ...) (pc *advertisementv1alpha1.PeeringCandidate)
- func ForgePodOffloadingStrategy(hostingPolicy *nodecorev1alpha1.HostingPolicy) (offloadingv1alpha1.PodOffloadingStrategyType, error)
- func ForgeReservation(pc *advertisementv1alpha1.PeeringCandidate, ...) *reservationv1alpha1.Reservation
- func ForgeResourceSelectorFromObj(resourceSelector *models.ResourceSelector) *nodecorev1alpha1.ResourceSelector
- func ForgeSecretForService(contract *reservationv1alpha1.Contract, serviceEndpoint *corev1.Service) (*corev1.Secret, error)
- func ForgeServiceFlavorFromBlueprint(serviceBlueprint *nodecorev1alpha1.ServiceBlueprint, ...) (flavor *nodecorev1alpha1.Flavor)
- func ForgeServiceManifests(ctx context.Context, c client.Client, contract *reservationv1alpha1.Contract) ([]string, error)
- func ForgeSourceDestinationFromObj(sourceDestination *models.SourceDestination) *nodecorev1alpha1.SourceDestination
- func ForgeTransactionFromObj(transaction *models.Transaction) *reservationv1alpha1.Transaction
- func ForgeTransactionObj(id string, req *models.ReserveRequest) *models.Transaction
- func RenderTemplate(yamlTemplate string, data map[string]interface{}) (string, error)
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
func ForgeK8SliceConfiguration(selector nodecorev1alpha1.K8SliceSelector, flavor *nodecorev1alpha1.K8Slice) *nodecorev1alpha1.K8SliceConfiguration
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 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 ¶
func ForgeReservation(pc *advertisementv1alpha1.PeeringCandidate, configuration *nodecorev1alpha1.Configuration, ni nodecorev1alpha1.NodeIdentity, reservingSolver string) *reservationv1alpha1.Reservation
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.
Types ¶
This section is empty.