OSLC-CM connector in SD

1,222 views
1,074 views

Published on

Implementing the support of OSLC-CM in the bugtracker SD.
More information at http://arroway.github.com/Net-OSLC-CM

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,222
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
18
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

OSLC-CM connector in SD

  1. 1. Cassiopee Project 2012Implementing the support of OSLC-CM in Simple Defects Cliquez pour modifier le style des sous-titres du masqueStéphanie Ouillon - Mentor : Olivier Berger
  2. 2. Contents q  Simple Defects (SD) q  SD connectors q  Introduction to OSLC-CM q  Development goal q  Net-OSLC-CM Perl module q  OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  3. 3. Specificationsq  Implementing a OSLC-CM adaptator for the bugtracker Simple Defectsq  Open Source contributionq  Publishing content on the webBase de données Pro Cassiopee 2012 OSLC-CM connector in SD
  4. 4. Simple Defects (SD) Simple Defects (SD) q  Introduction to OSLC-CM q  Development goal q  SD connectors q  Net-OSLC-CM Perl module q  OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  5. 5. Simple Defects : a bugtrackerq  In command ligneProphet database Cassiopee 2012 OSLC-CM connector in SD
  6. 6. Simple Defects : a bugtracker filesystem code IDE Server/storage bugs Web browser5 Cassiopee 2012 OSLC-CM connector in SD
  7. 7. Simple Defects : a bugtracker filesystem codeTerminal + Vim Server/storage bugs filesystemTerminal + SD 6 Cassiopee 2012 OSLC-CM connector in SD
  8. 8. Simple Defects : un bugtrackerq  In command ligneq  Prophet databasehttps://gitorious.org/prophet/prophet Cassiopee 2012 OSLC-CM connector in SD
  9. 9. Prophetü  Semi-relationnalü  Peer to peer replicatedü  Disconnectedü  Versionedü  Self-healing conflict resolution Cassiopee 2012 OSLC-CM connector in SD
  10. 10. Cassiopee 2012 OSLC-CM connector in SD
  11. 11. Cassiopee 2012 OSLC-CM connector in SD
  12. 12. Cassiopee 2012 OSLC-CM connector in SD
  13. 13. Cassiopee 2012 OSLC-CM connector in SD
  14. 14. Cassiopee 2012 OSLC-CM connector in SD
  15. 15. Cassiopee 2012 OSLC-CM connector in SD
  16. 16. DemonstrationCassiopee 2012 OSLC-CM connector in SD
  17. 17. Cassiopee 2012 OSLC-CM connector in SD
  18. 18. Cassiopee 2012 OSLC-CM connector in SD
  19. 19. Introduction to OSLC-CM Simple Defects (SD) Introduction to OSLC-CM q  Development goal q  SD connectors q  Net-OSLC-CM Perl module q  OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  20. 20. OSLCOpen Services for Lifecycle Collaborationq  Specifications ü  Sharing data ü  Between software development tools Cassiopee 2012 OSLC-CM connector in SD
  21. 21. Specificationsq  Core specifications v2q  Change Management specifications v2 Defining a web services REST interface for Change Management Cassiopee 2012 OSLC-CM connector in SD
  22. 22. Change Managementq  Defects, bugsq  Change requests, tasks Cassiopee 2012 OSLC-CM connector in SD
  23. 23. Cassiopee 2012 OSLC-CM connector in SD
  24. 24. Cassiopee 2012 OSLC-CM connector in SD
  25. 25. Principles: REST – Linked Dataq  ‘’Everything is a URI.’’q  RDF/XML data formatq  HTTP protocol Pull : GET Push : POST, UPDATE, DELETE Cassiopee 2012 OSLC-CM connector in SD
  26. 26. Cassiopee 2012 OSLC-CM connector in SD
  27. 27. Development goal Simple Defects (SD) Introduction to OSLC-CM Development goal q  SD connectors q  Net-OSLC-CM Perl module q  OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  28. 28. Goal SD Bugzilla Adaptator OSLC-CM Service ProviderCassiopee 2012 OSLC-CM connector in SD
  29. 29. Goal Adaptator OSLC-CM Consumer SD Bugzilla Adaptator OSLC-CM Service ProviderCassiopee 2012 OSLC-CM connector in SD
  30. 30. SD connectors Simple Defects (SD) Introduction to OSLC-CM Development goal SD connectors q  Net-OSLC-CM Perl module q  OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  31. 31. Development in SDq  Developed in Perl 5q  Object-oriented with Moose Cassiopee 2012 OSLC-CM connector in SD
  32. 32. Example with Github bugtrackerq  3 classes in Replica/ ü  github.pm ü  github/PullEncoder.pm ü  github/PushEncoder.pm Cassiopee 2012 OSLC-CM connector in SD
  33. 33. Partial UML diagram (inheritance)Cassiopee 2012 OSLC-CM connector in SD
  34. 34. Example with Githubq  Perl interface for github.com Net::GitHub::V2 Cassiopee 2012 OSLC-CM connector in SD
  35. 35. Example with Githubq  github.pm module $sd clone –-from ‘github:http://github.com/arroway/SD/issues’ ü  Authentification (OAuth or basic auth) ü  Connection Cassiopee 2012 OSLC-CM connector in SD
  36. 36. Example with Githubq  github/PullEncoder.pm module find_matching_tickets calls github->issue->list(‘open’) github->issue->list(‘closed’) Cassiopee 2012 OSLC-CM connector in SD
  37. 37. Example with Githubq  github/PushEncoder.pm module integrate_ticket_create/update calls $github->issue->open/edit Cassiopee 2012 OSLC-CM connector in SD
  38. 38. Net-OSLC-CM Perl Module Simple Defects (SD) SD connectors Introduction to OSLC-CM Development goal Net-OSLC-CM Perl Module q  OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  39. 39. Net-OSLC-CMq  Standard Perl moduleq  Helping implement a OSLC-CM Consumer Cassiopee 2012 OSLC-CM connector in SD
  40. 40. Cassiopee 2012 OSLC-CM connector in SD
  41. 41. Exampleuse Net::OSLC::CM; my $oslccm = Net::OSLC::CM−>new( url => $self−>remote_url, username => $username, password => $password )); # Getting an array of changeRequests my @results = $oslccm−>get_oslc_resources; Cassiopee 2012 OSLC-CM connector in SD
  42. 42. Résultat final my @results = $oslccm−>changeRequests;Cassiopee 2012 OSLC-CM connector in SD
  43. 43. Detailed example$oslccm−>url = "http://example.com"; $oslccm−>parser( Net::OSLC::CM::Parser−>new(cm => $oslccm) ); $oslccm−>create_catalog; $oslccm−>get_provider_catalog_resource; $oslccm−>get_service_providers; $oslccm−>get_changeRequests($oslccm−>providers); $oslccm−>load_changeRequests(); my @results = $oslccm−>changeRequests; Cassiopee 2012 OSLC-CM connector in SD
  44. 44. Connection to a bugtrackerConnection http://localhost:8282/bugz Connection Authentification (basic auth) Consumer Connection OK Authenticated Cassiopee 2012 OSLC-CM connector in SD
  45. 45. Getting the Service Provider CatalogGET Catalog GET http://localhost:8282/bugz/ http://localhost:8282/bugz catalog Accept => application/rdf+xml Consumer <oslc:ServiceProviderCatalog rdf:about="http://localhost/bugz/catalog"> Cassiopee 2012 OSLC-CM connector in SD
  46. 46. Catalog RDF/XMLService Provider Catalog<oslc:ServiceProviderCatalog rdf:about="http://localhost:8282/bugz/catalog"> <dcterms:title>OSLC-CM Adapter/Bugzilla Service Provider Catalog</dcterms:title> <oslc:domain rdf:resource="http://open-services.net/ns/cm#" /> <oslc:serviceProvider> <oslc:ServiceProvider rdf:about="http://localhost:8282/bugz/provider?productId=1"> <dcterms:title>TestProduct</dcterms:title> </oslc:ServiceProvider> </oslc:serviceProvider> <oslc:serviceProvider> <oslc:ServiceProvider rdf:about="http://localhost:8282/bugz/provider?productId=3"> <dcterms:title>FakePortal</dcterms:title> </oslc:ServiceProvider> </oslc:serviceProvider></oslc:ServiceProviderCatalog> Cassiopee 2012 OSLC-CM connector in SD
  47. 47. Getting Service Providers dataGET Service Providers GET http://localhost:8282/bugz/provider?productId=1 GET http://localhost:8282/bugz/provider?productId=2 GET http://localhost:8282/bugz/provider?productId=3 … Consumer Cassiopee 2012 OSLC-CM connector in SD
  48. 48. Service Provider RDF/XMLService Provider<oslc:ServiceProvider rdf:about="http://localhost:8282/bugz/provider?productId=1"> <dcterms:title>Bugzilla Service Provider: Product TestProduct(1)</dcterms:title> <oslc:Service> <oslc:selectionDialog/> <oslc:creationDialog/> <oslc:CreationFactory/> <oslc:QueryCapability> <oslc:queryBase rdf:resource="http://localhost:8282/bugz/changerequests? productId=1" /> <oslc:resourceShape rdf:resource="http://localhost:8282/bugz/queryshape? productId=1" /> </oslc:QueryCapability> <oslc:Service/><oslc:ServiceProvider/> Cassiopee 2012 OSLC-CM connector in SD
  49. 49. Getting a list of Change Requests (tickets)GET Change Requests list GET http://localhost:8282/bugz/changerequests?productId=1 Consumer Cassiopee 2012 OSLC-CM connector in SD
  50. 50. Getting a Change RequestGET Change Request GET http://localhost:8282/bugz/changerequest?id=24 Consumer Cassiopee 2012 OSLC-CM connector in SD
  51. 51. Change Request RDF/XMLChange Request<oslc_cm:ChangeRequest rdf:about="http://192.168.56.101:8282/bugz/changerequest?id=24"> <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string”> New Bug: installation </dcterms:title> <dcterms:created rdf:datatype=“http://www.w3.org/2001 XMLSchema#dateTime”> 2012-04-22T16:16:00Z </dcterms:created> <dcterms:identifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string”> 24 </dcterms:identifier> …</oslc_cm:ChangeRequest> Cassiopee 2012 OSLC-CM connector in SD
  52. 52. OSLC connector in SD Simple Defects (SD) SD Connectors Introduction to OSLC-CM Development goal Net-OSLC-CM Perl Module OSLC connector in SD q  Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  53. 53. Result gained from Net::OSLC::CM my @results = $oslccm−>changeRequests;Cassiopee 2012 OSLC-CM connector in SD
  54. 54. Result gained from Net::OSLC::CM my @results = $oslccm−>changeRequests; List of tickets in SDCassiopee 2012 OSLC-CM connector in SD
  55. 55. Using and testing Simple Defects (SD) SD connectors Introduction to OSLC-CM Development goal Net-OSLC-CM Perl Module OSLC connector in SD Using and testing q  Making-upCassiopee 2012 OSLC-CM connector in SD
  56. 56. Test environment Adaptator OSLC-CM Consumer SD Bugzilla Adaptator OSLC-CM Service ProviderHost Cassiopee 2012 OSLC-CM connector in SD
  57. 57. Test environment Adaptator Debian virtual machine OSLC-CM Consumer SD Bugzilla Adaptator OSLC-CM Service ProviderHost Cassiopee 2012 OSLC-CM connector in SD
  58. 58. Test environment Adaptator Debian virtual machine OSLC-CM Consumer SD Bugzilla Adaptator OSLC-CM Service ProviderHost Vboxnet network interface between host and guest (//local network) Cassiopee 2012 OSLC-CM connector in SD
  59. 59. DemonstrationCassiopee 2012 OSLC-CM connector in SD
  60. 60. Testing Net::OSLC::CMq  With Test::Moreq  Testing Net::OSLC::CM classes 01-connection.t 02-get-provider-catalog-resources.t 03-get-service-providers.t 04-get-change-requests.t Cassiopee 2012 OSLC-CM connector in SD
  61. 61. Making-up Simple Defects (SD) SD connectors Introduction to OSLC-CM Development goal Net-OSLC-CM Perl Module OSLC connector in SD Using and testing Making-upCassiopee 2012 OSLC-CM connector in SD
  62. 62. Commits in Net-OSLC-CMCassiopee 2012 OSLC-CM connector in SD
  63. 63. Next development stepsq  Implementing the Push part in Net::OSLC::CM with a serializer RDF/XMLq  Implementing PushEncoder.pm in SDq  Completing the implementation of the specsq  Refactoring Net::OSLC::CM ü  RDF data are extensible – so is the Prophet database ü  Data OSLC/ Net OSLC Cassiopee 2012 OSLC-CM connector in SD
  64. 64. What I learnedq  Perl 5 and OO Perl with Mooseq  Creation of a Perl moduleq  Tests with Test::Moreq  Specifications OSLC-CM v2q  Searching through RDF data and performing SPARQL queries Cassiopee 2012 OSLC-CM connector in SD
  65. 65. Linksq  Source code http://github.com/arroway/Net-OSLC-CM (Perl licence) http://github/com/arroway/SD (Best Practicals Solutions)q  Documentation http://arroway.github.com/Net-OSLC-CMq  SD http://syncwith.usq  OSLC http://open-services.net Cassiopee 2012 OSLC-CM connector in SD

×