Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy support #309

Closed
wants to merge 5 commits into from
Closed

Proxy support #309

wants to merge 5 commits into from

Conversation

kivio
Copy link
Contributor

@kivio kivio commented Jun 16, 2015

Added possibility to configure proxy on VM when setup must stay behind the proxy server.

@kivio kivio mentioned this pull request Jun 16, 2015

class YumMixin(BasePackageMixin):

def Startup(self):
"""Eliminates the need to have a tty to run sudo commands."""
if FLAGS.http_proxy or FLAGS.https_proxy:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or FLAGS.ftp_proxy

@klausw klausw self-assigned this Jun 16, 2015
@skschneider skschneider added P2 and removed P2 labels Jun 16, 2015
@klausw
Copy link
Contributor

klausw commented Jun 17, 2015

FYI, review comments are intended as suggestions - we don't want the review process to turn into a barrier to contributions. Feel free to push back on requests and/or ask us to take care of issues.

@kivio
Copy link
Contributor Author

kivio commented Jun 19, 2015

OK, i think now it looks good

@klausw
Copy link
Contributor

klausw commented Jun 19, 2015

LGTM, thanks for making the changes. @cmccoy , any comments from your side?

@klausw klausw added the LGTM label Jun 19, 2015
@klausw
Copy link
Contributor

klausw commented Jun 19, 2015

test this please

@kivio
Copy link
Contributor Author

kivio commented Jun 22, 2015

OK, i was added documentation now.

In subject of test, i have that environment in my work then proxy works good, do you think about unit tests?

@cmccoy
Copy link
Contributor

cmccoy commented Jun 22, 2015

LGTM. There are going to be some merge conflicts due to #321. Let us know if we can help.

@klausw
Copy link
Contributor

klausw commented Jun 23, 2015

Working on the merge now - seeing some lint errors from flake8, I'll take care of them.

@klausw
Copy link
Contributor

klausw commented Jun 23, 2015

I've merged this manually to the dev branch, but this didn't work right since it erroneously applied changes to the deleted
package_managers.py file instead of the new linux_virtual_machine.py file. Working on #337 , please wait for that before continuing. I'll update this thread once that's done.

@klausw
Copy link
Contributor

klausw commented Jun 23, 2015

The dev branch is now up to date. I had combined your patches into the single change d0ebc16 with no modifications, then followed up with the two fixup changes - in case you run into merge conflicts, you could try cherry picking those separately on top of your original changes.

Also, can you please verify that things work right for you? I had slightly changed the logic as part of the move to take better advantage of inheritance, it should be equivalent but I could only do limited testing.
(I get the expected connection errors from apt when setting a nonexistent --http_proxy.)

For reference:

commit b8e2771b0d66a2d8ed2845601e9f03f097380e93
Author: Klaus Weidner <klausw@google.com>
Date:   Tue Jun 23 11:39:57 2015 -0700

    Proxy config fixup for bad merge.

    The previous proxy config patch erroneously applied changes to the deleted
    file package_managers.py, reviving it in the process. Delete it again, and
    apply its changes to linux_virtual_machine.py.

commit 6c061d2475312c88742e5c605ce6e94525c34fae
Author: Klaus Weidner <klausw@google.com>
Date:   Tue Jun 23 10:45:47 2015 -0700

    Lint fixes for proxy configuration.

    Minor doc edits, fix some over-long lines, and use the ElementTree prefix
    instead of directly importing functions into the toplevel namespace.

commit d0ebc1699b04b22dd7fab0bbe73808e5485ab8c3
Author: Marcin Karkocha <kivio@kivio.pl>
Date:   Tue Jun 23 10:41:59 2015 -0700

    Add support for using proxies in the cloud environment.

    This introduces new flags --http_proxy, --https_proxy and --ftp_proxy.
    The flag values use the same syntax as the corresponding environment variables,
    for example `--http_proxy=proxy.example.com:8080` .

    See README.md for additional information.

@klausw klausw closed this Jun 23, 2015
@kivio kivio deleted the proxy_support branch September 7, 2015 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants