code: def create_open_msg(self):
          
          asnum = self.local_as
          # If local AS number is not Two-Octet AS number, swaps with AS_TRANS.
          if not is_valid_old_asn(asnum):
              asnum = bgp.AS_TRANS
          bgpid = self._common_conf.router_id
          holdtime = self._neigh_conf.hold_time
  
          def flatten(L):
              if isinstance(L, list):
                  for i in range(len(L)):
                      for e in flatten(L[i]):
                          yield e
              else:
                  yield L
          opts = list(flatten(
              list(self._neigh_conf.get_configured_capabilities().values())))
          open_msg = BGPOpen(
              my_as=asnum,
              bgp_identifier=bgpid,
              version=const.BGP_VERSION_NUM,
              hold_time=holdtime,
              opt_param=opts
          )
          return open_msg
docs: Create `Open` message using current settings.
  
          Current setting include capabilities, timers and ids.