Simulates a physical press of the server power button.

        :param pushType: Type of power button press to simulate
                         Supported values are: 'Press' and 'PressAndHold'
        :raises: IloError, on an error from iLO.
339693
def _press_pwr_btn(self, pushType="Press"):
        
        power_settings = {"Action": "PowerButton",
                          "Target": "/Oem/Hp",
                          "PushType": pushType}

        systems_uri = "/rest/v1/Systems/1"

        status, headers, response = self._rest_post(systems_uri, None,
                                                    power_settings)
        if status >= 300:
            msg = self._get_extended_error(response)
            raise exception.IloError(msg)
760492
function(key, value, type) {
      var u = user.user_id;
      var appId = '';
      if ($ionicCoreSettings.get('app_id')) {
        appId = $ionicCoreSettings.get('app_id')
      } else {
        appId = $ionicApp.getId();
      }
      if(!u) {
        throw new Error("Please call identify with a user_id before calling push");
      }
      var o = {};
      o['user_id'] = u;
      o[key] = value;

      return $http.post($ionicApp.getApiUrl() + '/api/v1/app/' + appId + '/users/' + type, o);
    }
224114
def push(self, id):
        ""
        conn = session['connections'].get(id, None)
        if conn:
            msgs = simplejson.loads(request.body)
            for msg in msgs:
                try:
                    cmd = msg.pop(0).upper()
                    assert ' ' not in cmd, "Bad message"
                    if cmd in ('USER', ):
                        sufix = " :"+msg.pop()
                    else:
                        sufix = ''
                    assert not [i for i in msg if ' ' in i], "Bad message"

                    print 'PUSH:', (cmd, msg, sufix)

                    if msg:
                        payload = "%s %s%s\r\n" % (cmd, ' '.join(msg), sufix)
                    else:
                        payload = "%s%s\r\n" % (cmd, sufix)
                    yield request.environ['cogen.call'](conn.sock.sendall)(
                            payload.encode('utf-8'))
                    if isinstance(request.environ['cogen.wsgi'].result, Exception):
                        yield simplejson.dumps(('', 'ERROR', str(e)))
                    else:
                        yield simplejson.dumps(('', 'PUSH_OK', ''))
                except Exception, e:
                    yield simplejson.dumps(('', 'ERROR', str(e)))
        else:
            yield simplejson.dumps(('', 'ERROR', 'Invalid connection id.'))
835091
def payload_register(ptype, klass, pid):
    
    cmd = ['payload-register']
    for x in [ptype, klass, pid]:
        cmd.append(x)
    subprocess.check_call(cmd)
814705
function pushToken(type, value, column) {
    tokens.push({
      tn: tn++,
      ln: ln,
      col: column,
      type: type,
      value: value
    });
  }
37085
private static void pushStackType(Scope scope, BytecodeBlock block, Type sqlType, BytecodeBlock getBlockBytecode, Class<?> parameter, CallSiteBinder callSiteBinder)
    {
        Variable position = scope.getVariable("position");
        if (parameter == long.class) {
            block.comment("%s.getLong(block, position)", sqlType.getTypeSignature())
                    .append(constantType(callSiteBinder, sqlType))
                    .append(getBlockBytecode)
                    .append(position)
                    .invokeInterface(Type.class, "getLong", long.class, Block.class, int.class);
        }
        else if (parameter == double.class) {
            block.comment("%s.getDouble(block, position)", sqlType.getTypeSignature())
                    .append(constantType(callSiteBinder, sqlType))
                    .append(getBlockBytecode)
                    .append(position)
                    .invokeInterface(Type.class, "getDouble", double.class, Block.class, int.class);
        }
        else if (parameter == boolean.class) {
            block.comment("%s.getBoolean(block, position)", sqlType.getTypeSignature())
                    .append(constantType(callSiteBinder, sqlType))
                    .append(getBlockBytecode)
                    .append(position)
                    .invokeInterface(Type.class, "getBoolean", boolean.class, Block.class, int.class);
        }
        else if (parameter == Slice.class) {
            block.comment("%s.getSlice(block, position)", sqlType.getTypeSignature())
                    .append(constantType(callSiteBinder, sqlType))
                    .append(getBlockBytecode)
                    .append(position)
                    .invokeInterface(Type.class, "getSlice", Slice.class, Block.class, int.class);
        }
        else {
            block.comment("%s.getObject(block, position)", sqlType.getTypeSignature())
                    .append(constantType(callSiteBinder, sqlType))
                    .append(getBlockBytecode)
                    .append(position)
                    .invokeInterface(Type.class, "getObject", Object.class, Block.class, int.class);
        }
    }
817140
def ask(type, payload):
    
    async def _produce():
        # notify the user that we were successful
        print("Dispatching action with type {}...".format(type))
        # fire an action with the given values
        response = await producer.ask(action_type=type, payload=payload)
        # show the user the reply
        print(response)

    # create a producer
    producer = ActionHandler()
    # start the producer
    producer.start()

    # get the current event loop
    loop = asyncio.get_event_loop()

    # run the production sequence
    loop.run_until_complete(_produce())

    # start the producer
    producer.stop()
127620
def press_pwr_btn(self):
        
        sushy_system = self._get_sushy_system(PROLIANT_SYSTEM_ID)
        try:
            sushy_system.push_power_button(sys_cons.PUSH_POWER_BUTTON_PRESS)
        except sushy.exceptions.SushyError as e:
            msg = (self._('The Redfish controller failed to press power button'
                          ' of server. Error %(error)s') %
                   {'error': str(e)})
            LOG.debug(msg)
            raise exception.IloError(msg)
254347
public void setRespondToPayloadType(String respondToPayloadType) throws UnsupportedPayloadType {
    // Sanity check on the payload type values. Should be XML or JSON
    // If the probe goes out with a bad value here, then the Responder may have
    // problems
    if (respondToPayloadType == null || respondToPayloadType.isEmpty() || (!respondToPayloadType.equals(ProbeWrapper.JSON) && !respondToPayloadType.equals(ProbeWrapper.XML)))
      throw new UnsupportedPayloadType("Attempting to set payload type to: " + respondToPayloadType + ". Cannot be null or empty and must be " + ProbeWrapper.JSON + " or " + ProbeWrapper.XML);

    _probe.setRespondToPayloadType(respondToPayloadType);
  }
227293
def PUSH(self, params):
        
        # TODO what registers are allowed to PUSH to? Low registers and LR
        # TODO PUSH should reverse the list, not POP
        RPushList = self.get_one_parameter(r'\s*{(.*)}(.*)', params).split(',')
        RPushList = [i.strip() for i in RPushList]
        # TODO should we make sure the register exists? probably not

        def PUSH_func():
            for register in RPushList:
                self.register['SP'] -= 4

                for i in range(4):
                    # TODO is this the same as with POP?
                    self.memory[self.register['SP'] + i] = ((self.register[register] >> (8 * i)) & 0xFF)

        return PUSH_func
979553
function(commandId, type, binding, bindingOnly) {
			this._pendingBindings[commandId] = this._pendingBindings[commandId] || [];
			this._pendingBindings[commandId].push({
				type: type,
				binding: binding,
				bindingOnly: bindingOnly
			});
		}
645888
def PushEvent(self, timestamp, event_data):
    
    heap_values = (timestamp, event_data)
    heapq.heappush(self._heap, heap_values)
    self.data_size += len(event_data)
720500
def set_simulate(self, status):
        
        if type(status) != bool:
            raise InvalidInput("Status value must be bool")
        self._simulate = bool2int(status)
465519
def push_token(self, tok):
        ""
        if self.debug >= 1:
            print("shlex: pushing token " + repr(tok))
        self.pushback.appendleft(tok)
302516
private void pushDeviceToken(final String token, final boolean register, final PushType type) {
        pushDeviceToken(this.context, token, register, type);
    }
198548
public static PushButton newPushButton (Image defaultImage, Image overImage,
                                            Image downImage, ClickHandler onClick)
    {
        PushButton button = new PushButton(defaultImage, downImage);
        maybeAddClickHandler(button, onClick);
        button.getUpHoveringFace().setImage(overImage);
        return button;
    }
918567
protected void pushValue(Type type) {
        if (type.getType() == Const.T_VOID) {
            throw new IllegalArgumentException("Can't push void");
        }
        TypeFrame frame = getFrame();
        if (type.getType() == Const.T_LONG) {
            frame.pushValue(Type.LONG);
            frame.pushValue(TypeFrame.getLongExtraType());
        } else if (type.getType() == Const.T_DOUBLE) {
            frame.pushValue(Type.DOUBLE);
            frame.pushValue(TypeFrame.getDoubleExtraType());
        } else {
            frame.pushValue(type);
        }
    }