Pass through to provider ObjectiveBankAdminSession.create_objective_bank
332770
def create_objective_bank(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.create_bin
        return ObjectiveBank(
            self._provider_manager,
            self._get_provider_session('objective_bank_admin_session').create_objective_bank(*args, **kwargs),
            self._runtime,
            self._proxy)
274998
def endpoint_create(**kwargs):
    
    client = get_client()

    # get endpoint type, ensure unambiguous.
    personal = kwargs.pop("personal")
    server = kwargs.pop("server")
    shared = kwargs.pop("shared")

    if personal and (not server) and (not shared):
        endpoint_type = "personal"
    elif server and (not personal) and (not shared):
        endpoint_type = "server"
    elif shared and (not personal) and (not server):
        endpoint_type = "shared"
    else:
        raise click.UsageError(
            "Exactly one of --personal, --server, or --shared is required."
        )

    # validate options
    kwargs["is_globus_connect"] = personal or None
    validate_endpoint_create_and_update_params(endpoint_type, False, kwargs)

    # shared endpoint creation
    if shared:
        endpoint_id, host_path = shared
        kwargs["host_endpoint"] = endpoint_id
        kwargs["host_path"] = host_path

        ep_doc = assemble_generic_doc("shared_endpoint", **kwargs)
        autoactivate(client, endpoint_id, if_expires_in=60)
        res = client.create_shared_endpoint(ep_doc)

    # non shared endpoint creation
    else:
        # omit `is_globus_connect` key if not GCP, otherwise include as `True`
        ep_doc = assemble_generic_doc("endpoint", **kwargs)
        res = client.create_endpoint(ep_doc)

    # output
    formatted_print(
        res,
        fields=(COMMON_FIELDS + GCP_FIELDS if personal else COMMON_FIELDS),
        text_format=FORMAT_TEXT_RECORD,
    )
779619
def create(self):
        
        pb = self._get_ansible_playbook(self.playbooks.create)
        pb.execute()
268222
def get_objective_banks_by_activity(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceBinSession.get_bins_by_resource
        catalogs = self._get_provider_session('activity_objective_bank_session').get_objective_banks_by_activity(*args, **kwargs)
        cat_list = []
        for cat in catalogs:
            cat_list.append(ObjectiveBank(self._provider_manager, cat, self._runtime, self._proxy))
        return ObjectiveBankList(cat_list)
806144
def _init_map(self, record_types=None, **kwargs):
        """"""
        osid_objects.OsidRelationshipForm._init_map(self, record_types=record_types)
        self._my_map['assignedObjectiveBankIds'] = [str(kwargs['objective_bank_id'])]
        self._my_map['completion'] = self._completion_default
        self._my_map['objectiveId'] = str(kwargs['objective_id'])
        self._my_map['resourceId'] = str(kwargs['resource_id'])
        self._my_map['levelId'] = self._level_default
746609
def use_plenary_objective_view(self):
        """"""
        self._object_views['objective'] = PLENARY
        # self._get_provider_session('objective_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_objective_view()
            except AttributeError:
                pass
1039608
def get_objective_bank(self):
        
        if self._lookup_session is None:
            mgr = get_provider_manager('LEARNING', runtime=self._runtime, proxy=self._proxy)
            self._lookup_session = mgr.get_objective_bank_lookup_session(proxy=getattr(self, "_proxy", None))
        return self._lookup_session.get_objective_bank(Id(self._my_map['id']))
1084240
def access_storage_create(name, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('access:storage:create', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
    })
335336
def create(self, **kwargs):
        
        resource = self.resource.create(kwargs)
        if 'admin_token' in kwargs:
            resource.context.authorize('Gem-Application',
                                       api_token=resource.api_token,
                                       admin_token=kwargs['admin_token'])
        app = self.wrap(resource)
        return self.add(app)
786883
def create_new_database(request):
    """"""
    name = "Create a New MongoDB Database"

    if request.method == 'POST':
        form = CreateDatabaseForm(request.POST)

        if form.is_valid():
            result = form.save()
            if "error" in result:
                messages.error(
                    request, "The database creation operation failed.")
                messages.error(request, result["error"])
            else:
                messages.success(request, "Database created.")
            return HttpResponseRedirect(reverse('djmongo_show_dbs'))
        else:
            # The form is invalid
            messages.error(
                request, _("Please correct the errors in the form."))
            return render(request,
                          'djmongo/console/generic/bootstrapform.html',
                          {'form': form,
                           'name': name})

    else:
        # this is a GET
        context = {'name': name,
                   'form': CreateDatabaseForm(
                       initial={"initial_document": '{ "foo" : "bar" }'
                                })
                   }
        return render(request, 'djmongo/console/generic/bootstrapform.html',
                      context)
438011
def create_user(self, instance, name, password, database_names, host=None):
        
        return instance.create_user(name=name, password=password,
                database_names=database_names, host=host)
997814
def create_book(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.create_bin
        return Book(
            self._provider_manager,
            self._get_provider_session('book_admin_session').create_book(*args, **kwargs),
            self._runtime,
            self._proxy)
132138
def create_session(self, **params):
        

        required_keys = ('market', 'currency', 'locale', 'pickupplace',
                         'dropoffplace', 'pickupdatetime', 'dropoffdatetime',
                         'driverage')

        service_url = "{url}/{params_path}".format(
            url=self.PRICING_SESSION_URL,
            params_path=self._construct_params(params, required_keys)
        )

        poll_path = self.make_request(service_url,
                                      headers=self._session_headers(),
                                      callback=lambda resp: resp.headers[
                                          'location'],
                                      userip=params['userip'])

        return "{url}{path}".format(url=self.API_HOST, path=poll_path)
149808
def save_bank(self, bank):
        
        path = self._bank_path(bank)
        Persistence.save(path, bank.json)
558341
def create
      request = if receivers.empty?
                  Request.post('transactions', api_version, params)
                else
                  Request.post_xml('transactions/', nil, credentials, xml_params)
                end

      Response.new(request, self).serialize
    end
1211968
def get_parent_objective_bank_nodes(self):
        
        parent_objective_bank_nodes = []
        for node in self._my_map['parentNodes']:
            parent_objective_bank_nodes.append(ObjectiveBankNode(
                node._my_map,
                runtime=self._runtime,
                proxy=self._proxy,
                lookup_session=self._lookup_session))
        return ObjectiveBankNodeList(parent_objective_bank_nodes)
181305
def create(
        cls, api_key=None, idempotency_key=None, stripe_account=None, **params
    ):
        """"""
        url = cls.class_url()
        headers = populate_headers(idempotency_key)
        return make_request(
            cls, 'post', url, stripe_account=stripe_account,
            headers=headers, params=params)