Linode_List() public method

Returns a list of all Linodes user has access or delete to, including some properties. Status values are -1: Being Created, 0: Brand New, 1: Running, and 2: Powered Off.
public Linode_List ( int LinodeID = null ) : Austin.Linode.Node[]
LinodeID int Limits the list to the specified LinodeID
return Austin.Linode.Node[]
Beispiel #1
0
        static void Main(string[] args)
        {
            var li = new LinodeClient("~~~");

            var id = li.Linode_List()[0].Id;
            int jobId = li.Linode_Reboot(id).JobID;
            while (true)
            {
                var j = li.Linode_Job_List(id, jobId)[0];

                if (j.HostSuccess.HasValue)
                {
                    Console.WriteLine("Finished: {0}", j.HostSuccess.Value);
                    break;
                }

                Console.WriteLine("still waiting");
                System.Threading.Thread.Sleep(5 * 1000);
            }

            Console.WriteLine();
            Console.WriteLine("Press enter to exit.");
            Console.ReadLine();
        }