Browse Source

Removed config registration

Removed config registration as it is in shim
layer and set transport and ostype to SSH and NI
if the call is from L3 plugin. Also removed VDX
test cases as it failed py27 tests due to change
in neutron test tree

Change-Id: I3201fe7aeec21d0ecea3f41d1745d6af652abb77
Closes-Bug: #1441506
Pradeep Sathasivam 4 years ago
parent
commit
80f35eea70
1 changed files with 4 additions and 28 deletions
  1. 4
    28
      networking_brocade/mlx/ml2/fi_ni/brcd_config.py

+ 4
- 28
networking_brocade/mlx/ml2/fi_ni/brcd_config.py View File

@@ -20,29 +20,6 @@ Parses the brocade ethernet configuration template
20 20
 
21 21
 from oslo_config import cfg
22 22
 
23
-SWITCHES = [
24
-    cfg.StrOpt(
25
-        'switch_names',
26
-        default='',
27
-        help=('Switches connected to the compute nodes'))]
28
-
29
-ML2_BROCADE = [cfg.StrOpt('address', default='',
30
-                          help=('The address of the host to SSH to')),
31
-               cfg.StrOpt('username', default='admin',
32
-                          help=('The SSH username to use')),
33
-               cfg.StrOpt('password', default='password', secret=True,
34
-                          help=('The SSH password to use')),
35
-               cfg.StrOpt('physical_networks', default='',
36
-                          help=('Allowed physical networks')),
37
-               cfg.StrOpt('ports', default='',
38
-                          help=('Ports')),
39
-               cfg.StrOpt('transport', default='SSH',
40
-                          choices=('SSH', 'TELNET'),
41
-                          help=('Protocol used to communicate with Switch')),
42
-               cfg.StrOpt('ostype', default='NI', choices=('NI', 'FI'),
43
-                          help=('OS type of the device.')),
44
-               ]
45
-
46 23
 
47 24
 class ML2BrocadeConfig(object):
48 25
 
@@ -66,18 +43,15 @@ class ML2BrocadeConfig(object):
66 43
         :param:isL2: Boolean value based on the router type L2 or L3
67 44
         """
68 45
         if isL2:
69
-            cfg.CONF.register_opts(SWITCHES, 'ml2_brocade_fi_ni')
70 46
             self._brocade_switches = (cfg.CONF.ml2_brocade_fi_ni.
71 47
                                       switch_names)
72 48
         else:
73
-            cfg.CONF.register_opts(SWITCHES, 'l3_brocade_fi_ni')
74
-            self._brocade_switches = (cfg.CONF.l3_brocade_fi_ni.
49
+            self._brocade_switches = (cfg.CONF.l3_brocade_mlx.
75 50
                                       switch_names)
76 51
         switches = self._brocade_switches.split(',')
77 52
         for switch in switches:
78 53
             switch_info = {}
79 54
             switch = switch.strip()
80
-            cfg.CONF.register_opts(ML2_BROCADE, switch)
81 55
             for key, value in cfg.CONF._get(switch).items():
82 56
                 value = value.strip()
83 57
                 switch_info.update({key: value})
@@ -90,6 +64,8 @@ class ML2BrocadeConfig(object):
90 64
                         switch_names.append(switch)
91 65
 
92 66
                     self._physnet_dict.update({value: switch_names})
93
-
67
+            if not isL2:
68
+                switch_info.update({'transport': 'SSH'})
69
+                switch_info.update({'ostype': 'NI'})
94 70
             self._brocade_dict.update({switch: switch_info})
95 71
         return self._brocade_dict, self._physnet_dict

Loading…
Cancel
Save