You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by brosander <gi...@git.apache.org> on 2016/12/12 15:57:53 UTC

[GitHub] nifi-minifi pull request #64: MINIFI-153 - Adding proxy settings to remote p...

GitHub user brosander opened a pull request:

    https://github.com/apache/nifi-minifi/pull/64

    MINIFI-153 - Adding proxy settings to remote process group

    Thank you for submitting a contribution to Apache NiFi - MiNiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with MINIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi-minifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [x] - N/A - If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [x] - N/A - If applicable, have you updated the LICENSE file, including the main LICENSE file under minifi-assembly?
    - [x] - N/A - If applicable, have you updated the NOTICE file, including the main NOTICE file found under minifi-assembly?
    
    ### For documentation related changes:
    - [x] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/brosander/nifi-minifi MINIFI-153-rebase

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-minifi/pull/64.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #64
    
----
commit 190cb4b52c0636543b9b415cb975c2c4cddebd6a
Author: Bryan Rosander <br...@apache.org>
Date:   2016-12-06T14:59:31Z

    MINIFI-153 - Adding proxy settings to remote process group

----


---
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.
---

[GitHub] nifi-minifi pull request #64: MINIFI-153 - Adding proxy settings to remote p...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/64#discussion_r92008401
  
    --- Diff: minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessGroupSchema.java ---
    @@ -78,9 +80,14 @@ public RemoteProcessGroupSchema(Map map) {
             yieldPeriod = getOptionalKeyAsType(map, YIELD_PERIOD_KEY, String.class, wrapperName, DEFAULT_YIELD_PERIOD);
             transportProtocol = getOptionalKeyAsType(map, TRANSPORT_PROTOCOL_KEY, String.class, wrapperName, DEFAULT_TRANSPORT_PROTOCOL);
     
    -        if (!transportProtocolOptions.valid(transportProtocol)){
    +        if (!TransportProtocolOptions.valid(transportProtocol)){
                 addValidationIssue(TRANSPORT_PROTOCOL_KEY, wrapperName, "it must be either 'RAW' or 'HTTP' but is '" + transportProtocol + "'");
             }
    +
    +        proxyHost = getOptionalKeyAsType(map, PROXY_HOST_KEY, String.class, wrapperName, DEFAULT_PROXY_HOST);
    --- End diff --
    
    I believe we should add some more validation checks here. Such as if the host or port is set then the other must be. Also if username is set then password is set. Thoughts?


---
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.
---

[GitHub] nifi-minifi pull request #64: MINIFI-153 - Adding proxy settings to remote p...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-minifi/pull/64


---
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.
---

[GitHub] nifi-minifi pull request #64: MINIFI-153 - Adding proxy settings to remote p...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/64#discussion_r92008152
  
    --- Diff: minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/RemoteProcessGroupSchema.java ---
    @@ -91,6 +98,10 @@ public RemoteProcessGroupSchema(Map map) {
             result.put(TIMEOUT_KEY, timeout);
             result.put(YIELD_PERIOD_KEY, yieldPeriod);
             result.put(TRANSPORT_PROTOCOL_KEY, transportProtocol);
    +        result.put(PROXY_HOST_KEY, proxyHost);
    +        result.put(PROXY_PORT_KEY, proxyPort == null ? "" : proxyPort);
    --- End diff --
    
    Why is Port the only one with a null check?


---
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.
---

[GitHub] nifi-minifi pull request #64: MINIFI-153 - Adding proxy settings to remote p...

Posted by JPercivall <gi...@git.apache.org>.
Github user JPercivall commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/64#discussion_r92000958
  
    --- Diff: minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/v2/RemoteProcessGroupSchemaV2.java ---
    @@ -0,0 +1,101 @@
    +/*
    + * 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.nifi.minifi.commons.schema.v2;
    +
    +import org.apache.nifi.minifi.commons.schema.RemoteInputPortSchema;
    +import org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema;
    +import org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.TransportProtocolOptions;
    +import org.apache.nifi.minifi.commons.schema.common.BaseSchema;
    +import org.apache.nifi.minifi.commons.schema.common.BaseSchemaWithIdAndName;
    +import org.apache.nifi.minifi.commons.schema.common.ConvertableSchema;
    +
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.Map;
    +
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.DEFAULT_COMMENT;
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.DEFAULT_TIMEOUT;
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.DEFAULT_TRANSPORT_PROTOCOL;
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.DEFAULT_YIELD_PERIOD;
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.TIMEOUT_KEY;
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.TRANSPORT_PROTOCOL_KEY;
    +import static org.apache.nifi.minifi.commons.schema.RemoteProcessGroupSchema.URL_KEY;
    +import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.COMMENT_KEY;
    +import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.INPUT_PORTS_KEY;
    +import static org.apache.nifi.minifi.commons.schema.common.CommonPropertyKeys.YIELD_PERIOD_KEY;
    +
    +public class RemoteProcessGroupSchemaV2 extends BaseSchema implements ConvertableSchema<RemoteProcessGroupSchema> {
    +    private BaseSchemaWithIdAndName idAndName;
    +    private String url;
    +    private List<RemoteInputPortSchema> inputPorts;
    +
    +    private String comment = DEFAULT_COMMENT;
    +    private String timeout = DEFAULT_TIMEOUT;
    +    private String yieldPeriod = DEFAULT_YIELD_PERIOD;
    +    private String transportProtocol = DEFAULT_TRANSPORT_PROTOCOL;
    +
    +    public RemoteProcessGroupSchemaV2(Map map) {
    +        idAndName = new BaseSchemaWithIdAndName(map, "RemoteProcessGroup(id: {id}, name: {name})");
    --- End diff --
    
    Why was "abstract" removed from BaseSchemaWithIdAndName and instantiated here instead of just extending it like other schemas do?


---
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.
---