Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
published on Thursday, Feb 26, 2026 by Vates
Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
published on Thursday, Feb 26, 2026 by Vates
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as xenorchestra from "@vates/pulumi-xenorchestra";
const eth0 = xenorchestra.getXoaPif({
device: "eth0",
vlan: -1,
});
const demo_vm = new xenorchestra.Vm("demo-vm", {networks: [{
networkId: eth0.then(eth0 => eth0.network),
}]});
// ...
import pulumi
import pulumi_xenorchestra as xenorchestra
eth0 = xenorchestra.get_xoa_pif(device="eth0",
vlan=-1)
demo_vm = xenorchestra.Vm("demo-vm", networks=[{
"network_id": eth0.network,
}])
# ...
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/vatesfr/pulumi-xenorchestra/sdk/v2/go/xenorchestra"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
eth0, err := xenorchestra.GetXoaPif(ctx, &xenorchestra.GetXoaPifArgs{
Device: "eth0",
Vlan: -1,
}, nil)
if err != nil {
return err
}
_, err = xenorchestra.NewVm(ctx, "demo-vm", &xenorchestra.VmArgs{
Networks: xenorchestra.VmNetworkArray{
&xenorchestra.VmNetworkArgs{
NetworkId: pulumi.String(eth0.Network),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Xenorchestra = Pulumi.Xenorchestra;
return await Deployment.RunAsync(() =>
{
var eth0 = Xenorchestra.GetXoaPif.Invoke(new()
{
Device = "eth0",
Vlan = -1,
});
var demo_vm = new Xenorchestra.Vm("demo-vm", new()
{
Networks = new[]
{
new Xenorchestra.Inputs.VmNetworkArgs
{
NetworkId = eth0.Apply(getXoaPifResult => getXoaPifResult.Network),
},
},
});
// ...
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.xenorchestra.XenorchestraFunctions;
import com.pulumi.xenorchestra.inputs.GetXoaPifArgs;
import com.pulumi.xenorchestra.Vm;
import com.pulumi.xenorchestra.VmArgs;
import com.pulumi.xenorchestra.inputs.VmNetworkArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var eth0 = XenorchestraFunctions.getXoaPif(GetXoaPifArgs.builder()
.device("eth0")
.vlan(-1)
.build());
var demo_vm = new Vm("demo-vm", VmArgs.builder()
.networks(VmNetworkArgs.builder()
.networkId(eth0.network())
.build())
.build());
// ...
}
}
resources:
demo-vm:
type: xenorchestra:Vm
properties:
# ...
networks:
- networkId: ${eth0.network}
variables:
eth0:
fn::invoke:
function: xenorchestra:getXoaPif
arguments:
device: eth0
vlan: -1
Using getXoaPif
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getXoaPif(args: GetXoaPifArgs, opts?: InvokeOptions): Promise<GetXoaPifResult>
function getXoaPifOutput(args: GetXoaPifOutputArgs, opts?: InvokeOptions): Output<GetXoaPifResult>def get_xoa_pif(device: Optional[str] = None,
host_id: Optional[str] = None,
vlan: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetXoaPifResult
def get_xoa_pif_output(device: Optional[pulumi.Input[str]] = None,
host_id: Optional[pulumi.Input[str]] = None,
vlan: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetXoaPifResult]func GetXoaPif(ctx *Context, args *GetXoaPifArgs, opts ...InvokeOption) (*GetXoaPifResult, error)
func GetXoaPifOutput(ctx *Context, args *GetXoaPifOutputArgs, opts ...InvokeOption) GetXoaPifResultOutput> Note: This function is named GetXoaPif in the Go SDK.
public static class GetXoaPif
{
public static Task<GetXoaPifResult> InvokeAsync(GetXoaPifArgs args, InvokeOptions? opts = null)
public static Output<GetXoaPifResult> Invoke(GetXoaPifInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetXoaPifResult> getXoaPif(GetXoaPifArgs args, InvokeOptions options)
public static Output<GetXoaPifResult> getXoaPif(GetXoaPifArgs args, InvokeOptions options)
fn::invoke:
function: xenorchestra:index/getXoaPif:getXoaPif
arguments:
# arguments dictionaryThe following arguments are supported:
getXoaPif Result
The following output properties are available:
- Attached bool
- If the PIF is attached to the network.
- Bond
Master string - In case of a bond slave, the uuid of the bond master.
- Bond
Slaves List<string> - In case of a bond master, the PIFs (uuid) that are used for this bond.
- Device string
- The name of the network device. Examples include eth0, eth1, etc. See
ifconfigfor possible devices. - Host string
- The host the PIF is associated with.
- Host
Id string - The ID of the host that the PIF belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Bond boolMaster - True if this PIF is a bond master.
- Is
Bond boolSlave - True if this PIF is a bond slave.
- Network string
- The network the PIF is associated with.
- Pool
Id string - The pool the PIF is associated with.
- Uuid string
- The uuid of the PIF.
- Vlan int
- The VLAN the PIF belongs to.
- Attached bool
- If the PIF is attached to the network.
- Bond
Master string - In case of a bond slave, the uuid of the bond master.
- Bond
Slaves []string - In case of a bond master, the PIFs (uuid) that are used for this bond.
- Device string
- The name of the network device. Examples include eth0, eth1, etc. See
ifconfigfor possible devices. - Host string
- The host the PIF is associated with.
- Host
Id string - The ID of the host that the PIF belongs to.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Bond boolMaster - True if this PIF is a bond master.
- Is
Bond boolSlave - True if this PIF is a bond slave.
- Network string
- The network the PIF is associated with.
- Pool
Id string - The pool the PIF is associated with.
- Uuid string
- The uuid of the PIF.
- Vlan int
- The VLAN the PIF belongs to.
- attached Boolean
- If the PIF is attached to the network.
- bond
Master String - In case of a bond slave, the uuid of the bond master.
- bond
Slaves List<String> - In case of a bond master, the PIFs (uuid) that are used for this bond.
- device String
- The name of the network device. Examples include eth0, eth1, etc. See
ifconfigfor possible devices. - host String
- The host the PIF is associated with.
- host
Id String - The ID of the host that the PIF belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Bond BooleanMaster - True if this PIF is a bond master.
- is
Bond BooleanSlave - True if this PIF is a bond slave.
- network String
- The network the PIF is associated with.
- pool
Id String - The pool the PIF is associated with.
- uuid String
- The uuid of the PIF.
- vlan Integer
- The VLAN the PIF belongs to.
- attached boolean
- If the PIF is attached to the network.
- bond
Master string - In case of a bond slave, the uuid of the bond master.
- bond
Slaves string[] - In case of a bond master, the PIFs (uuid) that are used for this bond.
- device string
- The name of the network device. Examples include eth0, eth1, etc. See
ifconfigfor possible devices. - host string
- The host the PIF is associated with.
- host
Id string - The ID of the host that the PIF belongs to.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Bond booleanMaster - True if this PIF is a bond master.
- is
Bond booleanSlave - True if this PIF is a bond slave.
- network string
- The network the PIF is associated with.
- pool
Id string - The pool the PIF is associated with.
- uuid string
- The uuid of the PIF.
- vlan number
- The VLAN the PIF belongs to.
- attached bool
- If the PIF is attached to the network.
- bond_
master str - In case of a bond slave, the uuid of the bond master.
- bond_
slaves Sequence[str] - In case of a bond master, the PIFs (uuid) that are used for this bond.
- device str
- The name of the network device. Examples include eth0, eth1, etc. See
ifconfigfor possible devices. - host str
- The host the PIF is associated with.
- host_
id str - The ID of the host that the PIF belongs to.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
bond_ boolmaster - True if this PIF is a bond master.
- is_
bond_ boolslave - True if this PIF is a bond slave.
- network str
- The network the PIF is associated with.
- pool_
id str - The pool the PIF is associated with.
- uuid str
- The uuid of the PIF.
- vlan int
- The VLAN the PIF belongs to.
- attached Boolean
- If the PIF is attached to the network.
- bond
Master String - In case of a bond slave, the uuid of the bond master.
- bond
Slaves List<String> - In case of a bond master, the PIFs (uuid) that are used for this bond.
- device String
- The name of the network device. Examples include eth0, eth1, etc. See
ifconfigfor possible devices. - host String
- The host the PIF is associated with.
- host
Id String - The ID of the host that the PIF belongs to.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Bond BooleanMaster - True if this PIF is a bond master.
- is
Bond BooleanSlave - True if this PIF is a bond slave.
- network String
- The network the PIF is associated with.
- pool
Id String - The pool the PIF is associated with.
- uuid String
- The uuid of the PIF.
- vlan Number
- The VLAN the PIF belongs to.
Package Details
- Repository
- xenorchestra vatesfr/pulumi-xenorchestra
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
xenorchestraTerraform Provider.
Viewing docs for xenorchestra v2.4.0
published on Thursday, Feb 26, 2026 by Vates
published on Thursday, Feb 26, 2026 by Vates
