MCPcopy Create free account
hub / github.com/apache/cloudstack / isPreConfiged

Method isPreConfiged

python/lib/cloudutils/serviceConfig.py:91–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

89 self.syscfg = syscfg
90
91 def isPreConfiged(self):
92 preCfged = False
93 for br in self.syscfg.env.nics:
94 if not self.netcfg.isNetworkDev(br):
95 logging.debug("%s is not a network device, is it down?"%br)
96 return False
97 if self.syscfg.env.bridgeType == "openvswitch" and not self.netcfg.isOvsBridge(br):
98 raise CloudInternalException("%s is not an openvswitch bridge" % br)
99 if self.syscfg.env.bridgeType == "native" and not self.netcfg.isBridge(br) and not self.netcfg.isNetworkDev(br):
100 # traffic label doesn't have to be a bridge, we'll create bridges on it
101 raise CloudInternalException("%s is not a bridge and not a net device" % br)
102 preCfged = True
103
104 return preCfged
105
106 def cfgNetwork(self, dev=None, brName=None):
107 if dev is None:

Callers 3

configMethod · 0.80
configMethod · 0.80
configMethod · 0.80

Calls 5

isNetworkDevMethod · 0.80
debugMethod · 0.80
isOvsBridgeMethod · 0.80
isBridgeMethod · 0.80

Tested by

no test coverage detected