Changes between Version 2 and Version 3 of SeattleLib/vessellookup.repy

Changes between Version 2 and Version 3 of SeattleLib/vessellookup.repy

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 2 and Version 3 of SeattleLib/vessellookup.repy

Please note that these Trac pages are no longer being updated. Wiki contents/documentation have moved to GitHub.

Changes between Version 2 and Version 3 of SeattleLib/vessellookup.repy

Show
Ignore:
Timestamp:
01/10/13 21:32:48 (6 years ago)
Author:
leonwlaw
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SeattleLib/vessellookup.repy

    v2 v3  
    11vessellookup.repy is designed to give repy programmers an easy way to look up various resources that a vessel has.  These resources include but are not limited to max CPU percentage, max memory usage, allowed ports, etc. 
    22 
    3 = API = 
     3[[TOC(inline)]] 
     4 
     5== API == 
    46All functions in this module take a single vessellocation as an argument.  A vessellocation is a string that describes where a vessel can be found.  It is in the form of ip:port:vesselname. Example: 123.45.67.89:1224:v4.  The resources file is retrieved the first time a lookup is performed on a vessel.  The data from this initial retrieval is cached so that subsequent calls to are fast. 
    57 
    6 == lookup_cpu() == 
     8=== lookup_cpu() === 
    79Returns the CPU percentage given to the vessel, as a float. 
    810 
    9 == lookup_disk() == 
     11=== lookup_disk() === 
    1012Returns the number of bytes of disk space allocated to the vessel, as an int. 
    1113 
    12 == lookup_memory() == 
     14=== lookup_memory() === 
    1315Returns the number of bytes of memory allocated to the vessel, as an int. 
    1416 
    15 == lookup_ports() == 
     17=== lookup_ports() === 
    1618Returns the list of ports that this vessel is allowed to listen on, as a list of ints. 
    1719