Esempio n. 1
0
 def service_useEdenWall(self, context):
     """
     Return True if the nucentral is running on EdenWall.
     """
     return is_pro()
Esempio n. 2
0
"""

from __future__ import with_statement
from ufwi_conf.common.netcfg import NetCfg
from ufwi_conf.common.netcfg import DATASTRUCTURE_VERSION
from ufwi_conf.common.netcfg import deserializeNetCfg
from ufwi_conf.common.net_exceptions import NoMatch
from ufwi_conf.common.net_exceptions import NetCfgError
from ufwi_conf.common.net_interfaces import Ethernet
from ufwi_conf.common.net_interfaces import Vlanable
from ufwi_conf.common.net_interfaces import Vlan
from ufwi_conf.common.net_interfaces import Bonding
from ufwi_rpcd.common.config import list2dict
from ufwi_rpcd.common import is_pro

_pro = is_pro()
if _pro:
    from ufwi_conf.common.ha_cfg import _deconfigureHA

class NetCfgRW(NetCfg):

    def serialize(self):
        serialized = {
            'ethernets': list2dict([ethernet.serialize() for ethernet in self.iterEthernets()]),
            'vlans': list2dict([vlan.serialize() for vlan in self.iterVlans()]),
            'bondings': list2dict([bonding.serialize() for bonding in self.iterBondings()]),
            'DATASTRUCTURE_VERSION': DATASTRUCTURE_VERSION
            }
        return serialized

    def canCreateVlan(self):
Esempio n. 3
0
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with NuFirewall.  If not, see <http://www.gnu.org/licenses/>

$Id$
"""

from ufwi_rpcd.python import backportXmlrpclib
backportXmlrpclib()

from ufwi_rpcd.common.unicode_stdout import installUnicodeStdout
installUnicodeStdout()
from ufwi_rpcd.common import tr
from ufwi_rpcd.common import is_pro
from ufwi_rpcd.client.error import RpcdError, SessionError
from ufwi_rpcd.client.base import (
    RpcdClientBase, Cookie,
    DEFAULT_HOST, DEFAULT_PORT, DEFAULT_PROTOCOL, KEEP_ALIVE_SECONDS)

if is_pro():
    SOFTWARE_MAIN_NAME = tr("EdenWall")
    CLIENT_SUITE_NAME = tr("Edenwall Administration Suite")
    CLIENT_SUITE_SHORTNAME = tr("EAS")
else:
    SOFTWARE_MAIN_NAME = tr("NuFirewall")
    CLIENT_SUITE_NAME = tr("NuFirewall Administration Suite")
    CLIENT_SUITE_SHORTNAME = tr("NuFW-AS")