added calls to check if the network is public

 (used to only check ifnetwork was on your project)
You could do:

    if node.project.label not in network.project.label, "public":
        ...

Though I'm ambivalent as to which is better.

Quoting Jonathan Bell (2014-09-24 18:51:33)
>    In haas/api.py:
> > @@ -410,8 +410,9 @@ def node_connect_network(node, nic, network):
> >      if not node.project:
> >          raise ProjectMismatchError("Node not in project")
> >
> > -    if node.project.label is not network.project.label:
> > -        raise ProjectMismatchError("Node and network in different projects")
> > +    if node.project.label != network.project.label:
> > +        if network.project.label != "public":
> 
>    [1]@gsilvis did not want the statement longer than ~80 characters, with
>    the and it was over 100. That is why I nested
> 
>    --
>    Reply to this email directly or [2]view it on GitHub.
> 
> References
> 
>    1. https://github.com/gsilvis
>    2. https://github.com/CCI-MOC/haas/pull/259/files#r18005806