- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-10-2017 04:39 AM
Hello,
I have a problem when trying to use the API with https instead of http.
When I replace the http://<netmri> url in the Perl new method by https://<netmri>, I get the following message:
HTTP 501 Protocol scheme 'https' is not supported (Crypt:SLeay or IO:
ocket:
SL not installed) https://ncb1721.nw.shared.fortis/api/base_uri.json?version=2.9.0 at /appl/dcnvp00/Common/Scripts/Tools/NMS/lib/BNP_API2.pm line 148
I have read in the release notes that in a future release, http will not be supported anymore (and I suppose this will be the case for accessing the API - I use the API outside the NetMRI solution on a Red-Hat machine).
Does anybody know what I have to do to make it use https ?
Note: I already use https for accessing the GUI.
Thanks in advance for any advice.
Bernard Baudoux.
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-11-2017 07:44 AM
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-12-2017 09:20 AM
You add this to your script
# comment this out if you are running HTTP only
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-17-2017 05:28 AM
I though these modules would be installed by default on the NetMRI box. Am I wrong ?
Thanks.
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-17-2017 05:30 AM
Thanks, I will try to add this statement in my script.
Is it to be performed in every script ?
Thanks,
Bernard.
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-17-2017 07:09 AM
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-17-2017 07:11 AM
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-17-2017 03:28 PM
It would also help if you posted the script
Twitter: https://twitter.com/sifbaksh
https://sifbaksh.com
Re: how to use HTTPS with NetMRI API
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
10-18-2017 11:02 PM
the script just tries to open the API. Here is the coding:
sub OpenAPI
{
my $Yml = '/appl/dcnvp00/Common/Scripts/Tools/NMS/etc/.netmri.yml';
my ($foo, $Username, $foo) = split(/ /, `grep username $Yml`); chomp($Username);
my ($foo, $Password, $foo) = split(/ /, `grep password $Yml`); chomp($Password);
my ($foo, $URL, $foo) = split(/ /, `grep url $Yml`); chomp($URL);
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
$easy = new NetMRI::API({
api_version => 2.9,
url => $URL,
username => $Username,
password => $Password,
});
return($easy);
}
I get the error mesage at the "new" line.
It runs indeed on an external Rad Hat machine, but I think http code 501 is at server level, am I wrong ? Red Hat is just the client.
Thanks,
Bernard.