brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aledsage <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #276: Effector for opening inbound ports in sec...
Date Wed, 24 Aug 2016 00:07:57 GMT
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/276#discussion_r75974892
  
    --- Diff: locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/networking/NetworkingEffectors.java
---
    @@ -0,0 +1,100 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + */
    +package org.apache.brooklyn.location.jclouds.networking;
    +
    +import com.google.common.base.Optional;
    +import com.google.common.base.Preconditions;
    +import com.google.common.collect.ImmutableList;
    +import com.google.common.collect.Range;
    +import com.google.common.reflect.TypeToken;
    +import org.apache.brooklyn.api.effector.Effector;
    +import org.apache.brooklyn.api.location.Location;
    +import org.apache.brooklyn.config.ConfigKey;
    +import org.apache.brooklyn.core.config.ConfigKeys;
    +import org.apache.brooklyn.core.effector.EffectorBody;
    +import org.apache.brooklyn.core.effector.Effectors;
    +import org.apache.brooklyn.location.jclouds.JcloudsMachineLocation;
    +import org.apache.brooklyn.util.collections.MutableList;
    +import org.apache.brooklyn.util.core.config.ConfigBag;
    +import org.apache.brooklyn.util.net.Cidr;
    +import org.apache.brooklyn.util.net.Networking;
    +import org.jclouds.net.domain.IpPermission;
    +import org.jclouds.net.domain.IpProtocol;
    +
    +import java.util.List;
    +
    +import static com.google.common.base.Predicates.instanceOf;
    +import static com.google.common.collect.Iterables.tryFind;
    +import static org.apache.brooklyn.core.location.Locations.getLocationsCheckingAncestors;
    +
    +public class NetworkingEffectors {
    --- End diff --
    
    Worth including `@beta`, I think.
    
    I was imagining that we could tell it to open certain TCP ports and certain UDP ports
in a single effector call. But I see that your approach works (one can make multiple effector
calls), and is probably simpler than having a map from protocol to a list of port ranges (or
whatever scheme one comes up with). So I'm happy with this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message