Create network filters route

This commit is contained in:
2024-01-03 14:50:59 +01:00
parent 706bce0fd8
commit 22f5acd0ff
11 changed files with 180 additions and 31 deletions

@ -37,6 +37,10 @@ export interface NWFilter {
rules: NWFilterRule[];
}
export function NWFilterURL(n: NWFilter, edit: boolean = false): string {
return `/nwfilter/${n.uuid}${edit ? "/edit" : ""}`;
}
export class NWFilterApi {
/**
* Get the entire list of networks

@ -39,10 +39,6 @@ export function NetworkURL(n: NetworkInfo, edit: boolean = false): string {
return `/net/${n.uuid}${edit ? "/edit" : ""}`;
}
export function NetworkXMLURL(n: NetworkInfo): string {
return `/net/${n.uuid}/xml`;
}
export class NetworkApi {
/**
* Create a new network

@ -7,6 +7,7 @@ export interface ServerConfig {
iso_mimetypes: string[];
net_mac_prefix: string;
constraints: ServerConstraints;
builtin_nwfilter_rules: string[];
}
export interface ServerConstraints {

@ -133,10 +133,6 @@ export class VMInfo implements VMInfoInterface {
get VNCURL(): string {
return `/vm/${this.uuid}/vnc`;
}
get XMLURL(): string {
return `/vm/${this.uuid}/xml`;
}
}
export class VMApi {