'Create a new Spinnaker HttpAgent talking to the specified server port.
Args:
name:[string] The name of agent we are creating for reporting only.
status_factory: [SpinnakerStatus (SpinnakerAgent, HttpResponseType)]
Factory method for creating specialized SpinnakerStatus instances.
bindings: [dict] Specify how to connect to the server.
The actual parameters used depend on the hosting platform.
The hosting platform is specified with \'host_platform\'
port: [int] The port of the endpoint we want to connect to.
Returns:
A SpinnakerAgent connected to the specified instance port.'

@classmethod
def new_instance_from_bindings(cls, name, status_factory, bindings, port):

    host_platform = cls.__determine_host_platform(bindings)
    if (host_platform == 'native'):
        base_url = (None if (not bindings['NATIVE_HOSTNAME']) else 'http://{host}:{port}'.format(host=bindings['NATIVE_HOSTNAME'], port=(bindings['NATIVE_PORT'] or port)))
        return cls.new_native_instance(name, status_factory=status_factory, base_url=base_url)
    if (host_platform == 'gce'):
        return cls.new_gce_instance_from_bindings(name, status_factory, bindings, port)
    raise ValueError('Unknown    host_platform={0}'.format(host_platform))
