def set_all_vlan_states(self, nexus_host, vlanid_range):
starttime = time.time()<EOL>if not vlanid_range:<EOL><INDENT>LOG.warning("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>return<EOL><DEDENT>vlan_id_list = re.sub(r'<STR_LIT>', '<STR_LIT>', vlanid_range).split('<STR_LIT:U+002C>')<EOL>if not vlan_id_list or not vlan_id_list[<NUM_LIT:0>]:<EOL><INDENT>LOG.warning("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>return<EOL><DEDENT>path_str, body_vlan_all = self.start_create_vlan()<EOL>while vlan_id_list:<EOL><INDENT>rangev = vlan_id_list.pop(<NUM_LIT:0>)<EOL>if '<STR_LIT:->' in rangev:<EOL><INDENT>fr, to = rangev.split('<STR_LIT:->')<EOL>max = int(to) + <NUM_LIT:1><EOL>for vlan_id in range(int(fr), max):<EOL><INDENT>body_vlan_all = self.get_create_vlan(<EOL>nexus_host, vlan_id, <NUM_LIT:0>, body_vlan_all)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>body_vlan_all = self.get_create_vlan(<EOL>nexus_host, rangev, <NUM_LIT:0>, body_vlan_all)<EOL><DEDENT><DEDENT>body_vlan_all = self.end_create_vlan(body_vlan_all)<EOL>self.send_edit_string(<EOL>nexus_host, path_str, body_vlan_all)<EOL>self.capture_and_print_timeshot(<EOL>starttime, "<STR_LIT>",<EOL>switch=nexus_host)<EOL>
Set the VLAN states to active.