"""Defines Hello message."""

# System imports

# Third-party imports

from pyof.foundation.base import GenericMessage
from pyof.v0x01.common.header import Header, Type

__all__ = ('Hello',)

# Classes


class Hello(GenericMessage):
    """OpenFlow Hello Message.

    This message does not contain a body beyond the OpenFlow Header.
    """

    header = Header(message_type=Type.OFPT_HELLO, length=8)

"""Defines Hello message."""

# System imports

# Third-party imports

from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import BinaryData
from pyof.v0x01.common.header import Header, Type

__all__ = ('Hello',)

# Classes


class Hello(GenericMessage):
    """OpenFlow Hello Message.

    This message does not contain a body beyond the OpenFlow Header.
    """

    header = Header(message_type=Type.OFPT_HELLO, length=8)
    elements = BinaryData()

Add optional elements in v0x01 Hello
Add optional elements in v0x01 Hello

For spec compliance. Ignore the elements as they're not used.
Fix #379

  """Defines Hello message."""
  
  # System imports
  
  # Third-party imports
  
  from pyof.foundation.base import GenericMessage
+ from pyof.foundation.basic_types import BinaryData
  from pyof.v0x01.common.header import Header, Type
  
  __all__ = ('Hello',)
  
  # Classes
  
  
  class Hello(GenericMessage):
      """OpenFlow Hello Message.
  
      This message does not contain a body beyond the OpenFlow Header.
      """
  
      header = Header(message_type=Type.OFPT_HELLO, length=8)
+     elements = BinaryData()
  
Add optional elements in v0x01 Hello
## Code Before:
"""Defines Hello message."""

# System imports

# Third-party imports

from pyof.foundation.base import GenericMessage
from pyof.v0x01.common.header import Header, Type

__all__ = ('Hello',)

# Classes


class Hello(GenericMessage):
    """OpenFlow Hello Message.

    This message does not contain a body beyond the OpenFlow Header.
    """

    header = Header(message_type=Type.OFPT_HELLO, length=8)

## Instruction:
Add optional elements in v0x01 Hello
## Code After:
"""Defines Hello message."""

# System imports

# Third-party imports

from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import BinaryData
from pyof.v0x01.common.header import Header, Type

__all__ = ('Hello',)

# Classes


class Hello(GenericMessage):
    """OpenFlow Hello Message.

    This message does not contain a body beyond the OpenFlow Header.
    """

    header = Header(message_type=Type.OFPT_HELLO, length=8)
    elements = BinaryData()
