~anton-skriptsov/charms/trusty/nexentaedge-iscsi-gw/trunk

« back to all changes in this revision

Viewing changes to hooks/hooks.py

  • Committer: Anton Skriptsov
  • Date: 2016-07-08 15:18:06 UTC
  • Revision ID: anton.skriptsov@nexenta.com-20160708151806-hgeqesfgfxb1sdon
build 2339 update

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
import time
8
8
 
9
9
from charmhelpers.core import unitdata
 
10
from charmhelpers.core.host import set_nic_mtu
10
11
from charmhelpers.core.hookenv import (
11
12
    log, ERROR, config, relation_ids, relation_get, status_set,
12
13
    relation_set, Hooks, UnregisteredHookError, service_name,
61
62
        log('Nexentaedge node already installed...')
62
63
        return()
63
64
 
 
65
    #build 2240, should set replicast MTU to 9000
 
66
    replicast_eth = config('replicast_eth')
 
67
    if replicast_eth:
 
68
        set_nic_mtu(replicast_eth, '9000')
 
69
 
64
70
    configurator = NedgeGatewayConfigurator(environment)
65
71
    status_set('maintenance', 'Installing nexentaedge...')
66
72
    if not configurator.configure():