Visit OP_UPDATE_MASTER_KEY
16209
private void visit_OP_UPDATE_MASTER_KEY()
    throws IOException {
    visitTxId();  
      v.visitVInt(  EditsElement.KEY_ID);
      v.visitVLong( EditsElement.KEY_EXPIRY_DATE);
      VIntToken blobLengthToken = v.visitVInt(EditsElement.KEY_LENGTH);
      v.visitBlob(EditsElement.KEY_BLOB, blobLengthToken.value);
  }
1366222
def upgrade():
    """"""
    op.create_table(
        'pidstore_pid',
        sa.Column('created', sa.DateTime(), nullable=False),
        sa.Column('updated', sa.DateTime(), nullable=False),
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('pid_type', sa.String(length=6), nullable=False),
        sa.Column('pid_value', sa.String(length=255), nullable=False),
        sa.Column('pid_provider', sa.String(length=8), nullable=True),
        sa.Column('status', sa.CHAR(1), nullable=False),
        sa.Column('object_type', sa.String(length=3), nullable=True),
        sa.Column(
            'object_uuid',
            sqlalchemy_utils.types.uuid.UUIDType(),
            nullable=True
        ),
        sa.PrimaryKeyConstraint('id')
    )
    op.create_index(
        'idx_object', 'pidstore_pid', ['object_type', 'object_uuid'],
        unique=False
    )
    op.create_index('idx_status', 'pidstore_pid', ['status'], unique=False)
    op.create_index(
        'uidx_type_pid', 'pidstore_pid', ['pid_type', 'pid_value'],
        unique=True
    )
    op.create_table(
        'pidstore_recid',
        sa.Column('recid', sa.BigInteger(), nullable=False),
        sa.PrimaryKeyConstraint('recid')
    )
    op.create_table(
        'pidstore_redirect',
        sa.Column('created', sa.DateTime(), nullable=False),
        sa.Column('updated', sa.DateTime(), nullable=False),
        sa.Column(
            'id',
            sqlalchemy_utils.types.uuid.UUIDType(),
            nullable=False
        ),
        sa.Column('pid_id', sa.Integer(), nullable=False),
        sa.ForeignKeyConstraint(
            ['pid_id'],
            [u'pidstore_pid.id'],
            onupdate='CASCADE',
            ondelete='RESTRICT'
        ),
        sa.PrimaryKeyConstraint('id')
    )
568406
def master(self, name):
        """"""
        fut = self.execute(b'MASTER', name, encoding='utf-8')
        return wait_convert(fut, parse_sentinel_master)
1165860
def _trigger_refresh(self, key):
        ""
        if self.top_level:
            self.update(key)
        else:
            self.current_key = None
            self.current_frame = None
316415
async def update(cls, access_key: str,
                     is_active: bool = None,
                     is_admin: bool = None,
                     resource_policy: str = None,
                     rate_limit: int = None) -> dict:
        
        q = 'mutation($access_key: String!, $input: ModifyKeyPairInput!) {' + \
            '  modify_keypair(access_key: $access_key, props: $input) {' \
            '    ok msg' \
            '  }' \
            '}'
        variables = {
            'access_key': access_key,
            'input': {
                'is_active': is_active,
                'is_admin': is_admin,
                'resource_policy': resource_policy,
                'rate_limit': rate_limit,
            },
        }
        rqst = Request(cls.session, 'POST', '/admin/graphql')
        rqst.set_json({
            'query': q,
            'variables': variables,
        })
        async with rqst.fetch() as resp:
            data = await resp.json()
            return data['modify_keypair']
100714
def get_ops(self, key):
        ''' 
        '''
        ops = self._store.get(key)
        if ops is None:
            raise KeyError(
                'cannot get operations for {}'.format(key))
        return ops
309460
def update():
    """"""
    repo_directory = get_config()['repo_directory']
    os.chdir(repo_directory)
    click.echo("Check for updates...")

    local = subprocess.check_output('git rev-parse master'.split()).strip()
    remote = subprocess.check_output(
        'git ls-remote https://github.com/tldr-pages/tldr/ HEAD'.split()
    ).split()[0]
    if local != remote:
        click.echo("Updating...")
        subprocess.check_call('git checkout master'.split())
        subprocess.check_call('git pull --rebase'.split())
        build_index()
        click.echo("Update to the latest and rebuild the index.")
    else:
        click.echo("No need for updates.")
1081140
def put_ops(self, key, time, ops):
        ''' 
        '''
        if self._store.get(key) is None:
            self._store[key] = ops
37031
public static void setUseMasterKey(boolean useMasterKey) {
    if (useMasterKey) {
      RequestSignImplementation.setMasterKey(appConf.getMasterKey());
    } else {
      RequestSignImplementation.setMasterKey(null);
    }
  }
965266
def master_compile(master_opts, minion_opts, grains, id_, saltenv):
    '''
    
    '''
    st_ = MasterHighState(master_opts, minion_opts, grains, id_, saltenv)
    return st_.compile_highstate()
730341
def update(access_key, resource_policy, is_admin, is_active,  rate_limit):
    '''
    
    '''
    with Session() as session:
        try:
            data = session.KeyPair.update(
                access_key,
                is_active=is_active,
                is_admin=is_admin,
                resource_policy=resource_policy,
                rate_limit=rate_limit)
        except Exception as e:
            print_error(e)
            sys.exit(1)
        if not data['ok']:
            print_fail('KeyPair creation has failed: {0}'.format(data['msg']))
            sys.exit(1)
        print('Key pair is updated: ' + access_key + '.')
604787
def masters(self):
        """"""
        fut = self.execute(b'MASTERS', encoding='utf-8')
        # TODO: process masters: we can adjust internal state
        return wait_convert(fut, parse_sentinel_masters)
260487
def update_credentials(self, key, secret):
        '''  '''
        self.access_key = key
        self.secret_key = secret
951377
private void visit_OP_SYMLINK() throws IOException {
    visitTxId();
    if (!LayoutVersion.supports(Feature.EDITLOG_OP_OPTIMIZATION, editsVersion)) {
      v.visitInt(EditsElement.LENGTH);
    }
    v.visitStringUTF8( EditsElement.SOURCE);
    v.visitStringUTF8( EditsElement.DESTINATION);
    if (LayoutVersion.supports(Feature.EDITLOG_OP_OPTIMIZATION, editsVersion)) {
      v.visitLong(EditsElement.MTIME);
      v.visitLong(EditsElement.ATIME);
    } else {
      v.visitStringUTF8(EditsElement.MTIME);
      v.visitStringUTF8(EditsElement.ATIME);
    }
    // PERMISSION_STATUS
    v.visitEnclosingElement(EditsElement.PERMISSION_STATUS);

    v.visitStringText( EditsElement.USERNAME);
    v.visitStringText( EditsElement.GROUPNAME);
    v.visitShort(      EditsElement.FS_PERMISSIONS);

    v.leaveEnclosingElement();
  }
435620
def upgrade():
    """"""
    op.create_table(
        'access_actionssystemroles',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('action', sa.String(length=80), nullable=True),
        sa.Column('exclude', sa.Boolean(name='exclude'), server_default='0',
                  nullable=False),
        sa.Column('argument', sa.String(length=255), nullable=True),
        sa.Column('role_name', sa.String(length=40), nullable=False),
        sa.PrimaryKeyConstraint('id',
                                name=op.f('pk_access_actionssystemroles')),
        sa.UniqueConstraint('action', 'exclude', 'argument', 'role_name',
                            name='access_actionssystemroles_unique')
    )
    op.create_index(op.f('ix_access_actionssystemroles_action'),
                    'access_actionssystemroles', ['action'], unique=False)
    op.create_index(op.f('ix_access_actionssystemroles_argument'),
                    'access_actionssystemroles', ['argument'], unique=False)
    op.create_index(op.f('ix_access_actionssystemroles_role_name'),
                    'access_actionssystemroles', ['role_name'], unique=False)
357970
def update_master_state(node, snapshots)
      state = @node_strategy.determine_state(node, snapshots)
      case state
      when :unavailable
        handle_unavailable(node, snapshots)
      when :available
        if node.syncing_with_master?
          handle_syncing(node, snapshots)
        else
          handle_available(node, snapshots)
        end
      else
        raise InvalidNodeStateError.new(node, state)
      end
    rescue *ZK_ERRORS
      # fail hard if this is a ZK connection-related error
      raise
    rescue => ex
      logger.error("Error handling state report for #{[node, state].inspect}: #{ex.inspect}")
    end
176293
def update_keyjar(keyjar):
    
    for iss, kbl in keyjar.items():
        for kb in kbl:
            kb.update()