This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from json import dumps | |
from os import environ | |
import sys | |
import requests | |
def inventory(servers): | |
hostvars = dict((server['name'], {'ansible_host': address['address']}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Puppet::Type.type(:vs_port).provider(:ovs) do | |
before :each do | |
# Set up stubs for provider checks | |
# described_class.stubs(:command).with(:vsctl).returns '/usr/bin/ovs-vsctl' | |
# Set up command stubs, this does not seem to work, or the arguments are wrong? | |
described_class.stubs(:vsctl).with('get' 'Port' 'eth0', 'interfaces').returns('[cec1ef5a-6281-41d0-8d8a-39610f8f89aa]') | |
# provider.class.stubs(:vsctl).with([]).returns('') |