Skip to content

No method to subscribe source to series #18

@rickerc

Description

@rickerc

After creating a new source, I cannot find a way to subscribe it to a series

  • no GUI function that I can locate
  • API docs mention a function but it dies in a traceback when I try to use it

Traceback is (auth key obscured):

$ curl -v -H "Content-Type: application/json" -X POST --header
'Authorization: ApiKey user:key'
--data '{ "package_source": "/api/v1/packagesource/68/",
"destination_series": "/api/v1/series/cisco/folsom/",
"counter": 1 }' 'http://apt.ctocllab.cisco.com/api/v1/subscription/'

  • About to connect() to apt.ctocllab.cisco.com port 80 (#0)
  • Trying 172.29.74.52...
  • Connected to apt.ctocllab.cisco.com (172.29.74.52) port 80 (#0)

    POST /api/v1/subscription/ HTTP/1.1
    User-Agent: curl/7.29.0
    Host: apt.ctocllab.cisco.com
    Accept: /
    Content-Type: application/json
    Authorization: ApiKey user:key
    Content-Length: 117

  • upload completely sent off: 117 out of 117 bytes
    < HTTP/1.1 404 NOT FOUND
    < Date: Mon, 04 Mar 2013 13:47:52 GMT
    < Server: Apache/2.2.22 (Ubuntu)
    < Transfer-Encoding: chunked
    < Content-Type: application/json; charset=utf-8
    <
    {
    "error_message": "Invalid resource lookup data provided (mismatched
    type).",
    "traceback": "Traceback (most recent call last):\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 202, in
    wrapper\n response = callback(request, _args, *_kwargs)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 441, in
    dispatch_list\n return self.dispatch('list', request, *_kwargs)\n\n
    File "/home/buildd/www/src/tastypie/tastypie/resources.py", line 474, in
    dispatch\n response = method(request, *_kwargs)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 1258, in
    post_list\n updated_bundle = self.obj_create(bundle, request=request,
    *_self.remove_api_resource_names(kwargs))\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 1925, in
    obj_create\n bundle = self.full_hydrate(bundle)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 780, in
    full_hydrate\n value = field_object.hydrate(bundle)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/fields.py", line 661, in
    hydrate\n return self.build_related_resource(value,
    request=bundle.request)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/fields.py", line 595, in
    build_related_resource\n return
    self.resource_from_uri(self.fk_resource, value, *_kwargs)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/fields.py", line 528, in
    resource_from_uri\n obj = fk_resource.get_via_uri(uri,
    request=request)\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 723, in
    get_via_uri\n return self.obj_get(request=request,
    **self.remove_api_resource_names(kwargs))\n\n File
    "/home/buildd/www/src/tastypie/tastypie/resources.py", line 1914, in
    obj_get\n raise NotFound("Invalid resource lookup data provided
    (mismatched type).")\n\nNotFound: Invalid resource lookup data provided
    (mismatched type).\n"
  • Connection #0 to host apt.ctocllab.cisco.com left intact

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions