Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Merged
Merge request !273 opened Nov 13, 2014 by Őry Máté@orymate 
  • Report abuse
Report abuse

Feature network gui improvements

  • closes #358 (closed) Automatically select a free ipv4 address based on vlan (host creation)
  • closes #357 (closed) Automatically generate ipv6 address from ipv4 (host creation/edit)
  • closes #354 (closed) MAC address autocomplete
  • closes #360 (closed) Add sensible default and help_text to Vlan.ipv6_template
  • Discussion 7
  • Commits 24
  • Changes
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Őry Máté @orymate

    Added 1 new commit:

    • 6299201d - firewall: add sensible default and help_text to Vlan.ipv6_template
    Nov 13, 2014

    Added 1 new commit:

    • 6299201d - firewall: add sensible default and help_text to Vlan.ipv6_template
    Added 1 new commit: * 6299201dab8 - firewall: add sensible default and help_text to Vlan.ipv6_template
    Toggle commit list
  • Guba Sándor
    @gubasandor started a discussion on commit 6299201d Nov 13, 2014
    circle/firewall/models.py
    396 super(Vlan, self).clean()
    397 if self.ipv6_template:
    398 if not self.network6:
    399 raise ValidationError(
    400 _("You cannot specify an IPv6 template if there is no "
    401 "IPv6 network set."))
    402 for i in (self.network4[1], self.network4[-1]):
    403 i6 = self.convert_ipv4_to_ipv6(i)
    404 if i6 not in self.network6:
    405 raise ValidationError(
    406 _("%(ip6)s (translated from %(ip4)s) is outside of "
    407 "the IPv6 network.") % {"ip4": i, "ip6": i6})
    408 if not self.ipv6_template and self.network6:
    409 # come up with some sensible default
    410 self.ipv6_template = self._magic_ipv6_template()
    411 host4_bytes = int(ceil((32 - self.network4.prefixlen) / 8))
    • Guba Sándor @gubasandor commented Nov 13, 2014
      Owner

      32.0

      Edited Nov 13, 2014
      ~~32.0~~
    Please register or sign in to reply
  • Guba Sándor
    @gubasandor started a discussion on commit 6299201d Nov 13, 2014
    Last updated by Őry Máté Nov 13, 2014
    circle/firewall/models.py
    365 366 ipv6_template = models.TextField(
    366 validators=[val_ipv6_template],
    367 verbose_name=_('ipv6 template'),
    368 default="2001:738:2001:4031:%(b)d:%(c)d:%(d)d:0")
    367 blank=True,
    368 help_text=_('Template for translating IPv4 addresses to IPv6. '
    369 'Automatically generated hosts in dual-stack networks '
    370 'will get this address. The template '
    371 'can contain four tokens: "%(a)d", "%(b)d", '
    372 '"%(c)d", and "%(d)d", representing the four bytes '
    373 'of the IPv4 address, respectively, in decimal notation. '
    374 'Moreover you can use any standard printf format '
    375 'specification like %(a)02x to get the first byte as two '
    376 'hexadecimal digits. Usual choices for mapping '
    377 '198.51.100.0/24 to 2001:0DB8:1:1::/64 would be '
    378 '"2001:0DB8:51:1:1:%(d)d::" and '
    • Guba Sándor @gubasandor commented Nov 13, 2014
      Owner

      "2001:0DB8:1:1:%(d)d::"

      Edited Nov 13, 2014
      ~~"2001:0DB8:1:1:%(d)d::"~~
    • Őry Máté @orymate commented Nov 13, 2014
      Owner
      >>> Vlan._magic_ipv6_template(IPNetwork("198.51.100.0/24"),
      ...                           IPNetwork("2001:0DB8:1:1::/64"))
      '2001:db8:1:1:%(d)d::'
      >>> Vlan._magic_ipv6_template(IPNetwork("198.51.100.0/24"),
      ...                           IPNetwork("2001:0DB8:1:1::/64"), 0)
      '2001:db8:1:1:%(d)02x00::'
      Edited Nov 13, 2014
      ```python >>> Vlan._magic_ipv6_template(IPNetwork("198.51.100.0/24"), ... IPNetwork("2001:0DB8:1:1::/64")) '2001:db8:1:1:%(d)d::' >>> Vlan._magic_ipv6_template(IPNetwork("198.51.100.0/24"), ... IPNetwork("2001:0DB8:1:1::/64"), 0) '2001:db8:1:1:%(d)02x00::' ```
    Please register or sign in to reply
  • Őry Máté @orymate

    Added 1 new commit:

    • 059593b1 - firewall: fix _magic_ipv6_template()
    Nov 13, 2014

    Added 1 new commit:

    • 059593b1 - firewall: fix _magic_ipv6_template()
    Added 1 new commit: * 059593b1177 - firewall: fix _magic_ipv6_template()
    Toggle commit list
  • Kálmán Viktor
    @kviktor started a discussion on an old version of the diff Nov 13, 2014
    circle/network/forms.py
    122 122 Fieldset(
    123 123 _('Network'),
    124 124 'vlan',
    125 'ipv4',
    126 'ipv6',
    125 AppendedText('ipv4',
    • Kálmán Viktor @kviktor commented Nov 13, 2014
      Owner

      FieldWithButtons? thx

      Edited Nov 13, 2014
      ~~FieldWithButtons?~~ thx
    Please register or sign in to reply
  • Őry Máté @orymate

    Added 1 new commit:

    • 5f05e808 - firewall: fix tests
    Nov 13, 2014

    Added 1 new commit:

    • 5f05e808 - firewall: fix tests
    Added 1 new commit: * 5f05e808eff - firewall: fix tests
    Toggle commit list
  • Őry Máté @orymate

    Added 2 new commits:

    • 7afb202a - network: use FieldWithButtons in HostForm
    • 435f4556 - network: add magic button to ipv6_template
    Nov 13, 2014

    Added 2 new commits:

    • 7afb202a - network: use FieldWithButtons in HostForm
    • 435f4556 - network: add magic button to ipv6_template
    Added 2 new commits: * 7afb202acbe - network: use FieldWithButtons in HostForm * 435f455689a - network: add magic button to ipv6_template
    Toggle commit list
  • Kálmán Viktor @kviktor commented Nov 14, 2014
    Owner

    +1

    • title for the wizard button? 7557f6
    • dot notation in JS? b7cfe6a7
    Edited Nov 14, 2014
    +1 * ~~title for the wizard button?~~ 7557f6 * ~~dot notation in JS?~~ b7cfe6a
  • Őry Máté @orymate

    Added 6 new commits:

    • 4a7515c4 - network: related field if changed by magic
    • 85539a1f - firewall: magically compute host_ipv6_prefixlen too
    • 1838f416 - firewall: refactor magic
    • 4e337898 - network: fix magic at HostDetail view
    • b7cfe6a7 - network: use dot notation in js
    • 7557f6c4 - network: add titles to magic buttons
    Nov 14, 2014

    Added 6 new commits:

    • 4a7515c4 - network: related field if changed by magic
    • 85539a1f - firewall: magically compute host_ipv6_prefixlen too
    • 1838f416 - firewall: refactor magic
    • 4e337898 - network: fix magic at HostDetail view
    • b7cfe6a7 - network: use dot notation in js
    • 7557f6c4 - network: add titles to magic buttons
    Added 6 new commits: * 4a7515c4120 - network: related field if changed by magic * 85539a1f77c - firewall: magically compute host_ipv6_prefixlen too * 1838f4169fc - firewall: refactor magic * 4e337898c18 - network: fix magic at HostDetail view * b7cfe6a7d9c - network: use dot notation in js * 7557f6c4db5 - network: add titles to magic buttons
    Toggle commit list
  • Őry Máté @orymate

    Added 1 new commit:

    • 23d85db4 - network: add host creation butotn to VlanDetail
    Nov 14, 2014

    Added 1 new commit:

    • 23d85db4 - network: add host creation butotn to VlanDetail
    Added 1 new commit: * 23d85db4ecc - network: add host creation butotn to VlanDetail
    Toggle commit list
  • Kálmán Viktor
    @kviktor started a discussion on commit 7557f6c4 Nov 14, 2014
    • Kálmán Viktor @kviktor

      mentioned in merge request !273 (merged)

      Nov 14, 2014

      mentioned in merge request !273 (merged)

      mentioned in merge request !273
      Toggle commit list
    Please register or sign in to reply
  • Kálmán Viktor
    @kviktor started a discussion on commit b7cfe6a7 Nov 14, 2014
    • Kálmán Viktor @kviktor

      mentioned in merge request !273 (merged)

      Nov 14, 2014

      mentioned in merge request !273 (merged)

      mentioned in merge request !273
      Toggle commit list
    Please register or sign in to reply
  • Guba Sándor
    @gubasandor started a discussion on the diff Nov 14, 2014
    circle/firewall/models.py
    851 959 else:
    852 960 raise WorkerNotFound()
    853 961  
    962 @method_cache(20)
    963 def get_dhcp_clients(self):
    964 try:
    965 return get_dhcp_clients.apply_async(
    966 queue=self.get_remote_queue_name(), expires=60).get(timeout=2)
    967 except TimeoutError:
    • Guba Sándor @gubasandor commented Nov 14, 2014
      Owner

      Handle other Exceptions 669402

      Edited Nov 14, 2014
      ~~Handle other Exceptions~~ 669402
    Please register or sign in to reply
  • Guba Sándor @gubasandor commented Nov 14, 2014
    Owner

    👍

    :+1:
  • Őry Máté @orymate

    Added 1 new commit:

    • 6694020e - firewall: handle get_dhcp_clients' remote exceptions
    Nov 14, 2014

    Added 1 new commit:

    • 6694020e - firewall: handle get_dhcp_clients' remote exceptions
    Added 1 new commit: * 6694020e8dc - firewall: handle get_dhcp_clients' remote exceptions
    Toggle commit list
  • Guba Sándor
    @gubasandor started a discussion on commit 6694020e Nov 14, 2014
    • Guba Sándor @gubasandor

      mentioned in merge request !273 (merged)

      Nov 14, 2014

      mentioned in merge request !273 (merged)

      mentioned in merge request !273
      Toggle commit list
    Please register or sign in to reply
  • Őry Máté @orymate

    mentioned in commit f08c1e86

    Feb 23, 2015

    mentioned in commit f08c1e86

    mentioned in commit f08c1e860c919f9ea8161e2f8e5d06b674b28cf9
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
3
3 participants
Reference: circle/cloud!273