Skip to content

Commit

Permalink
Use new validate_port_spec to validate port spec
Browse files Browse the repository at this point in the history
(Instead of validate_ports.  validate_port_spec validates the port
specifications that can be specified on the calicoctl command line. This
is different from validate_ports, which validates the port values that
can occur in the etcd data model.)
  • Loading branch information
Neil Jerram authored and Neil Jerram committed May 6, 2016
1 parent ed04213 commit ca74fa5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions calicoctl/calico_ctl/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
from connectors import client, DOCKER_URL
from utils import print_paragraph, DOCKER_LIBNETWORK_VERSION
from pycalico.datastore_datatypes import Profile
from pycalico.util import (validate_characters, validate_ports,
from pycalico.util import (validate_characters, validate_port_spec,
validate_icmp_type, validate_cidr, validate_cidr_versions)


Expand Down Expand Up @@ -131,7 +131,7 @@ def validate_arguments(arguments):
ports_ok = True
for arg in ["<SRCPORTS>", "<DSTPORTS>"]:
if arguments.get(arg) is not None:
ports_ok = validate_ports(arguments[arg])
ports_ok = validate_port_spec(arguments[arg])
if not ports_ok:
break

Expand Down

0 comments on commit ca74fa5

Please sign in to comment.