Esempio n. 1
0
	def __init__ (self, prefix = False):
		Profile.__init__ (self, prefix)
		self.name = 'unix'

		self.gcc_flags = ['-I%s/include' % self.staged_prefix]
		self.ld_flags = ['-L%s/lib' % self.staged_prefix]

		self.env.set ('PATH', ':',
			'%{toolchain_root}/bin',
			'%{staged_prefix}/bin',
			'/usr/bin',
			'/bin',
			'/usr/local/git/bin')

		self.env.set ('C_INCLUDE_PATH',  '%{staged_prefix}/include')

		#self.env.set ('LD_LIBRARY_PATH', '%{staged_prefix}/lib')

		self.env.set ('ACLOCAL_FLAGS',   '-I%{staged_prefix}/share/aclocal')
		self.env.set ('PKG_CONFIG_PATH', ':',
			'%{staged_prefix}/lib/pkgconfig',
			'%{staged_prefix}/share/pkgconfig',
			'%{toolchain_root}/lib/pkgconfig',
			'%{toolchain_root}/share/pkgconfig')

		self.env.set ('XDG_CONFIG_DIRS', '%{staged_prefix}/etc/xdg')
		self.env.set ('XDG_DATA_DIRS',   '%{staged_prefix}/share')
		self.env.set ('XDG_CONFIG_HOME', '$HOME/.config')
Esempio n. 2
0
	def __init__ (self, prefix = False):
		Profile.__init__ (self, prefix)
		self.name = 'unix'

		self.gcc_flags = [ '-I%{prefix}/include' ]
		self.ld_flags = [ '-L%{prefix}/lib' ]

		try:
			self.gcc_flags.extend (self.gcc_extra_flags)
		except:
			pass

		try:
			self.ld_flags.extend (self.ld_extra_flags)
		except:
			pass

		self.env.set ('PATH', ':',
			'%{prefix}/bin',
			'/usr/bin',
			'/bin',
			'/usr/local/git/bin')

		self.env.set ('C_INCLUDE_PATH',  '%{prefix}/include')

		self.env.set ('LD_LIBRARY_PATH', '%{prefix}/lib')

		self.env.set ('ACLOCAL_FLAGS',   '-I%{prefix}/share/aclocal')
		self.env.set ('PKG_CONFIG_PATH', ':',
			'%{prefix}/lib/pkgconfig',
			'%{prefix}/share/pkgconfig')

		self.env.set ('XDG_CONFIG_DIRS', '%{prefix}/etc/xdg')
		self.env.set ('XDG_DATA_DIRS',   '%{prefix}/share')
		self.env.set ('XDG_CONFIG_HOME', '$HOME/.config')
Esempio n. 3
0
	def __init__(self, name, CertClass):
		Profile.__init__(self, name, CertClass)
		self._certs_by_subj.set_filename("users/"+str(name)+"/certs.subj")
		self._certs_by_issuer.set_filename("users/"+str(name)+"/certs.issuer")

		# overload meaning of FileCertifications here to store user-profile.
		self.info = FileCertifications()
		self.info.set_filename("users/"+str(name)+"/profile")
Esempio n. 4
0
    def __init__(self, data_dict):
        """
        Intialisation of the simulation model
        """

        self.data_dict = data_dict  # holds simulation and profile information.

        # Init Profile
        Profile.__init__(self, self.data_dict['profileDetails']['name'], self.data_dict['profileDetails']['age'], \
                         self.data_dict['profileDetails']['retireAge'], self.data_dict['profileDetails']['deadAge'], \
                         self.data_dict['profileDetails']['incomePA'], self.data_dict['profileDetails']['expensesPM'], \
                         self.data_dict['profileDetails']['proportionSaved'])
        # Initialise profile for simulation
        self.init_user_profile()
Esempio n. 5
0
    def __init__(self,config):
        Profile.__init__(self,'CeRouter',config=config)
        self.__config = config
        self.__previous_mac = ''
        
        self.__device_lan_tn1 = None
        self.__lan_mac_tn1 = None
        self.__device_wan_tr1 = None
        self.__wan_mac_tr1 = None

        self.__all_nodes_addr = None
        self.__all_routers_addr = None
        self.__mldv2_addr = None
        self.__link_local_addr = None
        self.mac_input = None
        self.__session = None
        #self.router = OntRouter(config)
        self.iperf = None
Esempio n. 6
0
    def __init__(self, config):
        Profile.__init__(self, 'CeRouter', config=config)
        self.__config = config
        self.__previous_mac = ''

        self.__device_lan_tn1 = None
        self.__lan_mac_tn1 = None
        self.__device_wan_tr1 = None
        self.__wan_mac_tr1 = None

        self.__all_nodes_addr = None
        self.__all_routers_addr = None
        self.__mldv2_addr = None
        self.__link_local_addr = None
        self.mac_input = None
        self.__session = None
        self.iperf = None
        self.active = False

        self.__t_flask = Thread(target=self.start_flask,
                                name='Flask server',
                                daemon=False)
        self.__t_flask.start()
 def __init__(self, *args, **kws):
     self._lock = Lock()
     self._local = threading.local()
     self._local.cur = None
 
     Profile.__init__( self, *args, **kws )