Can get XML network definition
This commit is contained in:
@ -25,6 +25,10 @@ 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
|
||||
@ -63,6 +67,18 @@ export class NetworkApi {
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the source XML configuration of a network for debugging purposes
|
||||
*/
|
||||
static async GetSingleXML(uuid: string): Promise<string> {
|
||||
return (
|
||||
await APIClient.exec({
|
||||
uri: `/network/${uuid}/src`,
|
||||
method: "GET",
|
||||
})
|
||||
).data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the status of network
|
||||
*/
|
||||
|
Reference in New Issue
Block a user