Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Nodes

Index

Constructors

  • new Nodes(graphqlURL: string, proxyURL: string, rmbClient: Client): Nodes

Properties

gqlClient: Graphql
graphqlURL: string
proxyURL: string
rmb: RMB

Methods

  • _g2b(GB: number): number
  • allocateDiskToPools(diskPools: number[], disk: number): boolean
  • Allocates a disk of a given size to a list of disk pools.

    Parameters

    • diskPools: number[]

      An array of numbers representing the available disk space in each pool.

    • disk: number

      The size of the disk to be allocated.

    Returns boolean

    A boolean value indicating whether the disk was successfully allocated or not. Returns true if the disk was allocated to a pool, false otherwise.

  • checkFarmHasFreePublicIps(farmId: number, farms?: FarmInfo[], url?: string): Promise<boolean>
  • fitDisksInDisksPool(disks: number[], pools: number[], type: DiskTypes): void
  • Fits disks into disk pools based on their sizes.

    throws

    {Error} - If the required disk cannot be fitted into the pool.

    Parameters

    • disks: number[]

      An array of disk sizes required to be fitted into the pool.

    • pools: number[]
    • type: DiskTypes

      A DiskTypes enum value representing the type of disk being allocated.

    Returns void

  • getAccessNodes(): Promise<Record<string, unknown>>
  • getAllFarms(url?: string): Promise<FarmInfo[]>
  • getAllNodes(url?: string): Promise<NodeInfo[]>
  • getFarmIdFromFarmName(name: string, farms?: FarmInfo[], url?: string): Promise<number>
  • getFarms(page?: number, pageSize?: number, url?: string): Promise<FarmInfo[]>
  • getNode(nodeId: any, url?: string): Promise<NodeInfo>
  • getNodeFreeResources(nodeId: number, source?: "proxy" | "zos", url?: string): Promise<NodeResources>
  • getNodeIdFromContractId(contractId: number, mnemonic: string): Promise<number>
  • getNodeTwinId(node_id: number): Promise<number>
  • getNodes(page?: number, pageSize?: number, url?: string): Promise<NodeInfo[]>
  • getNodesByFarmId(farmId: number, url?: string): Promise<NodeInfo[]>
  • nodeAvailableForTwinId(nodeId: number, twinId: number): Promise<boolean>
  • nodeHasResources(nodeId: number, options: FilterOptions): Promise<boolean>
  • sortArrayDesc(array: number[]): void
  • verifyNodeStoragePoolCapacity(ssdDisks: number[], hddDisks: number[], rootFileSystemDisks: number[], nodeId: number): Promise<boolean>
  • Verifies the storage pool capacity of a node for different disk types.

    throws

    {Error} - If there is an error in getting the node's information or if the required deployment can't be fitted.

    Parameters

    • ssdDisks: number[]

      An array of SSD disk sizes required for the deployment.

    • hddDisks: number[]

      An array of HDD disk sizes required for the deployment.

    • rootFileSystemDisks: number[]

      An array of disk sizes required for the deployment's root file system.

    • nodeId: number

      The ID of the node to be verified.

    Returns Promise<boolean>

    • True if the node has enough capacity, otherwise false.

Generated using TypeDoc