Netrefs now work on interfaces :)
[nepi.git] / src / nepi / testbeds / planetlab / application.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 from constants import TESTBED_ID
5 import plcapi
6 import operator
7
8 class Application(object):
9     def __init__(self, api=None):
10         if not api:
11             api = plcapi.PLCAPI()
12         self._api = api
13         
14         # Attributes
15         self.command = None
16         self.sudo = False
17         
18         self.stdout = None
19         self.stderr = None
20         
21         # Those are filled when an actual node is connected
22         self.node = None
23     
24     def __str__(self):
25         return "%s<command:%s%s>" % (
26             self.__class__.__name__,
27             "sudo " if self.sudo else "",
28             self.command,
29         )
30     
31     def validate(self):
32         pass
33